* {
  box-sizing: border-box;
}

html, body {
  cursor: url("../swordcursor.cur"), auto;
}

a, button, input, select, textarea, summary {
  cursor: url("../swordcursor.cur"), pointer;
}

:root {
  --ink: #100c08;
  --parchment: #f1e6c8;
  --moss: #4f6b5f;
  --moss-dark: #25362d;
  --gold: #caa26a;
  --mist: #c4c7a3;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Courier New", Courier, monospace;
  color: var(--parchment);
  background-image: url("../images/background.gif");
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center center;
  background-attachment: fixed;
  line-height: 1.6;
  position: relative;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at top left, rgba(202, 162, 106, 0.16), transparent 30%),
    linear-gradient(135deg, rgba(16, 12, 8, 0.55), rgba(16, 12, 8, 0.28));
  pointer-events: none;
  z-index: 0;
}

body > * {
  position: relative;
  z-index: 1;
}

.page-shell {
  max-width: 860px;
  margin: 0 auto;
  padding: 2rem 1rem 3rem;
}

.card {
  background: linear-gradient(145deg, rgba(25, 34, 29, 0.9), rgba(11, 19, 18, 0.94));
  border: 2px solid var(--moss);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.05), 0 10px 24px rgba(0, 0, 0, 0.32);
  padding: 1.25rem 1.4rem;
  margin-bottom: 1rem;
  backdrop-filter: blur(2px);
  position: relative;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0.35rem;
  border: 1px solid rgba(202, 162, 106, 0.3);
  pointer-events: none;
}

.panel-title {
  display: inline-block;
  margin-bottom: 0.6rem;
  padding: 0.2rem 0.55rem;
  border: 1px solid rgba(202, 162, 106, 0.6);
  background: rgba(12, 17, 16, 0.75);
  color: var(--gold);
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.header-card {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.site-icon {
  width: 120px;
  height: auto;
  max-width: 160px;
  border: none;
  background: transparent;
  padding: 0;
  box-shadow: 0 24px 46px rgba(0, 0, 0, 0.22);
  transform: translateY(-4px);
}

.tag {
  margin: 0 0 0.2rem;
  font-size: 0.85rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #c7d8bc;
}

h1, h2 {
  margin: 0 0 0.4rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: lowercase;
}

h1 {
  font-size: 2rem;
}

h2 {
  font-size: 1.1rem;
  color: var(--gold);
}

.intro, p, li {
  font-size: 0.98rem;
}

ul {
  padding-left: 1.2rem;
  margin: 0.3rem 0 0;
}

a {
  color: #f8e9b0;
  text-decoration: none;
  border-bottom: 1px dotted #f8e9b0;
}

a:hover {
  color: #ffffff;
}

.nav-card ul {
  display: grid;
  gap: 0.4rem;
}

.quest-card ul {
  margin-top: 0.2rem;
}

.map-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
  margin-top: 0.55rem;
}

.map-node {
  padding: 0.6rem 0.7rem;
  border: 1px solid rgba(202, 162, 106, 0.45);
  background: rgba(255, 255, 255, 0.05);
  color: var(--parchment);
  text-align: center;
  text-transform: lowercase;
}

.map-node.active {
  color: var(--gold);
  border-color: var(--gold);
  box-shadow: inset 0 0 0 1px rgba(202, 162, 106, 0.25);
}

.back-link {
  display: inline-block;
  margin-top: 0.8rem;
}

.note {
  margin-top: 0.8rem;
  font-size: 0.9rem;
  color: #d7e1cc;
}

.music-miniplayer {
  position: fixed;
  bottom: 1rem;
  left: 1rem;
  padding: 0.75rem 1rem;
  background: linear-gradient(145deg, rgba(25, 34, 29, 0.95), rgba(11, 19, 18, 0.98));
  border: 1px solid rgba(202, 162, 106, 0.4);
  border-radius: 4px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  z-index: 2;
  max-width: 320px;
}

.music-miniplayer audio {
  width: 100%;
  height: 32px;
  accent-color: var(--gold);
}

.blog-audio {
  width: 100%;
  margin-top: 0.75rem;
}

.music-label {
  display: block;
  font-size: 0.75rem;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

@media (max-width: 640px) {
  .music-miniplayer {
    bottom: 0.5rem;
    left: 0.5rem;
    max-width: 280px;
    padding: 0.6rem 0.8rem;
  }

  .music-miniplayer audio {
    height: 28px;
  }
}

#rpg-status {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  display: grid;
  gap: 0.2rem;
  padding: 0.5rem 0.7rem;
  border: 1px solid rgba(202, 162, 106, 0.6);
  background: rgba(12, 17, 16, 0.7);
  color: var(--parchment);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  pointer-events: none;
  z-index: 3;
}

#swamp-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  opacity: 0.7;
}

.blog-image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
  margin: 1.2rem 0;
}

.blog-image {
  width: 100%;
  height: auto;
  border: 1px solid rgba(202, 162, 106, 0.3);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

@media (max-width: 640px) {
  .header-card {
    flex-direction: column;
    align-items: flex-start;
  }

  .site-icon {
    width: 72px;
    height: 72px;
  }

  .map-grid {
    grid-template-columns: 1fr;
  }

  .blog-image-grid {
    grid-template-columns: 1fr;
  }
}
