:root {
  font-family: 'Courier New', 'Monaco', 'Menlo', 'DejaVu Sans Mono', 'Consolas', 'Lucida Console', monospace;
  line-height: 1.5;
  font-weight: 400;
  /* Page black (logo); panels slightly raised for content areas */
  --bg: #000000;
  --bg-panel: #161b18;
  --text: #8ab5a9;
  --text-bright: #a8cfc4;
  --text-muted: #5f857a;
  --primary-mint: var(--text);
  --dark-mint: #4a7569;
  --dark-gray: #3d4a46;
  --pure-black: var(--bg);
  --accent-bar-bg: #2a4540;
  --accent-bar-fg: #dcebe7;
  --accent-bar-border: #3d5c54;
  --red-accent: #d49a8f;
  --red-hover: #e8b5ab;
  --article-padding: 30px;
  --title-bar-height: calc(1.1em * 1.2 + 16px);
  color-scheme: dark;
  color: var(--text);
  background-color: var(--bg);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  padding: 0;
  margin: 0;
  background: var(--bg);
  font-family: 'Courier New', 'Monaco', 'Menlo', 'DejaVu Sans Mono', 'Consolas', 'Lucida Console', monospace;
  color: var(--text);
  min-height: 100vh;
}

/* Terminal Medieval Navigation Styling */
nav {
  font-family: 'Courier New', 'Monaco', 'Menlo', 'DejaVu Sans Mono', 'Consolas', monospace;
}

.nav-section {
  margin-bottom: 25px;
}

.nav-header,
article::before,
article > h1:first-child {
  color: var(--accent-bar-fg);
  font-size: 1.1em;
  font-weight: bold;
  line-height: 1.2;
  padding: 8px 12px;
  background: var(--accent-bar-bg);
  border: 1px solid var(--accent-bar-border);
  border-radius: 0;
  text-align: center;
  text-shadow: none;
  box-shadow: none;
}

.nav-header {
  margin: 0 0 10px 0;
  text-align: left;
}

.nav-link {
  display: block;
  color: var(--text);
  text-decoration: none;
  padding: 8px 15px;
  margin: 2px 0;
  border: 1px solid transparent;
  border-left-width: 3px;
  background: rgba(138, 181, 169, 0.06);
  border-radius: 0;
  transition: border-color 0.1s ease, color 0.1s ease;
  font-size: 0.95em;
}

.nav-link:hover {
  color: var(--text-bright);
  border-color: var(--dark-mint);
}

.nav-link.nav-link-current {
  border-left-width: 6px;
  border-left-color: var(--text-bright);
  color: var(--text-bright);
}

nav .nav-link:link,
nav .nav-link:visited,
nav .nav-link:hover,
nav .nav-link:active {
  text-decoration: none;
  font-weight: normal;
}

nav .nav-link:link,
nav .nav-link:visited,
nav .nav-link:active {
  color: var(--text);
}

nav .nav-link.nav-link-play,
nav .nav-link.nav-link-play:visited {
  color: var(--red-hover);
  background: rgba(212, 154, 143, 0.12);
  border-color: transparent;
  border-left-color: var(--red-accent);
}

nav .nav-link.nav-link-play:hover,
nav .nav-link.nav-link-play:active {
  color: var(--red-hover);
  border-color: var(--red-accent);
}

nav .nav-link.nav-link-play.nav-link-current {
  border-left-color: var(--red-accent);
}

a {
  color: var(--text-bright);
}

.banner-link,
.banner-link:hover,
.banner-link:focus,
.banner-link:visited {
  text-decoration: none;
}

a:link {
  text-decoration: underline;
}

a:visited {
  text-decoration: underline;
  color: var(--text-muted);
}

a:active {
  text-decoration: underline;
}

a:hover {
  text-decoration: underline;
  color: var(--text-bright);
}

article table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.25em 0;
  font-size: 0.95em;
}

article > table:first-of-type {
  table-layout: fixed;
  margin-top: 0;
}

article > table:first-of-type th:first-child,
article > table:first-of-type td:first-child {
  width: 9em;
  white-space: nowrap;
  vertical-align: top;
}

