@font-face {
  font-family: "AaFengKuangYuanShiRen";
  src:
    url("/uploads/AaFengKuangYuanShiRen-fixed.woff?v=20260417b") format("woff"),
    url("/uploads/AaFengKuangYuanShiRen-fixed.ttf?v=20260417b") format("truetype");
  font-display: swap;
}

:root {
  --sky-1: #f4c869;
  --sky-2: #e8934a;
  --sky-3: #c8512d;
  --sand-1: #fce8b2;
  --sand-2: #e8c278;
  --sea-1: #2c6e8f;
  --sea-2: #1a4260;
  --sea-3: #0d2538;
  --red-1: #e63946;
  --red-2: #a0202a;
  --gold-1: #ffd93d;
  --gold-2: #d4a017;
  --ink: #1a0f08;
  --parchment: #fce8b2;
  --text: #2c1810;
  --grass-1: #6ab04c;
  --font-pixel-en: "Press Start 2P", "AaFengKuangYuanShiRen", monospace;
  --font-pixel-ui: "Silkscreen", "AaFengKuangYuanShiRen", monospace;
  --font-pixel-body: "AaFengKuangYuanShiRen", "VT323", monospace;
  --font-pixel-cn: "AaFengKuangYuanShiRen", "Zpix", monospace;
  --shadow-hard: 4px 4px 0 var(--ink);
  --shadow-deep: 8px 8px 0 var(--ink);
  --shadow-red: 4px 4px 0 var(--red-2);
  --shadow-gold: 4px 4px 0 var(--gold-2);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

html {
  scroll-behavior: smooth;
  background: var(--sea-3);
}

body {
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  background: var(--sea-2);
  color: var(--text);
  font-family: var(--font-pixel-body);
  font-size: 20px;
  line-height: 1.4;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0) 0,
    rgba(0, 0, 0, 0) 2px,
    rgba(0, 0, 0, 0.12) 2px,
    rgba(0, 0, 0, 0.12) 3px
  );
  pointer-events: none;
  z-index: 9999;
  mix-blend-mode: multiply;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  background: rgba(255, 220, 150, 0.02);
  pointer-events: none;
  z-index: 9998;
  animation: crt-flicker 0.15s infinite;
}

@keyframes crt-flicker {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.96; }
}

.game-frame {
  max-width: 1280px;
  min-height: 100vh;
  margin: 0 auto;
  background: var(--sand-1);
  border-left: 8px solid var(--ink);
  border-right: 8px solid var(--ink);
  position: relative;
}

.hud {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 20px;
  background: var(--sea-3);
  border-bottom: 4px solid var(--ink);
  color: var(--parchment);
  font-family: var(--font-pixel-ui);
}

.hud::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -8px;
  height: 4px;
  background: var(--red-2);
}

.hud-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.hud-logo {
  font-family: var(--font-pixel-en);
  font-size: 14px;
  color: var(--gold-1);
  letter-spacing: 1px;
  text-shadow: 2px 2px 0 var(--red-2);
}

.hud-version {
  padding: 4px 8px;
  font-size: 12px;
  color: var(--sand-2);
  background: var(--sea-2);
  border: 2px solid var(--sand-2);
}

.hud-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  font-size: 14px;
}

.hud-stat {
  display: flex;
  align-items: center;
  gap: 6px;
}

.hud-stat .label {
  color: var(--gold-1);
}

.hud-stat .value {
  color: var(--parchment);
}

.blink {
  animation: blink 1s steps(2) infinite;
}

@keyframes blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}

nav.menu {
  display: flex;
  flex-wrap: wrap;
  background: var(--sea-2);
  border-bottom: 4px solid var(--ink);
  font-family: var(--font-pixel-ui);
  font-size: 14px;
}

nav.menu a {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 16px 24px;
  color: var(--parchment);
  text-decoration: none;
  border-right: 2px solid var(--sea-3);
  transition: all 0.1s;
}

nav.menu a:hover {
  padding-left: 32px;
  background: var(--gold-1);
  color: var(--ink);
}

nav.menu a:hover::before {
  content: "►";
  position: absolute;
  left: 8px;
  animation: blink 0.5s steps(2) infinite;
}

