:root {
  --pixel: "Press Start 2P", monospace;
  --body: "VT323", monospace;
  --plum: #2c1f33;
  --plum-deep: #1b1220;
  --plum-soft: #44344f;
  --sand: #b9a38b;
  --sand-light: #e4d6c5;
  --sand-dark: #8f7861;
  --wine: #3e000c;
  --wine-soft: #5a0a18;
  --navy: #002147;
  --navy-soft: #073666;
  --navy-deep: #00162f;
  --sky-top: #e0d1be;
  --sky-bottom: #b9a38b;
  --hero-ink: #2c1f33;
  --hero-soft: #46344d;
  --bg: #1b1220;
  --bg-2: #2c1f33;
  --panel: #2c1f33;
  --panel-2: #3d2c48;
  --panel-3: #170f1d;
  --line: #100913;
  --line-soft: #6b5564;
  --text: #f1e6d7;
  --muted: #cbb9a4;
  --accent: #b9a38b;
  --accent-dark: #8f7861;
  --accent-ink: #2c1f33;
  --gold: #e2c79c;
  --grass: #b9a38b;
  --dirt: #4a2b38;
  --danger: #b24358;
  --shadow: 0 6px 0 var(--line);
  --ease: cubic-bezier(.2, .8, .2, 1);
}

body[data-theme="night"] {
  --sky-top: #00162f;
  --sky-bottom: #2c1f33;
  --hero-ink: #f1e6d7;
  --hero-soft: #cebba5;
  --bg: #0d0912;
  --bg-2: #1b1220;
  --panel: #251a2c;
  --panel-2: #332440;
  --panel-3: #130c18;
  --line: #07040a;
  --line-soft: #5a4553;
  --text: #f4eadc;
  --muted: #b9a38b;
  --accent: #d8c3aa;
  --accent-dark: #b9a38b;
  --accent-ink: #2c1f33;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 92px;
}

body {
  margin: 0;
  background:
    linear-gradient(rgba(185, 163, 139, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(185, 163, 139, 0.045) 1px, transparent 1px),
    radial-gradient(circle at 18% 0%, rgba(0, 33, 71, 0.38), transparent 42%),
    var(--bg);
  background-size: 32px 32px, 32px 32px, 100% 100%, 100% 100%;
  color: var(--text);
  font-family: var(--body);
  font-size: 22px;
  line-height: 1.42;
  overflow-x: hidden;
  transition: background-color .35s ease, color .35s ease;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
}

:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 100;
  transform: translateY(-200%);
  background: var(--sand-light);
  color: var(--plum);
  font-family: var(--pixel);
  font-size: 10px;
  padding: 12px 16px;
  text-decoration: none;
  border: 3px solid var(--line);
}

.skip-link:focus {
  transform: none;
}

.topbar {
  position: fixed;
  z-index: 50;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px clamp(16px, 4vw, 40px);
  background: linear-gradient(180deg, rgba(27, 18, 32, 0.96), rgba(27, 18, 32, 0.78));
  border-bottom: 3px solid rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(10px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--sand-light);
  font-family: var(--pixel);
  font-size: 10px;
  text-decoration: none;
  text-shadow: 2px 2px 0 var(--line);
}

.brand-head {
  width: 38px;
  height: 38px;
  image-rendering: pixelated;
  border: 3px solid var(--line);
  box-shadow: 0 3px 0 var(--line);
  background: linear-gradient(135deg, var(--navy-soft), var(--wine));
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pixel-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 12px 18px;
  border: 3px solid var(--line);
  background: linear-gradient(180deg, var(--sand-light), var(--sand));
  color: var(--accent-ink);
  font-family: var(--pixel);
  font-size: 10px;
  line-height: 1.3;
  letter-spacing: 0.02em;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 5px 0 var(--line);
  transition: transform .12s ease, box-shadow .12s ease, filter .2s ease;
}

.pixel-btn:hover,
.pixel-btn:focus-visible {
  filter: brightness(1.08);
  transform: translateY(-2px);
  box-shadow: 0 7px 0 var(--line);
}

.pixel-btn:active {
  transform: translateY(3px);
  box-shadow: 0 2px 0 var(--line);
}

.pixel-btn--small {
  min-height: 36px;
  padding: 8px 12px;
  font-size: 8px;
}

.pixel-btn--ghost {
  background: transparent;
  color: var(--text);
}

.pixel-btn--ghost:hover,
.pixel-btn--ghost:focus-visible {
  background: rgba(255, 255, 255, 0.08);
}

.hero {
  position: relative;
  min-height: 100svh;
  overflow: hidden;
  isolation: isolate;
  padding: 132px clamp(16px, 5vw, 72px) 124px;
  background:
    radial-gradient(circle at 78% 16%, rgba(228, 214, 197, 0.72), transparent 28%),
    linear-gradient(180deg, var(--sky-top) 0%, var(--sky-bottom) 64%, var(--sand-dark) 100%);
  color: var(--hero-ink);
  transition: background .5s ease, color .5s ease;
}