article th,
article td {
  padding: 10px 14px;
  border: 1px solid var(--dark-mint);
  text-align: left;
  vertical-align: top;
  background-color: transparent !important;
  color: var(--text);
}

article th {
  background-color: var(--accent-bar-bg) !important;
  color: var(--accent-bar-fg) !important;
  font-weight: bold;
  white-space: nowrap;
}

article tbody tr:nth-child(even) td {
  background-color: rgba(138, 181, 169, 0.06) !important;
}

article td[nowrap],
article th[nowrap] {
  white-space: nowrap;
}

.sml {
  font-size: 9.5px;
}

.solid-body {
  padding: 0px;
  border: 1px solid var(--bg-panel);
}

.submitbut {
  background-color: #e9e9e9;
  border: 1px solid;
  border-bottom: 1px solid Gray;
  border-top: 1px solid Silver;
  border-left: 1px solid Silver;
  border-right: 1px solid Gray;
  font-size: 11px;
}

article img {
  background: transparent;
}

/* Wilderness maps are 1 pixel per grid cell; keep hard edges when scaled down. */
.wilderness-map img {
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  max-width: 100%;
  height: auto;
}

.wilderness-map-viewer-wrap {
  margin: 1.5em 0;
}

.wilderness-map-hint {
  color: var(--text-muted);
  font-size: 0.95em;
  margin: 0 0 0.75em;
}

.wilderness-map-viewer {
  width: 100%;
  height: min(70vh, 720px);
  min-height: 360px;
  border: 1px solid var(--dark-gray);
  background: #001a33;
}

.wilderness-map-viewer .leaflet-container {
  background: #001a33;
  font-family: Georgia, 'DejaVu Serif', 'Times New Roman', serif;
}

.wilderness-map-label-anchor,
.wilderness-map-label {
  background: transparent !important;
  border: none !important;
  height: auto !important;
  margin: 0 !important;
  pointer-events: none;
  width: auto !important;
}

.wilderness-map-label-text,
.wilderness-map-viewer .wilderness-map-tooltip {
  display: inline-block;
  transform: translate(4px, -50%);
  background: rgba(0, 0, 0, 0.9);
  border: 1px solid rgba(0, 0, 0, 0.45);
  border-radius: 4px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
  color: #ffe680;
  font-family: Georgia, 'DejaVu Serif', 'Times New Roman', serif;
  line-height: 1;
  margin: 0;
  padding: 1px 4px 2px;
  white-space: nowrap;
  text-shadow:
    -1px -1px 0 #000,
    1px -1px 0 #000,
    -1px 1px 0 #000,
    1px 1px 0 #000,
    0 0 3px #000;
}

.wilderness-map-viewer .wilderness-map-tooltip::before {
  display: none;
}

.wilderness-map-viewer .wilderness-map-label-link,
.wilderness-map-viewer .wilderness-map-label-link:link,
.wilderness-map-viewer .wilderness-map-label-link:visited,
.wilderness-map-viewer .wilderness-map-label-link:hover,
.wilderness-map-viewer .wilderness-map-label-link:focus,
.wilderness-map-viewer .wilderness-map-label-link:active {
  border-bottom: none !important;
  color: inherit;
  pointer-events: auto;
  text-decoration: none !important;
}

.wilderness-map-viewer .wilderness-map-tooltip-irregular {
  color: #ffaa66;
}

.wilderness-map-error {
  color: var(--red-accent);
  padding: 1em;
}

.wilderness-overview {
  position: relative;
  width: 180px;
  height: 180px;
  border: 1px solid var(--dark-gray);
  background: #001a33;
  cursor: pointer;
  overflow: hidden;
}