.title-screen {
  position: relative;
  overflow: hidden;
  min-height: 640px;
  padding: 60px 40px 120px;
  background:
    linear-gradient(
      to bottom,
      var(--sea-3) 0%,
      var(--sea-2) 25%,
      var(--sea-1) 50%,
      var(--sky-2) 70%,
      var(--sky-1) 85%,
      var(--sand-2) 100%
    );
}

.star {
  position: absolute;
  width: 4px;
  height: 4px;
  background: var(--parchment);
}

.star.big {
  width: 8px;
  height: 4px;
  background: var(--gold-1);
}

.star.big::before {
  content: "";
  position: absolute;
  left: 2px;
  top: -2px;
  width: 4px;
  height: 8px;
  background: var(--gold-1);
}

.cloud {
  position: absolute;
  opacity: 0.9;
  animation: cloud-drift 60s linear infinite;
}

@keyframes cloud-drift {
  from { transform: translateX(-100px); }
  to { transform: translateX(calc(100vw + 100px)); }
}

.pixel-sun {
  position: absolute;
  top: 80px;
  right: 80px;
  width: 120px;
  height: 120px;
}

.pixel-sun svg {
  animation: sun-pulse 3s ease-in-out infinite;
}

@keyframes sun-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

.waves {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 80px;
  background: repeating-linear-gradient(
    90deg,
    var(--sea-1) 0, var(--sea-1) 16px,
    var(--sea-2) 16px, var(--sea-2) 32px
  );
  border-top: 4px solid var(--ink);
}

.waves::before {
  content: "";
  position: absolute;
  top: -12px;
  left: 0;
  right: 0;
  height: 12px;
  background:
    linear-gradient(
      90deg,
      transparent 0, transparent 8px,
      var(--sea-1) 8px, var(--sea-1) 16px,
      transparent 16px, transparent 24px,
      var(--sea-1) 24px, var(--sea-1) 32px
    );
  background-size: 32px 12px;
}

.title-content {
  position: relative;
  z-index: 5;
  text-align: center;
  padding-top: 20px;
}

.title-label {
  display: inline-block;
  margin-bottom: 24px;
  padding: 8px 16px;
  border: 2px solid var(--gold-1);
  background: var(--ink);
  color: var(--gold-1);
  font-family: var(--font-pixel-en);
  font-size: 10px;
  letter-spacing: 2px;
}

.title-main {
  margin-bottom: 16px;
  color: var(--gold-1);
  font-family: var(--font-pixel-en);
  font-size: clamp(28px, 6vw, 64px);
  line-height: 1.2;
  letter-spacing: 2px;
  text-shadow:
    4px 0 0 var(--red-2),
    0 4px 0 var(--red-2),
    4px 4px 0 var(--red-2),
    8px 8px 0 var(--ink);
}

.title-sub {
  margin-bottom: 40px;
  color: var(--parchment);
  font-family: var(--font-pixel-en);
  font-size: clamp(12px, 2vw, 18px);
  letter-spacing: 3px;
  text-shadow: 2px 2px 0 var(--ink);
}

.title-chinese {
  display: inline-block;
  margin-bottom: 36px;
  padding: 10px 22px;
  border: 4px solid var(--ink);
  background: var(--gold-1);
  box-shadow: var(--shadow-hard);
  color: var(--ink);
  font-family: var(--font-pixel-cn);
  font-size: 22px;
  letter-spacing: 4px;
}

.title-desc {
  max-width: 700px;
  margin: 0 auto 40px;
  color: var(--parchment);
  font-size: 22px;
  line-height: 1.5;
  text-shadow: 2px 2px 0 var(--ink);
}

.press-start {
  display: inline-block;
  padding: 20px 32px;
  border: 4px solid var(--ink);
  background: var(--red-1);
  box-shadow: var(--shadow-deep);
  color: var(--parchment);
  cursor: pointer;
  font-family: var(--font-pixel-en);
  font-size: 14px;
  letter-spacing: 3px;
  text-decoration: none;
  transition: all 0.1s;
  animation: btn-pulse 2s ease-in-out infinite;
}