body[data-theme="night"] .hero {
  background:
    radial-gradient(circle at 78% 16%, rgba(185, 163, 139, 0.16), transparent 30%),
    linear-gradient(180deg, var(--sky-top) 0%, var(--navy) 36%, var(--sky-bottom) 100%);
}

.sky {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.sun,
.moon {
  position: absolute;
  top: 12%;
  right: 11%;
  width: clamp(54px, 7vw, 86px);
  height: clamp(54px, 7vw, 86px);
  border: 4px solid var(--sand-light);
  background: var(--gold);
  box-shadow:
    0 0 0 7px rgba(226, 199, 156, 0.24),
    0 0 60px rgba(226, 199, 156, 0.62);
}

.moon {
  display: none;
  border-color: var(--sand-light);
  background: var(--sand-light);
  box-shadow:
    0 0 0 7px rgba(228, 214, 197, 0.14),
    0 0 50px rgba(228, 214, 197, 0.42);
}

body[data-theme="night"] .sun {
  display: none;
}

body[data-theme="night"] .moon {
  display: block;
}

.stars {
  position: absolute;
  inset: 0;
  opacity: 0;
  background-image:
    radial-gradient(var(--sand-light) 1.5px, transparent 1.5px),
    radial-gradient(var(--sand) 1px, transparent 1px),
    radial-gradient(var(--sand-light) 1px, transparent 1px);
  background-position: 12% 18%, 42% 9%, 73% 26%;
  background-size: 110px 110px, 170px 170px, 230px 230px;
  transition: opacity .5s ease;
}

body[data-theme="night"] .stars {
  opacity: .72;
}

.cloud {
  position: absolute;
  width: 96px;
  height: 28px;
  background: var(--sand-light);
  opacity: .82;
  box-shadow:
    30px -16px 0 var(--sand-light),
    60px 0 0 var(--sand-light),
    30px 16px 0 var(--sand-light);
  filter: drop-shadow(0 8px 0 rgba(62, 0, 12, 0.1));
  animation: drift 68s linear infinite;
}

.cloud--one {
  top: 23%;
  left: -18%;
  animation-duration: 72s;
}

.cloud--two {
  top: 38%;
  left: -35%;
  transform: scale(.72);
  opacity: .65;
  animation-duration: 92s;
  animation-delay: -28s;
}

.cloud--three {
  top: 15%;
  left: 18%;
  transform: scale(.48);
  opacity: .55;
  animation-duration: 110s;
  animation-delay: -60s;
}

@keyframes drift {
  from {
    translate: -20vw 0;
  }
  to {
    translate: 125vw 0;
  }
}

.hero-inner {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(300px, .92fr);
  align-items: center;
  gap: clamp(24px, 5vw, 70px);
  width: min(1180px, 100%);
  margin: 0 auto;
}

.kicker {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 18px;
  font-family: var(--pixel);
  font-size: clamp(8px, 1vw, 10px);
  line-height: 1.6;
  letter-spacing: 0.04em;
  color: var(--hero-soft);
  text-transform: uppercase;
}

.status-dot {
  width: 9px;
  height: 9px;
  flex: 0 0 auto;
  background: var(--wine-soft);
  box-shadow: 0 0 0 3px rgba(62, 0, 12, 0.16);
  animation: blink 2.4s steps(2, end) infinite;
}

@keyframes blink {
  0%, 60% { opacity: 1; }
  61%, 100% { opacity: .35; }
}

.hero h1 {
  margin: 0;
  font-family: var(--pixel);
  font-size: clamp(2rem, 5.2vw, 4.35rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
  text-shadow:
    4px 4px 0 rgba(228, 214, 197, 0.6),
    7px 7px 0 rgba(62, 0, 12, 0.14);
}

body[data-theme="night"] .hero h1 {
  text-shadow:
    4px 4px 0 rgba(0, 0, 0, 0.5),
    0 0 28px rgba(185, 163, 139, 0.16);
}

.hero-tagline {
  max-width: 570px;
  margin: 26px 0 30px;
  font-size: clamp(22px, 2.5vw, 29px);
  line-height: 1.32;
  color: var(--hero-soft);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero .pixel-btn--ghost {
  color: var(--hero-ink);
}

.hero .pixel-btn--ghost:hover,
.hero .pixel-btn--ghost:focus-visible {
  background: rgba(44, 31, 51, 0.14);
}

.quick-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  margin: 42px 0 0;
  padding: 0;
  list-style: none;
}

.quick-stats li {
  padding-left: 12px;
  border-left: 3px solid rgba(44, 31, 51, 0.28);
  font-size: 21px;
  line-height: 1.2;
  color: var(--hero-soft);
}

body[data-theme="night"] .quick-stats li {
  border-left-color: rgba(185, 163, 139, 0.32);
}

.quick-stats span {
  display: block;
  margin-bottom: 5px;
  font-family: var(--pixel);
  font-size: 7px;
  color: var(--hero-ink);
}

.hero-stage {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  min-height: clamp(430px, 52vw, 610px);
  padding-bottom: 44px;
}

.hero-stage::after {
  content: "";
  position: absolute;
  z-index: 0;
  bottom: 30px;
  left: 50%;
  width: clamp(160px, 18vw, 240px);
  height: 22px;
  translate: -50% 0;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(44, 31, 51, 0.34), transparent 68%);
  pointer-events: none;
}

.nametag {
  position: relative;
  z-index: 4;
  margin-bottom: -4px;
  padding: 7px 10px;
  border: 3px solid var(--line);
  background: rgba(27, 18, 32, 0.82);
  color: var(--sand-light);
  font-family: var(--pixel);
  font-size: 8px;
  line-height: 1.4;
  text-shadow: 2px 2px 0 var(--line);
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.4);
}