.wilderness-overview-map {
  display: block;
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.wilderness-overview-viewport {
  position: absolute;
  box-sizing: border-box;
  border: 1px solid #a8cfc4;
  pointer-events: none;
}

img[src*='#right'] {
  float: right;
  padding-left: 0.5em;
  padding-bottom: 0.5em;
}

img[src*='#left'] {
  float: left;
}

div.wrapper {
  display: grid;
  max-width: 1200px;
  margin: 0 auto;
  min-height: 100vh;
  grid-template-columns: 250px 1fr;
  grid-template-rows: auto 1fr auto;
  grid-template-areas:
    "header header"
    "nav    article"
    "footer footer";
  gap: 10px;
  padding: 0 20px;
}

@media (max-width: 768px) {
  div.wrapper {
    grid-template-columns: 1fr;
    grid-template-areas:
      "header"
      "nav"
      "article"
      "footer";
    padding: 0 15px;
  }
}

header {
  grid-area: header;
  margin: 1em auto 0.2em auto;
  text-align: center;
}

.banner-link {
  text-decoration: none;
  display: block;
}

.site-logo {
  display: block;
  max-width: min(480px, 100%);
  height: auto;
  margin: 0 auto;
  padding: 12px 0 4px;
}

.banner-link:hover .site-logo {
  filter: brightness(1.15);
}

nav {
  grid-area: nav;
  margin-top: 20px;
  align-self: start;
}

@media (max-width: 768px) {
  nav {
    margin-top: 0;
  }
  
  .nav-section {
    margin-bottom: 20px;
  }
  
  .nav-header {
    font-size: 1em;
    padding: 6px 10px;
  }
  
  .nav-link {
    font-size: 0.9em;
    padding: 6px 12px;
  }
}

article {
  grid-area: article;
  background-color: var(--bg-panel);
  color: var(--text);
  padding: var(--article-padding);
  padding-top: calc(var(--article-padding) + var(--title-bar-height));
  border-radius: 0;
  border: 1px solid var(--dark-mint);
  box-shadow: none; /* Clean terminal look */
  margin-top: 20px;
  align-self: start;
  min-height: 400px;
  position: relative;
}

/* Terminal window title bar with status indicators */
article::before {
  content: attr(data-title);
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  font-family: 'Courier New', monospace;
}

@media (max-width: 768px) {
  .nav-header,
  article::before,
  article > h1:first-child {
    font-size: 1em;
    padding: 6px 10px;
  }

  :root {
    --article-padding: 20px;
    --title-bar-height: calc(1em * 1.2 + 12px);
  }

  article {
    margin-top: 15px;
  }
}

article p:first-child {
  margin-top: 0;
}

article h1,
article h2,
article h3,
article h4,
article h5,
article h6 {
  color: var(--text-bright);
  margin-top: 1.5em;
  margin-bottom: 0.5em;
}

article h1 {
  margin-top: 0;
}

article h1:not(:first-child) {
  font-size: 1.5em;
  color: var(--text-bright);
  background: transparent;
  border: none;
  border-bottom: 2px solid var(--dark-mint);
  padding: 0 0 0.3em 0;
  text-align: left;
}

article h2 {
  font-size: 1.5em;
}

article h3 {
  font-size: 1.2em;
}

article p {
  line-height: 1.6;
  margin-bottom: 1em;
}

article pre {
  font-family: inherit;
  font-size: 1em;
  line-height: 1.6;
  color: var(--text);
  background: rgba(138, 181, 169, 0.05);
  border: 1px solid var(--dark-mint);
  padding: 1em 1.25em;
  margin: 1em 0;
  overflow-x: auto;
}

article pre code {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  background: transparent;
}

article .area-map {
  margin: 1.5em 0;
  text-align: center;
}

article .area-map table {
  margin: 0 auto;
  border: none;
}

article .area-map td {
  border: none !important;
  padding: 0 !important;
  background: transparent !important;
}

article .area-map pre {
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  overflow-x: auto;
  text-align: left;
  display: inline-block;
}

article ul {
  line-height: 1.6;
}

article li {
  margin-bottom: 0.3em;
}

/* Terminal link styling */
article a {
  color: var(--text-bright);
  transition: color 0.1s ease;
}

article a:hover {
  color: var(--text);
}

/* Add some breathing room for content */
@media (min-width: 769px) {
  article {
    max-width: none;
  }
}

footer {
  grid-area: footer;
  margin: 2em 0;
  text-align: center;
  font-size: small;
  color: var(--text-muted);
  line-height: 1.5;
}

@media (max-width: 768px) {
  footer {
    margin: 1.5em 0;
  }
}

/* Equipment page styles */
.loading, .error {
  text-align: center;
  padding: 2rem;
  font-size: 1.1em;
}

.error {
  color: var(--red-accent); /* Red accent for errors */
  font-weight: bold;
  border: 1px solid var(--red-accent);
  background: rgba(212, 154, 143, 0.1);
  padding: 1rem;
  border-radius: 0;
  font-family: 'Courier New', monospace;
}

/* Filter controls */
.filter-controls {
  margin: 1rem 0 2rem 0;
  padding: 1.5rem;
  background: rgba(138, 181, 169, 0.05); /* Faint mint background */
  border: 1px solid var(--text); /* Mint green border */
  border-radius: 0; /* Terminal style - no rounded corners */
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  align-items: center;
  margin-bottom: 1rem;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  min-width: 120px;
  flex: 1;
}

/* Effects pills section */
.effects-section {
  margin: 1rem 0;
  padding: 1rem;
  border: 1px solid var(--text); /* Mint green border */
  border-radius: 0; /* Terminal style */
  background: rgba(138, 181, 169, 0.05); /* Mint background */
}

/* Warning/Important effects section variant */
.effects-section.warning {
  border-color: var(--red-accent); /* Red accent border for warnings */
  background: rgba(212, 154, 143, 0.05); /* Faint red background */
}

.effects-label {
  display: block;
  font-weight: bold;
  color: var(--text-bright);
  margin-bottom: 0.75rem;
  font-size: 0.95em;
}

.effects-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.effect-pill {
  background: var(--bg-panel); /* Pure black */
  border: 2px solid var(--text); /* Mint green border */
  border-radius: 0; /* Terminal style - no rounded corners */
  padding: 0.4rem 0.8rem;
  font-size: 0.85em;
  font-weight: 500;
  color: var(--text); /* Primary mint green text */
  font-family: 'Courier New', monospace;
  cursor: pointer;
  transition: all 0.1s ease; /* Fast terminal transitions */
  white-space: nowrap;
}

.effect-pill:hover:not(.disabled) {
  background: var(--accent-bar-bg);
  color: var(--accent-bar-fg);
  border-color: var(--accent-bar-border);
  transform: none;
}

.effect-pill.selected {
  background: var(--dark-mint);
  color: var(--accent-bar-fg);
  border-color: var(--dark-mint);
}

.effect-pill.selected:hover {
  background: var(--dark-mint); /* Keep darker mint on hover */
  border-color: var(--dark-mint);
}

.effect-pill.disabled {
  opacity: 0.4;
  cursor: not-allowed;
  background: var(--bg);
  border-color: var(--red-accent);
  color: var(--red-accent);
}

.filter-group label {
  font-weight: bold;
  color: var(--text); /* Primary mint green for labels */
}

.filter-select {
  padding: 0.5rem;
  border: 1px solid var(--text); /* Mint green border */
  border-radius: 0; /* Terminal style */
  background: var(--bg-panel); /* Pure black background */
  color: var(--text); /* Primary mint green text */
  font-size: 1rem;
  font-family: 'Courier New', monospace;
  cursor: pointer;
}

.filter-select:focus {
  outline: none;
  border-color: var(--dark-mint); /* Darker mint green focus */
  box-shadow: none; /* Clean terminal look */
}

.filter-stats {
  color: var(--text); /* Primary mint green for stats */
  font-weight: bold;
  font-size: 1em;
  text-align: center;
  padding-top: 0.5rem;
  border-top: 1px solid rgba(138, 181, 169, 0.3); /* Mint border */
}

@media (max-width: 768px) {
  .filter-row {
    flex-direction: column;
    gap: 1rem;
    align-items: stretch;
  }
  
  .filter-group {
    min-width: auto;
    width: 100%;
  }
  
  .filter-select {
    width: 100%;
  }
  
  .effects-section {
    margin: 0.75rem 0;
    padding: 0.75rem;
  }
  
  .effects-pills {
    gap: 0.4rem;
  }
  
  .effect-pill {
    font-size: 0.8em;
    padding: 0.35rem 0.7rem;
  }
}

.items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.item-card {
  border: 2px solid var(--text); /* Mint green border */
  border-radius: 0; /* Terminal style - no rounded corners */
  padding: 1rem;
  background: var(--bg-panel); /* Pure black background */
  box-shadow: none; /* Clean terminal look */
  transition: all 0.1s; /* Fast terminal transitions */
}

.item-card:hover {
  transform: none; /* No transform for terminal aesthetic */
  background: rgba(138, 181, 169, 0.05); /* Faint mint highlight */
  border-color: var(--dark-mint); /* Darker mint border on hover */
}

.item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
  border-bottom: 1px solid var(--text); /* Mint green border */
  padding-bottom: 0.5rem;
}