.press-start:hover {
  background: var(--gold-1);
  box-shadow: 4px 4px 0 var(--ink);
  color: var(--ink);
  transform: translate(2px, 2px);
  animation: none;
}

@keyframes btn-pulse {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(0, -4px); }
}

.section {
  position: relative;
  padding: 60px 40px;
}

.section-banner {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 40px;
  padding: 16px 20px;
  border: 4px solid var(--ink);
  background: var(--ink);
  box-shadow: var(--shadow-red);
  color: var(--parchment);
  font-family: var(--font-pixel-en);
}

.section-banner-wide {
  max-width: 1000px;
  margin: 0 auto 40px;
}

.section-icon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 2px solid var(--parchment);
  background: var(--gold-1);
  color: var(--ink);
  font-size: 16px;
}

.section-title {
  color: var(--gold-1);
  font-size: 18px;
  letter-spacing: 2px;
}

.section-cn {
  margin-left: auto;
  color: var(--sand-2);
  font-family: var(--font-pixel-cn);
  font-size: 18px;
  letter-spacing: 3px;
}

.quest-log {
  background: var(--sand-1);
}

.quests {
  display: grid;
  gap: 24px;
}

.quests-featured {
  display: grid;
  gap: 24px;
}

.quests-columns {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  align-items: start;
}

.quests-column {
  display: flex;
  flex-direction: column;
  gap: 24px;
  min-width: 0;
}

.quest {
  display: flex;
  flex-direction: column;
  padding: 20px;
  border: 4px solid var(--ink);
  background: var(--parchment);
  box-shadow: var(--shadow-hard);
  color: var(--text);
  transition: all 0.1s;
}

.quest:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 var(--ink);
}

.quest.featured {
  min-height: 360px;
  background: var(--sea-3);
  color: var(--parchment);
}

.quest.featured:hover {
  box-shadow: 6px 6px 0 var(--gold-1);
}

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

.quest-tag {
  padding: 4px 8px;
  border: 2px solid var(--ink);
  background: var(--red-1);
  color: var(--parchment);
  font-family: var(--font-pixel-en);
  font-size: 9px;
  letter-spacing: 1px;
}

.quest-tag.legendary {
  background: var(--gold-1);
  color: var(--ink);
}

.quest-tag.rare {
  background: var(--sea-1);
}

.quest-tag.common {
  background: var(--grass-1);
}

.quest-level {
  color: var(--red-2);
  font-family: var(--font-pixel-en);
  font-size: 10px;
}

.quest.featured .quest-level {
  color: var(--gold-1);
}

.quest-title {
  margin-bottom: 16px;
  font-family: var(--font-pixel-en);
  font-size: 15px;
  line-height: 1.5;
}

.quest-cover {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  margin-bottom: 16px;
  border: 4px solid var(--ink);
  background: rgba(255, 255, 255, 0.2);
}

.quest.featured .quest-title {
  font-size: 20px;
  line-height: 1.4;
}

.quest-desc {
  margin-bottom: 20px;
  color: currentColor;
  font-size: 20px;
  line-height: 1.4;
}

.quest-list {
  list-style: none;
  display: grid;
  gap: 10px;
  margin-bottom: 20px;
}

.quest-list li {
  position: relative;
  padding-left: 18px;
  font-size: 20px;
  line-height: 1.45;
}

.quest-list li::before {
  content: "▸";
  position: absolute;
  left: 0;
  color: currentColor;
}

.quest-note {
  margin-top: auto;
  padding-top: 14px;
  border-top: 2px dashed currentColor;
  font-size: 18px;
  line-height: 1.4;
  opacity: 0.85;
}

.quest-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 12px;
  border-top: 2px dashed currentColor;
  font-family: var(--font-pixel-ui);
  font-size: 12px;
}

.quest-meta {
  opacity: 0.75;
}

.quest-xp {
  color: var(--red-1);
  font-weight: bold;
}

.quest.featured .quest-xp {
  color: var(--gold-1);
}

.quest a {
  color: var(--red-2);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
  text-decoration-color: currentColor;
  font-weight: bold;
  cursor: pointer;
  transition: color 0.1s, text-decoration-color 0.1s, background-size 0.1s;
}

