@font-face {
  font-family: "Pixelify Sans";
  src: url("assets/fonts/PixelifySans.ttf") format("truetype");
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
}

@font-face {
  font-family: "Press Start 2P";
  src: url("assets/fonts/PressStart2P-Regular.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --background: #090c18;
  --panel: #0d1124;
  --raised: #172234;
  --line: #8b6a3e;
  --text: #f6eedb;
  --muted: #a9b2c6;
  --accent: #ffd25e;
  --accent-bright: #f1dcab;
  --heading-font: "Press Start 2P", monospace;
  --body-font: "Pixelify Sans", monospace;
}

* {
  box-sizing: border-box;
}

body {
  min-width: 0;
  margin: 0;
  background: var(--background);
  color: var(--text);
  font-family: var(--body-font);
  font-size: 17px;
  line-height: 1.5;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  color: inherit;
  font: inherit;
  cursor: pointer;
}

a:focus-visible,
button:focus-visible,
#content:focus-visible,
#section-title:focus-visible {
  outline: 2px solid var(--accent-bright);
  outline-offset: 4px;
}

h1,
h2,
h3,
h4,
p,
figure,
dl,
dd {
  margin: 0;
}

h1,
h2 {
  font-family: var(--heading-font);
  font-weight: 400;
  line-height: 1.35;
}

h3,
h4 {
  font-family: var(--body-font);
  line-height: 1.2;
}

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

.wrap {
  width: min(calc(100% - 64px), 1232px);
  margin-inline: auto;
}

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

.skip-link {
  position: fixed;
  z-index: 5;
  top: 10px;
  left: 10px;
  padding: 10px 14px;
  background: var(--accent);
  color: #201507;
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--panel);
}

.header-inner {
  display: grid;
  min-height: 72px;
  grid-template-columns: minmax(max-content, 1fr) auto minmax(max-content, 1fr);
  align-items: center;
  column-gap: 28px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  gap: 12px;
  font: 400 14px/1.4 var(--heading-font);
}

.brand {
  min-height: 44px;
}

.brand-mark {
  display: grid;
  width: 30px;
  height: 30px;
  border: 1px solid #ad793d;
  background: #30251c;
  place-items: center;
}

.brand-mark span {
  width: 14px;
  height: 14px;
  clip-path: polygon(36% 0, 64% 0, 64% 36%, 100% 36%, 100% 64%, 64% 64%, 64% 100%, 36% 100%, 36% 64%, 0 64%, 0 36%, 36% 36%);
  background: var(--accent);
  transform: rotate(45deg);
}

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

.navigation a,
.watch,
.primary-link {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  white-space: nowrap;
  font-size: 0.875rem;
  font-weight: 650;
}

.navigation a {
  padding-inline: 16px;
  border: 1px solid transparent;
  color: var(--muted);
}

.navigation a span {
  color: var(--accent);
}

.navigation a:hover {
  color: var(--text);
  background: var(--panel);
}

.navigation a[aria-current="page"] {
  border-color: #685035;
  background: #30251c;
  color: var(--accent-bright);
}

.watch {
  justify-self: end;
  gap: 5px;
  padding-inline: 14px;
  border: 1px solid var(--line);
}

.watch:hover,
.watch:focus-visible {
  border-color: var(--accent);
  color: var(--accent-bright);
}

.hero {
  position: relative;
  display: grid;
  min-height: clamp(340px, 36vw, 448px);
  align-items: center;
  isolation: isolate;
  overflow: hidden;
  margin-top: 24px;
  border: 1px solid #69503e;
  background: #201827;
}

.hero-image {
  position: absolute;
  z-index: -2;
  inset: 0 0 0 auto;
  width: 89%;
  height: 100%;
  object-fit: cover;
  object-position: 62% top;
  image-rendering: pixelated;
}