.item-name {
  color: var(--text); /* Primary mint green for item names */
  margin: 0;
  font-size: 1.1em;
  font-weight: bold;
  font-family: 'Courier New', monospace;
}

.item-type {
  color: white;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-size: 0.8em;
  font-weight: bold;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
}

/* Item type colors - using red accents for weapons and dangerous items */
.item-type-weapon {
  background: var(--red-accent); /* Red accent for weapons */
  color: var(--bg-panel);
  text-shadow: none;
}

.item-type-armor {
  background: #708090;
}

.item-type-light {
  background: #FFA500;
  color: #000;
  text-shadow: none;
}

.item-type-food {
  background: #32CD32;
  color: #000;
  text-shadow: none;
}

.item-type-potion {
  background: #9932CC;
}

.item-type-magic {
  background: #4169E1;
}

.item-type-container {
  background: #D2691E;
}

.item-type-treasure {
  background: #DAA520;
  color: #000;
  text-shadow: none;
}

.item-type-key {
  background: #DEB887;
  color: #000;
  text-shadow: none;
}

.item-type-worn {
  background: #9370DB;
}

.item-type-wand {
  background: #8A2BE2;
}

.item-type-staff {
  background: #654321;
}

.item-type-orb {
  background: #4B0082;
}

.item-type-rod {
  background: var(--red-hover); /* Light red for rods */
  color: var(--bg-panel);
  text-shadow: none;
}