.character-stack {
  position: relative;
  display: block;
  animation: bob 4.2s ease-in-out infinite;
}

.character {
  position: relative;
  z-index: 2;
  display: block;
  width: auto;
  height: clamp(340px, 44vw, 530px);
  image-rendering: pixelated;
  filter: drop-shadow(0 18px 0 rgba(44, 31, 51, 0.18));
  transition: filter .2s ease;
}

.skin-viewer {
  display: none;
  width: clamp(230px, 27vw, 350px);
  height: clamp(340px, 44vw, 530px);
}

.character-stack.is-3d .character {
  display: none;
}

.character-stack.is-3d .skin-viewer {
  display: block;
}

.skin-viewer canvas {
  display: block;
  width: 100%;
  height: 100%;
  cursor: grab;
  touch-action: none;
}

.skin-viewer canvas:active {
  cursor: grabbing;
}

.spin-hint {
  display: none;
  margin-top: 10px;
  color: var(--accent);
  font-family: var(--pixel);
  font-size: 5px;
  line-height: 1.6;
  letter-spacing: .08em;
  text-shadow: 2px 2px 0 var(--line);
}

.character-stack.is-3d + .spin-hint {
  display: block;
}

.character-button {
  position: relative;
  z-index: 2;
  display: block;
  padding: 0;
  border: 0;
  background: none;
  line-height: 0;
  cursor: pointer;
}

.character-button:hover .character,
.character-button:focus-visible .character,
.character-button:hover .skin-viewer canvas,
.character-button:focus-visible .skin-viewer canvas {
  filter:
    drop-shadow(0 18px 0 rgba(44, 31, 51, 0.18))
    drop-shadow(0 0 12px var(--sand-light));
}

.character-button:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 8px;
}

.nametag-sub {
  display: block;
  margin-top: 4px;
  color: var(--accent);
  font-size: 5px;
  line-height: 1.5;
  letter-spacing: .04em;
}

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

.terrain {
  position: absolute;
  z-index: 1;
  inset: auto 0 0;
  display: flex;
  align-items: flex-end;
  height: min(24vh, 220px);
  overflow: hidden;
  pointer-events: none;
  opacity: .98;
}

.column {
  display: flex;
  flex: 0 0 clamp(22px, 3vw, 40px);
  flex-direction: column;
}

.block {
  width: 100%;
  height: clamp(22px, 3vw, 40px);
  border: 1px solid rgba(16, 9, 19, 0.3);
}

.block--grass {
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.14) 2px, transparent 2px),
    linear-gradient(var(--sand) 0 34%, var(--wine) 34% 56%, var(--plum-soft) 56% 100%);
  background-size: 10px 10px, 100% 100%;
}

.block--dirt {
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.16) 2px, transparent 2px),
    linear-gradient(rgba(0, 0, 0, 0.16) 2px, transparent 2px),
    var(--wine);
  background-size: 10px 10px, 10px 10px, 100% 100%;
}

.block--stone {
  background:
    linear-gradient(90deg, rgba(228, 214, 197, 0.1) 2px, transparent 2px),
    linear-gradient(rgba(0, 0, 0, 0.14) 2px, transparent 2px),
    var(--navy);
  background-size: 10px 10px, 10px 10px, 100% 100%;
}

.scroll-cue {
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: 104px;
  translate: -50% 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 3px solid rgba(44, 31, 51, 0.55);
  background: rgba(228, 214, 197, 0.42);
  color: var(--hero-ink);
  font-family: var(--pixel);
  font-size: 7px;
  text-decoration: none;
  backdrop-filter: blur(5px);
}

.scroll-cue span {
  animation: nudge 1.8s steps(2, end) infinite;
}

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

.section {
  position: relative;
  width: min(1200px, 100%);
  margin: 0 auto;
  padding: clamp(72px, 9vw, 120px) clamp(16px, 5vw, 40px);
}