.hero::after {
  position: absolute;
  z-index: -1;
  inset: 0;
  background:
    linear-gradient(90deg, #17141d 0%, #17141df2 16%, #17141d90 42%, #17141d12 72%, transparent 100%),
    linear-gradient(0deg, #17141d82, transparent 32%);
  content: "";
  pointer-events: none;
}

.hero-copy {
  width: min(100%, 680px);
  padding: 40px clamp(28px, 4.3vw, 68px);
}

.hero h1 {
  font-size: clamp(1.8rem, 4vw, 3.2rem);
  line-height: 1.2;
  text-shadow: 0 4px #19131c;
}

.hero h1 span {
  color: var(--accent);
}

.hero p {
  max-width: 33ch;
  margin-top: 22px;
  color: #f3e9e3;
  font-size: clamp(1rem, 1.6vw, 1.2rem);
  text-shadow: 0 1px 3px #17141d;
}

.primary-link {
  gap: 25px;
  margin-top: 25px;
  padding: 0 15px;
  border: 1px solid var(--accent-bright);
  background: var(--accent);
  color: #241908;
}

.primary-link:hover {
  background: #ffdb9f;
}

.hero-location {
  position: absolute;
  right: 16px;
  bottom: 16px;
  padding: 5px 10px;
  border: 1px solid #9f7351;
  background: #18151de8;
  color: #ffdba9;
  font-size: 0.75rem;
}

.hero-location span {
  margin-right: 3px;
  color: var(--accent);
}

.section {
  padding-block: 43px 66px;
}

.section-heading,
.camp-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}

.section-heading {
  margin-bottom: 22px;
}

.section-heading h2 {
  width: fit-content;
  scroll-margin-top: 20px;
  font-size: clamp(1.15rem, 2.7vw, 2rem);
}

.section-heading p {
  margin-top: 6px;
  color: var(--muted);
}

.status {
  padding: 4px 8px;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.75rem;
  white-space: nowrap;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.filter {
  min-height: 44px;
  padding: 0 13px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 600;
}

.filter:hover,
.vendor-card:hover,
.item-card:hover {
  border-color: #a8794c;
  color: var(--text);
}

.filter[aria-pressed="true"],
.vendor-card[aria-pressed="true"] {
  border-color: #bc8b50;
  background: #30251c;
  color: var(--accent-bright);
}

.inventory-layout,
.shop-layout {
  display: grid;
  align-items: start;
  gap: 18px;
}

.inventory-layout {
  grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr);
}

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

.panel,
.item-card,
.vendor-card,
.camp-view,
.camp-log li {
  border: 1px solid var(--line);
  background: var(--panel);
}

.panel,
.camp-view,
.camp-log li {
  border: 2px solid var(--accent-bright);
  border-image: url("assets/art/show-hud-frame.webp") 28 / 10px stretch;
  background-color: var(--panel);
  box-shadow: inset 0 0 0 1px #05060c, 0 0 0 1px var(--line);
}

.item-acquired {
  color: var(--muted);
  font-size: 0.875rem;
}

.detail-body > .item-acquired {
  margin-top: 10px;
}

.item-history {
  display: grid;
  gap: 9px;
  margin-top: 15px;
  padding: 12px;
  border: 1px solid var(--line);
  background: var(--raised);
  font-size: 1rem;
}

.item-history dt {
  color: var(--accent-bright);
  font-size: 0.875rem;
}

.item-history dd {
  overflow-wrap: anywhere;
}

.item-history a {
  color: #9ad6ff;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.history-note {
  display: block;
  color: var(--muted);
  font-size: 0.875rem;
}

@media (min-width: 676px) and (min-height: 780px) {
  .inventory-layout > .detail {
    position: sticky;
    top: 20px;
  }
}

.item-card {
  display: flex;
  min-width: 0;
  height: 100%;
  flex-direction: column;
  padding: 0;
  text-align: left;
}

.item-card.chosen {
  border-color: var(--accent);
  box-shadow: inset 0 -2px var(--accent);
}

.item-art,
.detail-art,
.vendor-art {
  display: grid;
  place-items: center;
}

.item-art,
.detail-art {
  --art-glow: #3c547052;
  --art-edge: #3a5073;
  min-width: 0;
  border-bottom: 1px solid var(--art-edge);
  background:
    radial-gradient(ellipse at 50% 70%, var(--art-glow), transparent 72%),
    repeating-linear-gradient(0deg, transparent 0 15px, #ffffff08 15px 16px),
    repeating-linear-gradient(90deg, transparent 0 15px, #ffffff08 15px 16px),
    #101a2d;
}

.item-art.signature,
.detail-art.signature {
  --art-glow: #c9a25a4d;
  --art-edge: #8b6a3e;
}

.item-art {
  width: 100%;
  height: 118px;
}

.item-art img,
.detail-art img,
.vendor-art img,
.stock-art img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  image-rendering: pixelated;
}

.item-art img {
  width: min(76%, 130px);
  height: 88px;
}

.item-meta {
  display: grid;
  width: 100%;
  align-content: start;
  gap: 5px;
  padding: 11px 12px 14px;
}

.item-name {
  overflow-wrap: anywhere;
  font-size: 0.925rem;
  font-weight: 700;
  line-height: 1.25;
}

.item-category,
.item-base,
.stock-heading p,
.stock-name span,
.stock-note,
.camp-log p {
  color: var(--muted);
  font-size: 0.875rem;
}

.detail-art {
  height: 156px;
}

.detail-art img {
  width: min(66%, 178px);
  height: 116px;
}

.detail-body {
  padding: 16px 20px 20px;
}

.rarity {
  margin-bottom: 7px;
  color: var(--accent-bright);
  font-size: 0.8rem;
  font-weight: 650;
}

.rarity.signature {
  color: #f1dcab;
}

.detail h3,
.stock-heading h3,
.camp-heading h3 {
  font-size: clamp(1.6rem, 2.5vw, 2.15rem);
}

.item-base,
.stock-heading p {
  margin-top: 5px;
}

.stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px 14px;
  margin-top: 17px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.stats div {
  display: flex;
  min-width: 0;
  justify-content: space-between;
  gap: 7px;
  font-size: 0.8rem;
}

.stats dt {
  color: var(--muted);
}

.stats dd {
  color: var(--accent-bright);
  font-variant-numeric: tabular-nums;
  font-weight: 650;
}

.shop-layout {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.8fr);
}

.vendor-list {
  display: grid;
  gap: 10px;
}

.vendor-card {
  display: grid;
  min-width: 0;
  min-height: 68px;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 7px 12px 7px 7px;
  font-size: 0.94rem;
  font-weight: 650;
  text-align: left;
}

.vendor-art {
  display: grid;
  height: 52px;
  padding: 3px 7px;
  border: 1px solid var(--line);
  background: #14141a;
  place-items: center;
}

.vendor-art img {
  max-height: 44px;
}

.vendor-arrow,
.price {
  color: var(--accent-bright);
}

#shop-stock {
  padding: clamp(16px, 3vw, 28px);
}