.item-type-other {
  background: #696969;
}

.item-type-note {
  background: #F5DEB3;
  color: #000;
  text-shadow: none;
}

.item-type-trash {
  background: #8B4513;
}

.item-type-drink {
  background: #00CED1;
  color: #000;
  text-shadow: none;
}

.item-type-regen {
  background: #FF1493;
}

.item-type-fountain {
  background: #00BFFF;
  color: #000;
  text-shadow: none;
}

.item-type-figurine {
  background: #DDA0DD;
  color: #000;
  text-shadow: none;
}

.item-type-trophy {
  background: #FFD700;
  color: #000;
  text-shadow: none;
}

.item-type-whistle {
  background: #C0C0C0;
  color: #000;
  text-shadow: none;
}

.item-type-money {
  background: #228B22;
}

.item-type-board {
  background: #8B4513;
}

.item-type-scabbard {
  background: #2F4F4F;
}

.item-type-manual {
  background: #CD853F;
  color: #000;
  text-shadow: none;
}

.item-type-pen {
  background: #000080;
}

.item-type-boat {
  background: #8B4513;
}

.item-type-trap {
  background: var(--red-accent); /* Red accent for traps */
  color: var(--bg-panel);
  text-shadow: none;
}

.item-type-missile {
  background: var(--red-hover); /* Light red for missiles */
  color: var(--bg-panel);
  text-shadow: none;
}

.item-type-newspaper {
  background: #DCDCDC;
  color: #000;
  text-shadow: none;
}

.item-type-jukebox {
  background: #FF69B4;
  color: #000;
  text-shadow: none;
}

.item-type-none {
  background: #A9A9A9;
  color: #000;
  text-shadow: none;
}

.item-type-default {
  background: #808080;
}

/* Weapon damage section */
.weapon-damage-section {
  margin-bottom: 0.75rem;
}

.weapon-damage-section h4 {
  color: var(--red-hover); /* Light red for damage headers */
  font-family: 'Courier New', monospace;
}

.damage-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.25rem;
}