.quest a:hover {
  color: var(--red-1);
  text-decoration-color: var(--gold-1);
}

.quest.featured a:hover {
  color: var(--gold-1);
}

.captain-sheet {
  position: relative;
  padding: 60px 40px;
  background: var(--sea-2);
  color: var(--parchment);
}

.captain-sheet::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 8px;
  background: repeating-linear-gradient(
    90deg,
    var(--gold-1) 0, var(--gold-1) 16px,
    var(--ink) 16px, var(--ink) 32px
  );
}

.captain-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 32px;
  max-width: 1000px;
  margin: 0 auto;
  align-items: start;
}

.captain-portrait-box {
  padding: 16px;
  border: 4px solid var(--ink);
  background: var(--sand-1);
  box-shadow: var(--shadow-gold);
  align-self: start;
}

.captain-portrait {
  width: 100%;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 4px solid var(--ink);
  background: linear-gradient(to bottom, var(--sea-1) 0%, var(--sea-1) 70%, var(--sand-2) 70%, var(--sand-2) 100%);
}

.captain-portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  image-rendering: auto;
}

@keyframes sprite-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

.captain-name {
  margin-top: 12px;
  padding: 8px;
  border: 2px solid var(--ink);
  background: var(--parchment);
  color: var(--red-2);
  font-family: var(--font-pixel-en);
  font-size: 11px;
  letter-spacing: 1px;
  text-align: center;
}

.captain-dialog {
  position: relative;
  margin-bottom: 24px;
  padding: 20px 24px;
  border: 4px solid var(--ink);
  background: var(--parchment);
  box-shadow: var(--shadow-hard);
  color: var(--ink);
  font-size: 22px;
  line-height: 1.5;
}

.captain-dialog::before {
  content: "";
  position: absolute;
  top: -20px;
  left: 32px;
  border: 10px solid transparent;
  border-bottom-color: var(--ink);
}

.captain-dialog::after {
  content: "";
  position: absolute;
  top: -12px;
  left: 36px;
  border: 6px solid transparent;
  border-bottom-color: var(--parchment);
}

.dialog-name {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  color: var(--red-2);
  font-family: var(--font-pixel-en);
  font-size: 12px;
  letter-spacing: 1px;
}

.dialog-name::before {
  content: "◼";
  color: var(--gold-2);
}

.dialog-text-cn {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 2px dashed var(--ink);
  opacity: 0.85;
  font-family: var(--font-pixel-cn);
  font-size: 16px;
  line-height: 1.7;
}

.fact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
}

.fact-card {
  padding: 14px;
  border: 4px solid var(--ink);
  background: var(--sea-3);
  box-shadow: var(--shadow-hard);
}

.fact-card.wide {
  grid-column: span 2;
}

.fact-label {
  margin-bottom: 8px;
  color: var(--gold-1);
  font-family: var(--font-pixel-ui);
  font-size: 11px;
  letter-spacing: 1px;
}

.fact-value {
  color: var(--parchment);
  font-size: 22px;
  line-height: 1.35;
  word-break: break-word;
}

.fact-value a {
  color: var(--gold-1);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
  font-weight: bold;
  cursor: pointer;
}

.fact-value a:hover {
  color: #fff0b3;
  text-decoration-color: var(--red-1);
}

.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.stat-row {
  padding: 12px 14px;
  border: 4px solid var(--ink);
  background: var(--sea-3);
  font-family: var(--font-pixel-ui);
}

.stat-name {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  color: var(--gold-1);
  font-size: 11px;
  letter-spacing: 1px;
}

.stat-val {
  color: var(--parchment);
  font-size: 10px;
}

.stat-bar {
  width: 100%;
  height: 12px;
  overflow: hidden;
  position: relative;
  border: 2px solid var(--parchment);
  background: var(--ink);
}

.stat-bar-fill {
  height: 100%;
  background: repeating-linear-gradient(
    90deg,
    var(--red-1) 0, var(--red-1) 4px,
    var(--red-2) 4px, var(--red-2) 8px
  );
}