.shop-scene {
  display: block;
  width: 100%;
  height: auto;
  margin-top: 16px;
  border: 1px solid var(--line);
}

.stock-list,
.camp-log {
  list-style: none;
  padding: 0;
}

.stock-list {
  margin: 18px 0 12px;
}

.stock-list li {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  align-items: center;
  gap: 13px;
  padding-block: 10px;
  border-top: 1px solid var(--line);
}

.stock-list li:last-child {
  border-bottom: 1px solid var(--line);
}

.stock-art {
  display: grid;
  height: 44px;
  padding: 4px;
  border: 1px solid var(--line);
  background: #14141a;
  color: var(--accent);
  place-items: center;
}

.stock-name {
  display: grid;
  gap: 3px;
  line-height: 1.3;
}

.price {
  font-size: 0.9rem;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  white-space: nowrap;
}

.price span {
  color: var(--muted);
  font-weight: 500;
}

.time-filters {
  justify-content: flex-end;
  margin-bottom: 0;
}

.camp-view {
  position: relative;
}

.camp-view img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  image-rendering: pixelated;
}

.camp-view figcaption {
  padding: 9px 12px;
  color: var(--muted);
  font-size: 0.85rem;
}

.camp-heading {
  margin-top: 30px;
}

.camp-log {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 0;
}

.camp-log li {
  padding: 15px;
}

.log-place {
  color: var(--accent-bright);
  font-size: 0.8rem;
  font-weight: 650;
}

.camp-log h4 {
  margin-block: 5px 7px;
  font-size: 1.35rem;
}

.notice {
  padding-block: 30px;
  color: var(--muted);
}

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--panel);
}

.footer-inner {
  display: flex;
  min-height: 72px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.footer-inner a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
}

.footer-inner a:last-child {
  gap: 6px;
  color: var(--muted);
  font-size: 0.875rem;
}

.footer-inner a:last-child:hover {
  color: var(--accent-bright);
}

@media (max-width: 950px) {
  .wrap {
    width: calc(100% - 40px);
  }

  .header-inner {
    column-gap: 10px;
  }

  .navigation a {
    padding-inline: 11px;
  }

  .inventory-layout {
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  }

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

@media (max-width: 675px) {
  .wrap {
    width: calc(100% - 32px);
  }

  .header-inner {
    min-height: auto;
    grid-template-columns: minmax(0, 1fr) auto;
    row-gap: 6px;
    padding-block: 8px 10px;
  }

  .brand,
  .footer-brand {
    gap: 8px;
    font-size: clamp(10px, 3.1vw, 14px);
  }

  .brand-mark {
    width: 26px;
    height: 26px;
  }

  .navigation {
    display: grid;
    grid-row: 2;
    grid-column: 1 / -1;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }

  .navigation a {
    gap: 5px;
    padding-inline: 5px;
  }

  .hero {
    min-height: 0;
    margin-top: 15px;
  }

  .hero-image {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-position: center top;
  }

  .hero::after {
    background: linear-gradient(0deg, #17141d 3%, #17141d 30%, #17141dcc 43%, transparent 77%);
  }

  .hero-copy {
    padding: clamp(135px, 34vw, 200px) 15px 22px;
  }

  .hero h1 {
    font-size: clamp(1.3rem, 7vw, 2.65rem);
  }

  .hero p {
    margin-top: 12px;
  }

  .primary-link {
    margin-top: 16px;
  }

  .hero-location {
    top: 8px;
    right: 8px;
    bottom: auto;
    font-size: 0.6875rem;
  }

  .section {
    padding-block: 30px 42px;
  }

  .section-heading {
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 16px;
  }

  .inventory-layout,
  .shop-layout,
  .camp-log {
    grid-template-columns: minmax(0, 1fr);
  }

  .item-art {
    height: 92px;
  }

  .item-art img {
    height: 68px;
  }

  .vendor-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
  }

  .vendor-card {
    min-height: 66px;
    grid-template-columns: 32px minmax(0, 1fr);
    gap: 6px;
    padding: 5px;
    font-size: 0.78rem;
  }

  .vendor-art {
    height: 40px;
    padding-inline: 3px;
  }

  .vendor-art img {
    max-height: 32px;
  }

  .vendor-arrow {
    display: none;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .navigation a,
  .watch,
  .primary-link,
  .filter,
  .item-card,
  .vendor-card {
    transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease;
  }
}