.damage-dice {
  background: var(--red-accent); /* Red accent for damage dice */
  color: var(--bg-panel); /* Black text on red */
  padding: 0.3rem 0.6rem;
  border-radius: 0; /* Terminal style */
  font-family: 'Courier New', monospace;
  font-weight: bold;
  font-size: 0.9em;
  letter-spacing: 0.5px;
  border: 1px solid var(--red-accent);
}

.damage-range {
  color: var(--red-hover); /* Light red for damage range */
  font-family: 'Courier New', monospace;
  font-size: 0.85em;
  font-weight: bold;
}

.item-description {
  color: var(--text-muted);
  font-style: italic;
  margin-bottom: 0.75rem;
  line-height: 1.4;
  font-family: 'Courier New', monospace;
}

.item-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.25rem;
  margin-bottom: 0.75rem;
}

.item-stat {
  color: #c9b037;
  font-size: 0.9em;
}

.item-affects {
  margin-bottom: 0.75rem;
}

.affects-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.25rem;
}

.item-affect {
  background: #0a4d0a;
  color: #90ee90;
  padding: 0.2rem 0.4rem;
  border-radius: 3px;
  font-size: 0.8em;
  border: 1px solid #228b22;
}

.item-flags {
  color: #ffa500;
  font-size: 0.85em;
  margin-bottom: 0.5rem;
}

.item-vnum {
  text-align: right;
  color: #888;
  border-top: 1px solid #444;
  padding-top: 0.5rem;
}

@media (max-width: 768px) {
  .items-grid {
    grid-template-columns: 1fr;
  }
  
  .item-stats {
    grid-template-columns: 1fr;
  }
}

/* Areas page styles */
.areas-stats {
  color: var(--text); /* Primary mint green for stats */
  font-weight: bold;
  font-size: 1em;
  text-align: center;
  padding: 0.5rem 0 1rem 0;
  border-bottom: 1px solid rgba(138, 181, 169, 0.3); /* Mint border */
  margin-bottom: 1.5rem;
  font-family: 'Courier New', monospace;
}

.areas-table-container {
  overflow-x: auto;
  border: 1px solid var(--text); /* Mint green border */
  border-radius: 0; /* Terminal style */
  box-shadow: none; /* Clean terminal look */
}

.areas-table {
  width: 100%;
  /* The container draws the border, so no gap inside it. */
  margin: 0;
  border-collapse: collapse;
  background: var(--bg-panel); /* Pure black */
  color: var(--text); /* Primary mint green */
  font-size: 0.9em;
  font-family: 'Courier New', monospace;
}

.areas-table th {
  background: var(--accent-bar-bg);
  color: var(--accent-bar-fg);
  padding: 0.75rem;
  text-align: left;
  font-weight: bold;
  border-bottom: 2px solid var(--dark-mint); /* Darker mint border */
  font-family: 'Courier New', monospace;
}

.areas-table td {
  padding: 0.75rem;
  border-bottom: 1px solid var(--dark-mint); /* Darker mint border */
  vertical-align: middle;
  color: var(--text); /* Primary mint green text */
}

.areas-table tbody tr:hover {
  background: rgba(138, 181, 169, 0.1); /* Faint mint hover */
}

.area-name {
  font-weight: 500;
  color: var(--text); /* Primary mint green for area names */
}

.difficulty-badge {
  padding: 0.2rem 0.5rem;
  border-radius: 12px;
  font-size: 0.8em;
  font-weight: bold;
  color: white;
  text-align: center;
  display: inline-block;
  min-width: 60px;
}

.difficulty-0 {
  background: #28a745;
}

.difficulty-1,
.difficulty-2,
.difficulty-3 {
  background: #ffc107;
  color: #000;
}

.difficulty-4,
.difficulty-5 {
  background: var(--red-hover); /* Light red for medium-high difficulty */
  color: var(--bg-panel);
}

.difficulty-6,
.difficulty-7,
.difficulty-8,
.difficulty-9,
.difficulty-10 {
  background: var(--red-accent); /* Red accent for high difficulty */
  color: var(--bg-panel);
  font-weight: bold;
}

.area-pk-type {
  font-size: 0.85em;
  color: #666;
}

.area-created {
  font-size: 0.85em;
  color: #666;
}

/* Area detail page styles */
.area-header {
  margin-bottom: 1rem;
}