.stat-bar-fill.mp {
  background: repeating-linear-gradient(
    90deg,
    var(--sea-1) 0, var(--sea-1) 4px,
    var(--sea-2) 4px, var(--sea-2) 8px
  );
}

.stat-bar-fill.xp {
  background: repeating-linear-gradient(
    90deg,
    var(--gold-1) 0, var(--gold-1) 4px,
    var(--gold-2) 4px, var(--gold-2) 8px
  );
}

.world-map {
  padding: 60px 40px;
  background: var(--sand-1);
}

.map-grid {
  padding: 40px 24px;
  border: 4px solid var(--ink);
  background:
    linear-gradient(var(--sand-2) 2px, transparent 2px) 0 0 / 32px 32px,
    linear-gradient(90deg, var(--sand-2) 2px, transparent 2px) 0 0 / 32px 32px,
    var(--sand-1);
  box-shadow: var(--shadow-hard);
}

.map-path {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.map-point {
  position: relative;
  display: grid;
  grid-template-columns: 80px 1fr auto;
  align-items: center;
  gap: 20px;
  padding: 16px 20px;
  border: 4px solid var(--ink);
  background: var(--parchment);
  box-shadow: var(--shadow-hard);
}

.map-point::after {
  content: "";
  position: absolute;
  left: 60px;
  bottom: -32px;
  width: 4px;
  height: 28px;
  background: var(--ink);
}

.map-point:last-child::after {
  display: none;
}

.map-icon {
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 4px solid var(--ink);
  background: var(--sea-1);
  color: var(--gold-1);
  font-family: var(--font-pixel-en);
  font-size: 24px;
}

.map-icon.completed {
  background: var(--grass-1);
  color: var(--parchment);
}

.map-icon.current {
  background: var(--red-1);
  animation: current-pulse 1s steps(2) infinite;
}

@keyframes current-pulse {
  0%, 50% { background: var(--red-1); color: var(--gold-1); }
  51%, 100% { background: var(--gold-1); color: var(--red-1); }
}

.map-info h4 {
  margin-bottom: 8px;
  color: var(--red-2);
  font-family: var(--font-pixel-en);
  font-size: 13px;
  letter-spacing: 1px;
  line-height: 1.3;
}

.map-info p {
  color: var(--ink);
  font-size: 19px;
}

.map-date {
  padding: 8px 12px;
  border: 2px solid var(--ink);
  background: var(--ink);
  color: var(--parchment);
  font-family: var(--font-pixel-ui);
  font-size: 12px;
  letter-spacing: 1px;
  white-space: nowrap;
}

.save-screen {
  position: relative;
  padding: 80px 40px;
  background: var(--sea-3);
  color: var(--parchment);
  text-align: center;
}

.save-screen::before,
.save-screen::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 8px;
  background: repeating-linear-gradient(
    90deg,
    var(--red-1) 0, var(--red-1) 16px,
    var(--ink) 16px, var(--ink) 32px
  );
}

.save-screen::before { top: 0; }
.save-screen::after { bottom: 0; }

.save-icon {
  margin-bottom: 16px;
  color: var(--gold-1);
  font-family: var(--font-pixel-en);
  font-size: 24px;
}

.save-title {
  margin-bottom: 16px;
  color: var(--parchment);
  font-family: var(--font-pixel-en);
  font-size: clamp(20px, 4vw, 32px);
  letter-spacing: 2px;
  text-shadow: 4px 4px 0 var(--red-2);
}

.save-desc {
  max-width: 620px;
  margin: 0 auto 32px;
  color: var(--sand-2);
  font-size: 22px;
}

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  margin-bottom: 22px;
}

.contact-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 22px;
  border: 4px solid var(--ink);
  background: var(--parchment);
  box-shadow: var(--shadow-hard);
  color: var(--ink);
  font-family: var(--font-pixel-ui);
  font-size: 12px;
  text-decoration: none;
  transition: all 0.1s;
  cursor: pointer;
}

.contact-link:hover {
  background: var(--gold-1);
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 var(--ink);
}

.save-mini {
  max-width: 700px;
  margin: 0 auto;
  color: var(--parchment);
  font-size: 20px;
  line-height: 1.45;
  opacity: 0.9;
}