.section-head {
  margin-bottom: clamp(28px, 4vw, 46px);
}

.section-head .kicker {
  color: var(--accent);
}

.section-head h2 {
  margin: 0;
  font-family: var(--pixel);
  font-size: clamp(1.35rem, 3.2vw, 2.4rem);
  line-height: 1.3;
  color: var(--text);
  text-shadow: 3px 3px 0 var(--line);
}

.panel {
  border: 4px solid var(--line);
  background:
    linear-gradient(135deg, rgba(185, 163, 139, 0.09), transparent 44%),
    linear-gradient(180deg, var(--panel-2), var(--panel));
  box-shadow: var(--shadow), inset 0 0 0 2px rgba(228, 214, 197, 0.04);
}

.panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 3px solid var(--line);
  color: var(--accent);
  font-family: var(--pixel);
  font-size: 8px;
  line-height: 1.5;
}

.panel-dots {
  color: var(--line-soft);
  letter-spacing: 3px;
}

.prose {
  padding: clamp(20px, 3vw, 32px);
}

.prose p {
  margin: 0 0 18px;
  color: var(--text);
  font-size: clamp(20px, 2.4vw, 24px);
  line-height: 1.42;
}

.prose p:last-of-type {
  margin-bottom: 0;
}

.prose strong {
  color: var(--accent);
  font-weight: 400;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
}

.tag {
  display: inline-block;
  padding: 5px 8px;
  border: 2px solid var(--line-soft);
  background: linear-gradient(135deg, rgba(185, 163, 139, 0.12), rgba(0, 33, 71, 0.16));
  color: var(--muted);
  font-family: var(--pixel);
  font-size: 7px;
  line-height: 1.5;
}

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(270px, .8fr);
  gap: clamp(18px, 3vw, 28px);
  align-items: start;
}

.stats-card {
  padding: clamp(20px, 3vw, 28px);
}

.stats-list {
  display: grid;
  gap: 0;
  margin: 0;
}

.stats-list > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 2px dashed rgba(255, 255, 255, 0.1);
}

.stats-list > div:last-child {
  border-bottom: 0;
}

.stats-list dt {
  color: var(--muted);
  font-family: var(--pixel);
  font-size: 7px;
  line-height: 1.5;
}

.stats-list dd {
  margin: 0;
  color: var(--text);
  font-size: 20px;
  text-align: right;
  line-height: 1.2;
}

.online {
  color: var(--accent);
}

.skills-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, .8fr);
  gap: clamp(18px, 3vw, 28px);
  align-items: start;
}

.inventory {
  padding: clamp(18px, 2.8vw, 28px);
}

.inv-grid {
  display: grid;
  grid-template-columns: repeat(9, minmax(0, 1fr));
  gap: 5px;
}

.slot {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  min-width: 0;
  padding: 0;
  border: 2px solid #5b4655;
  background:
    linear-gradient(135deg, rgba(228, 214, 197, 0.08), transparent 48%),
    linear-gradient(315deg, var(--navy-deep), var(--plum-deep));
  box-shadow:
    inset 0 0 0 2px rgba(0, 0, 0, 0.32),
    inset 0 -3px 0 rgba(0, 0, 0, 0.28);
}

.slot--filled {
  cursor: pointer;
}

.item-icon {
  width: 78%;
  height: 78%;
  object-fit: contain;
  image-rendering: pixelated;
  pointer-events: none;
}

.slot--filled:hover,
.slot--filled:focus-visible {
  border-color: var(--sand-light);
  background:
    linear-gradient(135deg, rgba(228, 214, 197, 0.18), transparent 50%),
    linear-gradient(315deg, var(--navy-soft), var(--plum-soft));
}

.slot-item {
  font-family: var(--pixel);
  font-size: clamp(5px, .75vw, 9px);
  line-height: 1;
  color: #fff;
  text-shadow: 2px 2px 0 #000;
}