.back-link {
  color: var(--text); /* Primary mint green for back link */
  text-decoration: underline;
  font-weight: 500;
  margin-bottom: 1rem;
  display: inline-block;
  transition: color 0.1s;
  font-family: 'Courier New', monospace;
}

.back-link:hover {
  color: var(--dark-mint); /* Darker mint green on hover */
  text-decoration: underline;
}

.area-header h2 {
  margin: 0.5rem 0 0.25rem 0;
  color: var(--text); /* Primary mint green for headers */
}

.area-header .area-vnum {
  color: #666;
  font-size: 0.9em;
}

/* Area summary section */
.area-summary {
  margin-bottom: 2rem;
  padding: 1rem;
  background: rgba(139, 69, 19, 0.05);
  border: 1px solid #8b4513;
  border-radius: 8px;
}

.area-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
}

.stat-item {
  color: var(--text);
  font-size: 0.9em;
}

.stat-item strong {
  font-weight: bold;
}

.stat-item.pk-type {
  color: #666;
}

.stat-item.builders {
  color: #666;
  font-style: italic;
}

.area-story {
  background: rgba(139, 69, 19, 0.05);
  border: 1px solid #8b4513;
  border-radius: 8px;
  padding: 1.5rem;
  margin-top: 2rem;
}

.area-story h3 {
  margin-top: 0;
  margin-bottom: 1rem;
  color: var(--text-bright);
  font-size: 1.1em;
  border-bottom: 1px solid #8b4513;
  padding-bottom: 0.5rem;
}

.story-content {
  line-height: 1.6;
  color: var(--text);
}

.story-content p {
  margin-bottom: 1rem;
}

.story-content p:last-child {
  margin-bottom: 0;
}


@media (max-width: 768px) {
  .areas-table-container {
    font-size: 0.8em;
  }
  
  .areas-table th,
  .areas-table td {
    padding: 0.5rem 0.25rem;
  }
  
  .completion-bar {
    width: 80px;
    height: 16px;
  }
  
  .area-stats {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
}

.comma-separated {
  display: inline;
  list-style: none;
  padding: 0;
}

.comma-separated li {
  display: inline;
}

.comma-separated li:after {
  content: ", ";
}

.comma-separated li:last-child:after {
  content: ".";
}

.submitbut {
  background-color: #e9e9e9;
  border: 1px solid;
  border-bottom: 1px solid Gray;
  border-top: 1px solid Silver;
  border-left: 1px solid Silver;
  border-right: 1px solid Gray;
  font-size: 11px;
}

.submitbut2 {
  background-color: #e9e9e9;
  border: 1px solid Gray;
  font-size: 11px;
  font-weight: bold;
}

.mp {
  font-family: Verdana, Arial;
  font-size: 11px;
  color: #FF9900;
  font-weight: bold;
  background-color: #F7F7F7;
  border: 1px solid #CDCFD0;
  padding-top: 2px;
  padding-bottom: 2px;
  padding-left: 5px;
}

table.example-mobs-objs {
  width: 100%;
}

.example-mobs-objs td:first-child {
  vertical-align: top;
  width: 20%;
}
/* Leaderboards */
.leaderboard-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0 0 0.75rem;
}

.leaderboard-tab {
  background: var(--bg-panel);
  color: var(--text);
  border: 1px solid var(--dark-mint);
  border-radius: 0;
  padding: 0.4rem 0.8rem;
  font: inherit;
  cursor: pointer;
}

.leaderboard-tab:hover,
.leaderboard-tab:focus-visible {
  color: var(--text-bright);
  border-color: var(--text);
}

.leaderboard-tab[aria-pressed="true"] {
  background: var(--accent-bar-bg);
  color: var(--accent-bar-fg);
  border-color: var(--accent-bar-border);
}

.leaderboard-since,
.leaderboard-updated {
  color: var(--text-muted);
  font-size: 0.9em;
  min-height: 1.2em;
}

.leaderboard-table .leaderboard-rank {
  width: 3em;
}

.leaderboard-table .leaderboard-score {
  text-align: right;
}

.leaderboard-table .leaderboard-empty {
  color: var(--text-muted);
  text-align: center;
}