footer {
  padding: 40px 40px 24px;
  border-top: 4px solid var(--red-2);
  background: var(--ink);
  color: var(--parchment);
  font-family: var(--font-pixel-ui);
}

.footer-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 16px;
  padding-bottom: 24px;
  border-bottom: 2px dashed var(--sand-2);
}

.footer-logo {
  margin-bottom: 12px;
  color: var(--gold-1);
  font-family: var(--font-pixel-en);
  font-size: 16px;
  letter-spacing: 1px;
}

.footer-brand p {
  max-width: 320px;
  color: var(--sand-2);
  font-size: 18px;
  line-height: 1.5;
}

.footer-col h5 {
  margin-bottom: 12px;
  color: var(--red-1);
  font-family: var(--font-pixel-en);
  font-size: 10px;
  letter-spacing: 2px;
}

.footer-col ul {
  list-style: none;
  font-size: 14px;
}

.footer-col li {
  margin-bottom: 8px;
}

.footer-col a {
  color: var(--parchment);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
  cursor: pointer;
}

.footer-col a:hover {
  color: var(--gold-1);
}

.footer-col a::before {
  content: "►";
  color: var(--red-1);
}

.quest a[target="_blank"]::after,
.fact-value a[target="_blank"]::after,
.footer-col a[target="_blank"]::after,
.contact-link.external-link::after {
  content: "↗";
  margin-left: 6px;
  font-size: 0.9em;
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  color: var(--sand-2);
  font-size: 12px;
}

.copyright-blink {
  color: var(--gold-1);
  animation: blink 1.5s steps(2) infinite;
}

.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.4s steps(4);
}

.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

@keyframes hue-shift {
  0%, 100% { filter: hue-rotate(0deg); }
  25% { filter: hue-rotate(90deg); }
  50% { filter: hue-rotate(180deg); }
  75% { filter: hue-rotate(270deg); }
}

@media (max-width: 1320px) {
  .quests-columns {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .game-frame {
    border-left-width: 4px;
    border-right-width: 4px;
  }

  .hud {
    flex-direction: column;
    padding: 12px;
  }

  .hud-stats {
    justify-content: center;
    gap: 12px;
    font-size: 11px;
  }

  nav.menu a {
    flex: 1;
    min-width: 33%;
    justify-content: center;
    padding: 12px 14px;
    font-size: 11px;
    text-align: center;
  }

  nav.menu a:hover {
    padding-left: 14px;
  }

  nav.menu a:hover::before {
    display: none;
  }

  .title-screen {
    min-height: 500px;
    padding: 40px 20px 100px;
  }

  .pixel-sun {
    top: 20px;
    right: 20px;
    width: 70px;
    height: 70px;
  }

  .title-main {
    text-shadow:
      2px 0 0 var(--red-2),
      0 2px 0 var(--red-2),
      2px 2px 0 var(--red-2),
      4px 4px 0 var(--ink);
  }

  .section,
  .captain-sheet,
  .world-map,
  .save-screen,
  footer {
    padding-left: 20px;
    padding-right: 20px;
  }

  .section-banner {
    flex-wrap: wrap;
  }

  .section-cn {
    width: 100%;
    margin-left: 0;
  }

  .quests {
    gap: 20px;
  }

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

  .quest.featured {
    min-height: 0;
  }

  .captain-layout,
  .fact-grid,
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .fact-card.wide {
    grid-column: auto;
  }

  .map-grid {
    padding: 24px 12px;
  }

  .map-point {
    grid-template-columns: 56px 1fr;
    padding: 12px;
  }

  .map-date {
    grid-column: 1 / -1;
    justify-self: start;
    margin-top: 8px;
    font-size: 10px;
  }

  .map-icon {
    width: 48px;
    height: 48px;
    font-size: 18px;
  }

  .map-point::after {
    left: 44px;
    bottom: -28px;
    height: 24px;
  }

  .contact-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .contact-link {
    justify-content: center;
  }

  .footer-top {
    grid-template-columns: 1fr 1fr;
    gap: 20px;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
}