.slot-item--blue { color: #c7d8ea; }
.slot-item--teal { color: #cbb9a4; }
.slot-item--gold { color: var(--gold); }
.slot-item--green { color: #d7cfb9; }
.slot-item--cyan { color: #d2e0ea; }
.slot-item--orange { color: #d9b98f; }
.slot-item--purple { color: #c7b2cf; }
.slot-item--red { color: #d98a98; }
.slot-item--grey { color: #d8cabb; }
.slot-item--lime { color: #d8cfb8; }
.slot-item--pink { color: #dcb6bf; }

.inv-tooltip {
  display: grid;
  gap: 4px;
  min-height: 72px;
  margin-top: 14px;
  padding: 12px 14px;
  border: 2px solid var(--line);
  background:
    linear-gradient(135deg, rgba(185, 163, 139, 0.08), transparent 55%),
    rgba(0, 0, 0, 0.3);
}

.inv-tooltip__name {
  color: var(--accent);
  font-family: var(--pixel);
  font-size: 8px;
  line-height: 1.5;
}

.inv-tooltip__desc {
  color: var(--muted);
  font-size: 19px;
  line-height: 1.2;
  white-space: pre-line;
}

.xp {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
}

.xp-label {
  flex: 0 0 auto;
  color: var(--gold);
  font-family: var(--pixel);
  font-size: 8px;
  text-shadow: 2px 2px 0 var(--line);
}

.xp-track {
  position: relative;
  flex: 1;
  height: 12px;
  border: 2px solid var(--line);
  background: var(--plum-deep);
}

.xp-fill {
  display: block;
  width: 78%;
  height: 100%;
  background: linear-gradient(90deg, var(--wine-soft), var(--sand-light));
}

.skill-groups {
  display: grid;
  gap: clamp(14px, 2vw, 20px);
}

.skill-group {
  padding: 20px 22px;
}

.skill-group h3 {
  margin: 0 0 14px;
  color: var(--accent);
  font-family: var(--pixel);
  font-size: 9px;
  line-height: 1.5;
}

.skill-group ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.skill-group li {
  position: relative;
  padding-left: 18px;
  color: var(--muted);
  font-size: 20px;
  line-height: 1.25;
}

.skill-group li::before {
  content: "";
  position: absolute;
  top: .5em;
  left: 0;
  width: 7px;
  height: 7px;
  background: var(--accent);
  box-shadow: 0 0 0 2px rgba(185, 163, 139, 0.18);
}

.credential-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(14px, 2vw, 20px);
}

.credential-group {
  padding: 20px 22px;
}

.credential-group h3 {
  margin: 0 0 14px;
  color: var(--accent);
  font-family: var(--pixel);
  font-size: 9px;
  line-height: 1.5;
}

.credential-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.credential-list li {
  position: relative;
  padding-left: 18px;
  color: var(--muted);
  font-size: 19px;
  line-height: 1.3;
}

.credential-list li::before {
  content: "";
  position: absolute;
  top: .5em;
  left: 0;
  width: 7px;
  height: 7px;
  background: var(--accent);
  box-shadow: 0 0 0 2px rgba(185, 163, 139, 0.18);
}

.credential-list strong {
  color: var(--text);
  font-weight: 400;
}

.quest-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(18px, 3vw, 28px);
}

.quest {
  position: relative;
  padding: clamp(20px, 3vw, 30px);
  transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}

.quest:hover {
  transform: translateY(-5px);
  box-shadow: 0 11px 0 var(--line);
}

.quest--featured {
  grid-column: span 2;
  background:
    linear-gradient(135deg, rgba(185, 163, 139, 0.09), transparent 52%),
    linear-gradient(180deg, var(--panel-2), var(--panel));
}

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

.quest-status,
.quest-num {
  font-family: var(--pixel);
  font-size: 7px;
  line-height: 1.5;
}

.quest-status {
  padding: 5px 8px;
  border: 2px solid var(--gold);
  color: var(--gold);
  background: rgba(226, 199, 156, 0.09);
}

.quest-status--done {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(185, 163, 139, 0.09);
}

.quest-num {
  color: var(--line-soft);
}

.quest h3 {
  margin: 0 0 8px;
  color: var(--text);
  font-family: var(--pixel);
  font-size: clamp(10px, 1.2vw, 13px);
  line-height: 1.55;
}

.quest-meta {
  margin: 0 0 16px;
  color: var(--accent);
  font-family: var(--pixel);
  font-size: 7px;
  line-height: 1.7;
}

.quest > p:not(.quest-meta) {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: clamp(19px, 2vw, 22px);
  line-height: 1.35;
}

.quest-points {
  display: grid;
  gap: 7px;
  margin: 0 0 20px;
  padding: 0;
  list-style: none;
}

.quest-points li {
  position: relative;
  padding-left: 18px;
  color: var(--muted);
  font-size: 19px;
  line-height: 1.25;
}

.quest-points li::before {
  content: ">";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-family: var(--pixel);
  font-size: 8px;
}

.quest .tag-row {
  margin-top: auto;
}

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

.advancement {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  padding: 20px 22px;
}

.advancement-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 3px solid var(--line);
  background: var(--accent);
  color: var(--accent-ink);
  font-family: var(--pixel);
  font-size: 12px;
  box-shadow: 0 4px 0 var(--line);
}

.advancement-date {
  margin: 0 0 6px;
  color: var(--accent);
  font-family: var(--pixel);
  font-size: 7px;
  line-height: 1.6;
}

.advancement h3 {
  margin: 0 0 4px;
  color: var(--text);
  font-family: var(--pixel);
  font-size: 10px;
  line-height: 1.6;
}

.advancement p:last-child {
  margin: 0;
  color: var(--muted);
  font-size: 20px;
  line-height: 1.3;
}

.section--contact {
  padding-bottom: clamp(100px, 12vw, 150px);
}

.sign {
  position: relative;
  padding: clamp(26px, 4vw, 46px);
  border-color: var(--wine);
  background:
    repeating-linear-gradient(0deg, transparent 0 22px, rgba(44, 31, 51, 0.16) 22px 24px),
    linear-gradient(90deg, var(--plum-soft), var(--wine) 48%, var(--plum));
  box-shadow: 0 8px 0 var(--wine);
  color: var(--sand-light);
}

.sign::before,
.sign::after {
  content: "";
  position: absolute;
  top: 14px;
  width: 12px;
  height: 12px;
  border: 2px solid var(--wine);
  background: var(--sand);
}

.sign::before { left: 14px; }
.sign::after { right: 14px; }

.sign .kicker {
  color: var(--gold);
}

.sign h2 {
  margin: 0 0 16px;
  font-family: var(--pixel);
  font-size: clamp(1.2rem, 2.8vw, 2.05rem);
  line-height: 1.4;
  color: var(--sand-light);
  text-shadow: 3px 3px 0 var(--wine);
}

.sign-copy {
  max-width: 750px;
  margin: 0 0 28px;
  color: var(--sand);
  font-size: clamp(20px, 2.3vw, 24px);
  line-height: 1.38;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 26px;
}

.contact-link {
  display: grid;
  gap: 4px;
  padding: 14px 16px;
  border: 2px solid rgba(44, 31, 51, 0.75);
  background: rgba(27, 18, 32, 0.42);
  text-decoration: none;
  transition: background-color .2s ease, transform .2s ease;
}

a.contact-link:hover,
a.contact-link:focus-visible {
  background: rgba(27, 18, 32, 0.72);
  transform: translateY(-2px);
}

.contact-label {
  color: var(--sand);
  font-family: var(--pixel);
  font-size: 7px;
  line-height: 1.5;
}

.contact-value {
  overflow-wrap: anywhere;
  color: var(--sand-light);
  font-size: 22px;
  line-height: 1.2;
}

.sign-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.sign .pixel-btn--ghost {
  color: var(--sand-light);
}

.footer {
  width: min(1200px, 100%);
  margin: 0 auto;
  padding: 0 24px 130px;
  color: var(--muted);
  text-align: center;
}

.footer p {
  margin: 0 0 6px;
  font-size: 19px;
  line-height: 1.3;
}

.footer-small {
  color: var(--sand-dark);
  font-family: var(--pixel);
  font-size: 6px;
  line-height: 1.7;
  overflow-wrap: anywhere;
}

.hotbar {
  position: fixed;
  z-index: 60;
  left: 50%;
  bottom: 18px;
  translate: -50% 0;
  display: flex;
  gap: 4px;
  padding: 6px;
  border: 3px solid var(--line);
  background: rgba(27, 18, 32, 0.95);
  box-shadow: 0 6px 0 var(--line);
  backdrop-filter: blur(9px);
}

.hot-slot {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  width: 58px;
  height: 58px;
  border: 3px solid var(--plum-soft);
  background: linear-gradient(315deg, var(--navy-deep), var(--plum));
  color: var(--sand);
  text-decoration: none;
  transition: border-color .15s ease, background-color .15s ease, color .15s ease, transform .15s ease;
}

.hot-slot:hover,
.hot-slot:focus-visible {
  transform: translateY(-3px);
  border-color: var(--sand-light);
  color: var(--sand-light);
}

.hot-slot.is-active {
  border-color: var(--sand-light);
  background: linear-gradient(315deg, var(--wine), var(--navy));
  color: var(--sand-light);
  box-shadow: inset 0 0 0 2px rgba(228, 214, 197, 0.14);
}

.hot-key {
  position: absolute;
  top: 2px;
  left: 4px;
  color: var(--sand-dark);
  font-family: var(--pixel);
  font-size: 6px;
}

.hot-icon {
  font-size: 19px;
  line-height: 1;
}

.hot-label {
  font-family: var(--pixel);
  font-size: 6px;
  line-height: 1.4;
}

.toast {
  position: fixed;
  z-index: 70;
  bottom: 104px;
  left: 50%;
  display: flex;
  align-items: center;
  gap: 14px;
  width: min(440px, calc(100vw - 32px));
  padding: 14px 16px;
  border: 3px solid var(--line);
  background:
    linear-gradient(135deg, rgba(185, 163, 139, 0.12), transparent 52%),
    var(--panel);
  color: var(--text);
  box-shadow: 0 6px 0 var(--line);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 18px);
  transition: opacity .25s ease, transform .25s var(--ease);
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.toast-icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  border: 3px solid var(--line);
  background: linear-gradient(180deg, var(--sand-light), var(--gold));
  color: var(--plum);
  font-family: var(--pixel);
  font-size: 7px;
  box-shadow: 0 3px 0 var(--line);
}

.toast-copy {
  min-width: 0;
}

.toast-title {
  margin: 0 0 3px;
  color: var(--gold);
  font-family: var(--pixel);
  font-size: 8px;
  line-height: 1.5;
}

.toast-text {
  margin: 0;
  color: var(--text);
  font-size: 19px;
  line-height: 1.2;
}

body.inventory-open {
  overflow: hidden;
}

.inventory-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: clamp(12px, 3vw, 32px);
}

.inventory-modal[hidden] {
  display: none;
}

.inventory-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(13, 9, 18, 0.84);
  backdrop-filter: blur(5px);
  animation: inventory-fade .2s ease-out;
}

.inventory-dialog {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(900px, 100%);
  max-height: min(92vh, 900px);
  overflow: auto;
  border: 3px solid var(--line);
  background:
    linear-gradient(135deg, rgba(185, 163, 139, 0.1), transparent 42%),
    linear-gradient(315deg, var(--navy-deep), var(--plum) 48%, var(--wine));
  box-shadow:
    0 0 0 4px var(--sand-dark),
    0 0 0 8px var(--line),
    0 24px 0 rgba(0, 0, 0, 0.42),
    0 0 90px rgba(185, 163, 139, 0.18);
  animation: inventory-pop .22s var(--ease);
  outline: none;
}

.inventory-dialog__bar {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border-bottom: 3px solid var(--line);
  background:
    linear-gradient(135deg, rgba(185, 163, 139, 0.12), transparent 50%),
    var(--panel);
}

.inventory-title {
  font-family: var(--pixel);
  font-size: clamp(8px, 1.3vw, 11px);
  line-height: 1.5;
  color: var(--sand-light);
  text-shadow: 2px 2px 0 var(--line);
}

.inventory-title span {
  display: block;
  margin-top: 4px;
  font-family: var(--body);
  font-size: 18px;
  line-height: 1.1;
  color: var(--muted);
  text-shadow: none;
}

.inventory-close {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 3px solid var(--line);
  background: linear-gradient(180deg, var(--danger), var(--wine));
  color: var(--sand-light);
  font-family: var(--pixel);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 4px 0 var(--line);
  transition: transform .12s ease, box-shadow .12s ease, filter .2s ease;
}

.inventory-close:hover,
.inventory-close:focus-visible {
  filter: brightness(1.18);
  transform: translateY(-2px);
  box-shadow: 0 6px 0 var(--line);
}

.inventory-dialog__body {
  display: flex;
  flex-direction: column;
  gap: clamp(14px, 2.4vw, 22px);
  padding: clamp(14px, 3vw, 26px);
}

.mc-inv__top {
  display: grid;
  grid-template-columns: 72px minmax(150px, 1fr) auto;
  gap: clamp(14px, 3vw, 30px);
  align-items: start;
}

.mc-inv__label {
  margin: 0;
  color: var(--gold);
  font-family: var(--pixel);
  font-size: 7px;
  line-height: 1.5;
  letter-spacing: .04em;
}

.inventory-armor {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  align-content: start;
  justify-items: center;
}

.inventory-armor .slot {
  width: 58px;
  height: 58px;
}

.mc-inv__preview {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.mc-avatar {
  position: relative;
  display: block;
  width: clamp(112px, 14vw, 132px);
  margin: 0 auto;
  filter: drop-shadow(0 12px 0 rgba(0, 0, 0, 0.28));
}

.inventory-avatar {
  width: 100%;
  height: auto;
  image-rendering: pixelated;
}

.mc-inv__hint {
  margin: 0;
  color: var(--muted);
  font-family: var(--pixel);
  font-size: 6px;
  line-height: 1.5;
  text-align: center;
}

.mc-inv__craft {
  justify-self: end;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.mc-craft-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mc-craft-grid {
  display: grid;
  grid-template-columns: repeat(2, 38px);
  gap: 4px;
}

.mc-craft-grid .slot {
  width: 38px;
  height: 38px;
}

.mc-craft-arrow {
  color: var(--sand);
  font-family: var(--pixel);
  font-size: 14px;
}

.mc-result {
  width: 50px;
  height: 50px;
  border-color: var(--gold);
  background:
    linear-gradient(135deg, rgba(228, 214, 197, 0.2), transparent 55%),
    linear-gradient(315deg, var(--wine), var(--navy));
}

.mc-inv__storage,
.mc-inv__hotbar {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.inventory-dialog__grid,
.mc-hotbar-grid {
  display: grid;
  grid-template-columns: repeat(9, minmax(0, 54px));
  justify-content: center;
  gap: 6px;
}

.inventory-dialog__grid .slot,
.mc-hotbar-grid .slot {
  aspect-ratio: 1;
  min-width: 0;
}

.mc-hotbar-grid {
  padding-top: 10px;
  border-top: 3px solid rgba(185, 163, 139, 0.16);
}

.inventory-dialog .inv-tooltip {
  min-height: 84px;
  margin-top: 0;
}

.inventory-dialog .inv-tooltip__desc {
  font-size: 17px;
  line-height: 1.1;
}

.inventory-dialog__foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 16px;
  padding: 10px 16px;
  border-top: 3px solid var(--line);
  background: rgba(0, 0, 0, 0.18);
  color: var(--muted);
  font-family: var(--pixel);
  font-size: 6px;
  line-height: 1.6;
}

@keyframes inventory-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes inventory-pop {
  from { opacity: 0; transform: translateY(18px) scale(.98); }
  to { opacity: 1; transform: none; }
}

@media (max-width: 760px) {
  .mc-inv__top {
    grid-template-columns: 60px minmax(0, 1fr);
    gap: 14px;
  }

  .mc-inv__craft {
    display: none;
  }

  .mc-avatar {
    width: 110px;
  }

  .inventory-armor .slot {
    width: 50px;
    height: 50px;
  }

  .inventory-dialog__grid,
  .mc-hotbar-grid {
    gap: 4px;
  }
}

@media (max-width: 480px) {
  .inventory-modal {
    padding: 8px;
  }

  .inventory-dialog__bar {
    padding: 10px 12px;
  }

  .inventory-dialog__body {
    padding: 10px;
    gap: 12px;
  }

  .mc-inv__top {
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 10px;
  }

  .mc-avatar {
    width: 92px;
  }

  .mc-inv__label {
    font-size: 6px;
  }

  .inventory-armor {
    gap: 4px;
  }

  .inventory-armor .slot {
    width: 42px;
    height: 42px;
  }

  .inventory-dialog__grid,
  .mc-hotbar-grid {
    gap: 3px;
  }

  .inventory-dialog .slot-item {
    font-size: 5px;
  }

  .inventory-dialog .inv-tooltip__desc {
    font-size: 17px;
  }
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .6s var(--ease), transform .6s var(--ease);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (max-width: 980px) {
  .hero-inner {
    grid-template-columns: minmax(0, 1fr) minmax(260px, .75fr);
    gap: 20px;
  }

  .hero-stage {
    min-height: 520px;
  }

  .about-grid,
  .skills-layout {
    grid-template-columns: 1fr;
  }

  .skill-groups {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  body {
    font-size: 20px;
  }

  .topbar {
    padding: 10px 14px;
  }

  .brand {
    font-size: 8px;
  }

  .brand-head {
    width: 32px;
    height: 32px;
  }

  .hero {
    padding-top: 110px;
    padding-bottom: 110px;
  }

  .hero-inner {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .hero-copy {
    text-align: left;
  }

  .hero h1 {
    font-size: clamp(1.8rem, 8.5vw, 3.2rem);
  }

  .hero-stage {
    min-height: 440px;
    max-width: 400px;
    margin: 0 auto;
    width: 100%;
  }

  .character {
    height: clamp(300px, 64vw, 420px);
  }

  .skin-viewer {
    width: clamp(220px, 58vw, 320px);
    height: clamp(300px, 64vw, 420px);
  }

  .quick-stats {
    gap: 14px;
    margin-top: 28px;
  }

  .quick-stats li {
    font-size: 19px;
  }

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

  .quest--featured {
    grid-column: auto;
  }

  .skill-groups {
    grid-template-columns: 1fr;
  }

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

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

  .inv-grid {
    gap: 3px;
  }

  .slot-item {
    font-size: 5px;
  }

  .scroll-cue {
    display: none;
  }

  .toast {
    bottom: 84px;
  }

  .hotbar {
    bottom: 10px;
    gap: 3px;
    padding: 4px;
  }

  .hot-slot {
    width: 50px;
    height: 52px;
  }

  .hot-icon {
    font-size: 16px;
  }

  .hot-label {
    font-size: 5px;
  }

  .footer {
    padding-bottom: 110px;
  }
}

@media (max-width: 480px) {
  .hero-actions,
  .sign-actions {
    flex-direction: column;
    align-items: flex-start;
  }

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

  .hero-stage {
    min-height: 390px;
  }

  .character {
    height: 300px;
  }

  .skin-viewer {
    width: 250px;
    height: 300px;
  }

  .advancement {
    grid-template-columns: 40px minmax(0, 1fr);
    gap: 12px;
    padding: 16px;
  }

  .advancement-icon {
    width: 38px;
    height: 38px;
    font-size: 9px;
  }

  .panel-title {
    font-size: 7px;
  }

  .hotbar {
    gap: 2px;
    padding: 4px;
  }

  .hot-slot {
    width: 46px;
    height: 52px;
  }
}

@media (max-width: 360px) {
  .brand span {
    display: none;
  }

  .topbar-actions .pixel-btn--small {
    padding: 8px 7px;
    font-size: 7px;
  }

  .hotbar {
    gap: 1px;
    padding: 2px;
  }

  .hot-slot {
    width: 40px;
    height: 46px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
