:root {
  --paper: #e5ca8d;
  --paper-light: #f4e4b8;
  --paper-deep: #c99d55;
  --ink: #2b1b1b;
  --purple: #3d1858;
  --purple-2: #54226d;
  --purple-3: #251132;
  --gold: #d8a51d;
  --gold-light: #f4cf56;
  --line: #5b3a22;
  --shadow: rgba(25, 10, 18, .44);
  --sans: "Trebuchet MS", Arial, system-ui, sans-serif;
  --serif: Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  font-family: var(--sans);
  background:
    radial-gradient(circle at 50% 10%, rgba(116, 62, 133, .34), transparent 40%),
    linear-gradient(180deg, #1b0b26, #32133f 45%, #16091e);
}
button, a { font: inherit; }
button { color: inherit; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

.sprite {
  display: block;
  flex: 0 0 auto;
  background-repeat: no-repeat;
  background-color: transparent;
  background-position-y: 0;
  image-rendering: auto;
}
.sprite-ui { background-image: url("assets/sprites-ui.png"); background-size: 1200% 100%; aspect-ratio: 1; }
.sprite-treasure { background-image: url("assets/sprites-treasures.png"); background-size: 400% 100%; aspect-ratio: 1; }
.sprite-mascot { background-image: url("assets/sprites-mascots.png"); background-size: 300% 100%; aspect-ratio: 1; }
.sprite-region { background-image: url("assets/sprites-regions.png"); background-size: 800% 100%; aspect-ratio: 3 / 2; }

.ui-badge-w { background-position-x: 0%; }
.ui-badge-question { background-position-x: 9.0909%; }
.ui-badge-skull { background-position-x: 18.1818%; }
.ui-badge-alert { background-position-x: 27.2727%; }
.ui-badge-star { background-position-x: 36.3636%; }
.ui-badge-w-gold { background-position-x: 45.4545%; }
.ui-coin { background-position-x: 54.5455%; }
.ui-gem { background-position-x: 63.6364%; }
.ui-compass { background-position-x: 72.7273%; }
.ui-magnifier { background-position-x: 81.8182%; }
.ui-printer { background-position-x: 90.9091%; }
.ui-handheld { background-position-x: 100%; }

.treasure-chest { background-position-x: 0%; }
.treasure-idol { background-position-x: 33.3333%; }
.treasure-crown { background-position-x: 66.6667%; }
.treasure-bag { background-position-x: 100%; }

.mascot-bag { background-position-x: 0%; }
.mascot-cheer { background-position-x: 50%; }
.mascot-thumbs { background-position-x: 100%; }

.region-desert { background-position-x: 0%; }
.region-pyramid { background-position-x: 14.2857%; }
.region-volcano { background-position-x: 28.5714%; }
.region-forest { background-position-x: 42.8571%; }
.region-castle { background-position-x: 57.1429%; }
.region-ice { background-position-x: 71.4286%; }
.region-ruins { background-position-x: 85.7143%; }
.region-factory { background-position-x: 100%; }


.page-shell {
  width: min(1440px, 100%);
  margin: 0 auto;
  min-height: 100vh;
  background:
    linear-gradient(rgba(238, 214, 157, .88), rgba(238, 214, 157, .88)),
    url("assets/paper-texture.png") center / 560px 130px repeat;
  border-inline: 4px solid #1d0a28;
  box-shadow: 0 0 60px rgba(0,0,0,.75);
  overflow: hidden;
  overflow: clip;
}

.paper-panel {
  background:
    linear-gradient(rgba(241, 220, 171, .87), rgba(229, 198, 133, .87)),
    url("assets/paper-texture.png") center / 560px 130px repeat;
  border: 2px solid var(--line);
  box-shadow:
    inset 0 0 0 2px rgba(255, 232, 168, .6),
    inset 0 0 20px rgba(90, 49, 23, .25),
    4px 5px 0 rgba(56, 31, 24, .35);
}

.purple-card {
  color: #f4e9c9;
  background:
    linear-gradient(rgba(48, 20, 67, .92), rgba(35, 13, 49, .96)),
    url("assets/purple-texture.png") center / 650px 70px repeat;
  border: 2px solid #1a0a24;
  box-shadow:
    inset 0 0 0 2px rgba(169, 104, 177, .26),
    inset 0 0 18px rgba(0,0,0,.44),
    4px 5px 0 rgba(48, 28, 22, .4);
}

.topbar {
  height: 62px;
  position: relative;
  z-index: 30;
  padding-left: 196px;
  background: #281038;
  border-bottom: 4px solid #16081f;
  box-shadow: 0 4px 0 rgba(84, 46, 20, .7);
}

.crest {
  position: absolute;
  left: 8px;
  top: 7px;
  width: 178px;
  height: 166px;
  z-index: 50;
  display: grid;
  place-items: center;
  filter: drop-shadow(5px 7px 0 rgba(28, 10, 17, .48));
}
.crest img { width: 100%; height: 100%; object-fit: contain; }

.main-nav {
  height: 100%;
  display: flex;
  align-items: stretch;
  gap: 0;
}
.main-nav a,
.main-nav .theme-toggle {
  min-width: 0;
  flex: 1 1 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 0 6px;
  color: #e9d5a6;
  font-weight: 900;
  font-size: 12px;
  white-space: nowrap;
  border: 0;
  border-right: 1px solid rgba(233, 202, 140, .2);
  background:
    linear-gradient(rgba(61, 24, 87, .92), rgba(40, 16, 56, .97)),
    url("assets/purple-texture.png") center / 650px 70px repeat;
  text-shadow: 1px 2px 0 #16081f;
  cursor: pointer;
  transition: transform .16s ease, filter .16s ease, color .16s ease;
}
.main-nav a:hover,
.main-nav a.active {
  color: #ffdd5d;
  background:
    linear-gradient(rgba(83, 34, 108, .94), rgba(55, 20, 74, .98)),
    url("assets/purple-texture.png") center / 650px 70px repeat;
  box-shadow: inset 0 -5px 0 #dca827;
}
.main-nav a:hover { filter: brightness(1.12); }
.main-nav a span { color: var(--gold-light); font-size: 19px; }
.main-nav .theme-toggle { max-width: 60px; font-size: 22px; color: var(--gold-light); }
.menu-toggle { display: none; }

/* Keep monetization outside guide copy, maps, and interactive controls. */
.page-shell > .ad-unit,
#main-content > .ad-unit {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: center;
  clear: both;
  overflow: hidden;
  text-align: center;
}

.page-shell > .header-ad {
  width: 100%;
  margin: 16px auto 8px;
  padding: 0 24px 0 206px;
}

#main-content > .content-ad {
  width: min(calc(100% - 28px), 1120px);
  margin: 24px auto;
}

.page-shell > .footer-ad {
  width: min(calc(100% - 28px), 1120px);
  margin: 8px auto 18px;
}

.page-shell > .ad-unit > *,
#main-content > .ad-unit > * {
  max-width: 100%;
}

.hero {
  min-height: 142px;
  margin: 0;
  padding: 18px 275px 15px 218px;
  position: relative;
  border-inline: 0;
  border-top: 0;
  box-shadow: inset 0 -4px 0 rgba(101, 65, 32, .2);
}
.hero-copy { position: relative; z-index: 2; }
.overline {
  margin: 0 0 4px;
  color: #6b4a23;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .14em;
}
.hero h1 {
  margin: 0;
  color: #2f171c;
  font-family: var(--serif);
  font-weight: 1000;
  font-size: clamp(30px, 3vw, 47px);
  line-height: 1.03;
  letter-spacing: -2px;
  text-shadow: 2px 2px 0 rgba(255, 229, 164, .8);
}
.hero h1 span {
  color: var(--purple);
  font-family: Impact, "Arial Black", sans-serif;
  font-size: 1.18em;
  letter-spacing: 1px;
  -webkit-text-stroke: 1px #2b132f;
  text-shadow: 3px 3px 0 #d2a440;
}
.hero-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 13px;
  margin-top: 14px;
  color: #3f2a1c;
  font-weight: 900;
  font-size: 13px;
}
.hero-links a:hover { color: var(--purple-2); transform: translateY(-1px); }
.hero-links i { font-style: normal; color: #947030; font-size: 11px; }

.hero-note {
  position: absolute;
  right: 23px;
  top: 13px;
  width: 235px;
  height: 116px;
  padding: 26px 72px 10px 16px;
  background:
    linear-gradient(rgba(244, 223, 166, .9), rgba(225, 194, 126, .93)),
    url("assets/paper-texture.png") center / cover;
  border: 1px solid #8c612d;
  box-shadow: 3px 5px 0 rgba(80, 43, 19, .3);
  transform: rotate(-1.8deg);
  font-family: var(--serif);
}
.hero-note .tape {
  position: absolute;
  width: 64px;
  height: 18px;
  left: 86px;
  top: -9px;
  background: rgba(106, 67, 153, .68);
  transform: rotate(4deg);
}
.hero-note b { font-size: 12px; line-height: 1.4; }
.hero-note p { margin: 5px 0 0; font-size: 11px; font-weight: 700; }
.hero-note .sprite-mascot { position: absolute; right: -10px; bottom: -4px; width: 104px; height: 104px; }

.dashboard {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr) 292px;
  gap: 12px;
  padding: 12px 14px 14px;
}
.left-rail,
.right-rail,
.content-column { min-width: 0; }
.left-rail,
.right-rail { display: flex; flex-direction: column; gap: 12px; }
.content-column { display: grid; gap: 12px; }

.metal-card {
  background: linear-gradient(135deg, #978e78, #c2b49b 44%, #8b826e);
  border: 3px solid #3e342e;
  box-shadow: inset 0 0 0 3px rgba(236, 219, 182, .32), 5px 6px 0 rgba(53, 30, 23, .4);
}
.device-card {
  min-height: 287px;
  padding: 7px 7px 5px;
  position: relative;
  overflow: hidden;
}
.device-card img { width: 100%; height: 264px; object-fit: contain; }
.device-led {
  position: absolute;
  right: 12px;
  bottom: 7px;
  color: #3c332a;
  font-size: 11px;
  font-weight: 900;
}
.device-led span { display: inline-block; width: 7px; height: 7px; margin-right: 4px; border-radius: 50%; background: #86aa43; box-shadow: 0 0 6px #bbf16c; }

.panel-heading,
.right-heading {
  min-height: 39px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 11px;
  border-bottom: 2px solid rgba(12, 5, 18, .76);
  box-shadow: inset 0 -1px 0 rgba(214, 160, 46, .35);
}
.panel-heading h2,
.right-heading h2 { margin: 0; font-family: var(--serif); font-size: 16px; letter-spacing: .02em; }
.panel-heading > span,
.right-heading > span {
  padding: 3px 6px;
  color: #2b1816;
  background: var(--gold-light);
  border: 1px solid #7a4b1d;
  font-size: 11px;
  font-weight: 1000;
  box-shadow: 1px 2px 0 rgba(0,0,0,.3);
}
.panel-heading > span.recommend,
.right-heading > span.new { color: #fff0d0; background: #b54c2c; }
.panel-heading > span.danger { color: #fff0d0; background: #982f2f; }

.quick-nav { min-height: 191px; }
.quick-nav ul { list-style: none; margin: 0; padding: 5px 9px 8px; }
.quick-nav li {
  min-height: 23px;
  display: flex;
  align-items: center;
  gap: 6px;
  border-bottom: 1px dashed rgba(235, 207, 157, .2);
}
.quick-nav li:last-child { border: 0; }
.quick-nav a {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 4px 0;
  color: #f1e2bf;
  font-size: 11px;
  font-weight: 800;
}
.quick-nav a:hover { color: #ffe267; transform: translateX(3px); }
.quick-nav b { width: 17px; color: #d5b2dc; text-align: center; }
.quick-nav em { font-style: normal; color: #2c1614; background: #f2cf4d; padding: 2px 6px; font-size: 11px; font-weight: 1000; }
.quick-nav em.hot { color: #fff3df; background: #c6582f; }

.completion-card {
  min-height: 190px;
  padding: 14px 16px 13px;
  position: relative;
  text-align: center;
  overflow: hidden;
}
.completion-card p { margin: 0; color: #4a351f; font-size: 11px; font-weight: 900; }
.completion-card > strong {
  display: block;
  margin: 5px 0 7px;
  color: #5b2674;
  font-family: Impact, "Arial Black", sans-serif;
  font-size: 46px;
  letter-spacing: 1px;
}
.progress {
  display: block;
  height: 9px;
  background: rgba(71, 59, 44, .25);
  border-radius: 999px;
  overflow: hidden;
  box-shadow: inset 0 1px 2px rgba(0,0,0,.45);
}
.progress > span,
.progress > i {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, #6e2f83, #9b4aa5 72%, #2b1a2f 72%);
  border-radius: inherit;
  transition: width 1s cubic-bezier(.2,.7,.1,1);
}
.animate .progress > span,
.animate .progress > i,
.progress.animate > span,
.progress.animate > i { width: var(--value); }
.progress.major { height: 14px; border: 2px solid #4c3927; }
.completion-meta { display: flex; justify-content: space-between; margin-top: 9px; padding-inline: 3px; font-size: 12px; font-weight: 800; }
.completion-card .sprite-treasure { position: absolute; width: 74px; height: 74px; left: 50%; bottom: -22px; transform: translateX(-50%); filter: drop-shadow(2px 3px 0 rgba(0,0,0,.3)); }

.map-card { overflow: hidden; }
.map-header {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 10px 12px 10px 16px;
  background:
    linear-gradient(90deg, rgba(63, 24, 88, .98), rgba(35, 13, 50, .95)),
    url("assets/purple-texture.png") center / 650px 70px;
  color: #f5e7be;
  border-bottom: 3px solid #2d1720;
}
.map-header > div { min-width: 0; }
.map-header small { display: block; color: #d4acd9; font-size: 11px; font-weight: 900; letter-spacing: .12em; }
.map-header h2 { margin: 1px 0 0; font-family: var(--serif); font-size: 21px; line-height: 1.05; }
.map-header p { margin: 4px 0 0; color: #dbcda9; font-size: 12px; font-weight: 700; line-height: 1.4; }
a.map-filter, .map-filter {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex: 0 0 auto;
  border: 1px solid #d2a443;
  background: rgba(18, 8, 27, .68);
  color: #f0d899;
  padding: 6px 9px;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}
.map-filter span { color: #ffe26b; font-size: 15px; line-height: .7; }
.map-filter:hover { background: #5a2670; }

.map-card .map-stage {
  position: relative;
  min-height: 0;
  overflow: hidden;
  background: #241629;
}
.map-artwork {
  position: relative;
  aspect-ratio: 1440 / 1078;
  overflow: hidden;
  background: #4b4d47;
}
.map-artwork picture,
.map-artwork picture img { display: block; width: 100%; height: 100%; }
.map-artwork picture img { object-fit: contain; object-position: center; filter: saturate(.95) contrast(1.04); }
.map-artwork::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  box-shadow: inset 0 0 22px rgba(24, 9, 13, .68);
}
.map-landmarks {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
}
.map-landmark {
  position: absolute;
  display: grid;
  place-content: center;
  width: 14%;
  min-height: 6.4%;
  padding: 4px 6px;
  color: #f7e3a1;
  background: rgba(16, 9, 9, .72);
  border: 1px solid rgba(221, 174, 79, .44);
  border-radius: 2px;
  text-align: center;
  text-shadow: 1px 1px 0 #000;
  transform: translate(-50%, -50%);
  pointer-events: auto;
  transition: color .15s ease, background .15s ease, border-color .15s ease, filter .15s ease;
}
.map-landmark span { color: #d7a64d; font: 900 clamp(10px, .9vw, 12px)/1.1 var(--sans); letter-spacing: .08em; }
.map-landmark strong { display: block; margin-top: 2px; font: 900 clamp(11px, 1.05vw, 14px)/1.12 var(--serif); }
.map-landmark:hover,
.map-landmark:focus-visible { color: #fff5bd; background: rgba(79, 31, 93, .93); border-color: #f4d168; filter: drop-shadow(0 0 6px rgba(255, 222, 99, .7)); }
.lm-village { left: 24.4%; top: 17.6%; }
.lm-desert { left: 58.7%; top: 9.6%; }
.lm-volcano { left: 85.8%; top: 15.1%; }
.lm-forest { left: 11.8%; top: 53.5%; }
.lm-castle { left: 51%; top: 46.4%; }
.lm-ice { left: 84%; top: 58%; }
.lm-waves { left: 26%; top: 81.1%; }
.lm-chaos { left: 63%; top: 81.2%; }
.map-overview {
  position: absolute;
  left: 17%;
  right: 17%;
  bottom: 1.7%;
  z-index: 2;
  min-height: 6.6%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(9px, 2vw, 24px);
  color: #432a1c;
  font-size: clamp(11px, 1.05vw, 14px);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.map-overview span { white-space: nowrap; }
.map-overview b { color: #552063; font-family: var(--serif); font-size: 1.35em; }

.map-footer {
  min-height: 49px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 12px 8px 15px;
  border-top: 2px solid #6a451e;
}
.map-footer p { margin: 0; max-width: 560px; font-size: 12px; font-weight: 700; line-height: 1.45; }
.map-footer p b { color: #5a236f; }
.map-footer p span { display: block; margin-top: 2px; }
.map-footer button,
.panel-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid #d6af53;
  color: #f7e4b1;
  background: linear-gradient(#5d2b75, #3b1850);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.09), 2px 2px 0 rgba(44, 25, 19, .5);
  padding: 7px 11px;
  font-size: 12px;
  font-weight: 1000;
  white-space: nowrap;
  cursor: pointer;
}
.map-footer button:hover,
.panel-link:hover { filter: brightness(1.15); transform: translateY(-1px); }

.lower-grid {
  display: grid;
  grid-template-columns: 1.04fr .92fr 1.08fr;
  gap: 12px;
}
.lower-grid > article { min-height: 260px; overflow: hidden; position: relative; padding-bottom: 34px; }
.lower-grid .panel-link {
  position: absolute;
  left: 9px;
  right: 9px;
  bottom: 8px;
  height: 26px;
  padding: 4px 7px;
  border-color: #7f4f8e;
  background: rgba(90, 39, 111, .68);
}

.treasure-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; padding: 8px 7px 3px; }
.treasure-list button {
  min-width: 0;
  padding: 5px 3px 7px;
  color: #f7e9ba;
  background: rgba(15, 6, 24, .58);
  border: 1px solid #9c7534;
  cursor: pointer;
}
.treasure-list button:hover { background: rgba(96, 40, 116, .66); transform: translateY(-2px); }
.treasure-list .sprite-treasure { width: 82px; height: 82px; margin: 0 auto 2px; filter: drop-shadow(2px 3px 0 rgba(0,0,0,.4)); }
.treasure-list b { display: block; color: #f2ca54; font-size: 11px; }
.treasure-list small { display: block; margin-top: 3px; font-size: 11px; color: #cfc0a0; }
.treasure-list em { display: block; margin-top: 4px; font-style: normal; font-size: 11px; }

.route-card .subcopy { margin: 9px 11px 0; color: #d8c5a5; font-size: 12px; }
.route-flow { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; align-items: center; gap: 3px; padding: 5px 8px 0; }
.route-flow figure { margin: 0; min-width: 0; text-align: center; }
.route-flow .sprite { margin: 0 auto; }
.route-flow .sprite-region { width: 76px; height: 51px; border: 1px solid #b78933; box-shadow: 0 2px 0 rgba(0,0,0,.35); }
.route-flow .sprite-treasure { width: 56px; height: 56px; }
.route-flow figcaption { font-size: 11px; color: #e6d3ad; }
.route-flow > b { color: #f2ce4a; font-size: 18px; }
.paper-tip {
  margin: 8px 10px;
  padding: 8px 10px;
  color: #2e2118;
  background: #e6ca88;
  border: 1px solid #77512a;
  box-shadow: inset 0 0 10px rgba(97, 54, 19, .22), 2px 3px 0 rgba(0,0,0,.25);
  font-size: 12px;
  line-height: 1.45;
  transform: rotate(-.6deg);
}

.boss-card ul { list-style: none; margin: 0; padding: 4px 8px 2px; }
.boss-card li {
  display: grid;
  grid-template-columns: 74px 1fr;
  gap: 8px;
  align-items: center;
  min-height: 58px;
  padding: 5px 0;
  border-bottom: 1px dashed rgba(230, 198, 139, .27);
}
.boss-card li:last-child { border: 0; }
.boss-card li .sprite-boss { width: 74px; height: 50px; border: 1px solid #b78933; box-shadow: 0 2px 0 rgba(0,0,0,.34); }
.boss-card p { margin: 0; min-width: 0; }
.boss-card p b { display: block; color: #efc54e; font-size: 11px; }
.boss-card p span { display: block; color: #d8b88a; font-size: 11px; font-weight: 900; }
.boss-card p small { display: block; margin-top: 2px; font-size: 11px; line-height: 1.3; }

.right-rail .paper-panel { overflow: hidden; }
.right-heading {
  color: #f4e5b6;
  background:
    linear-gradient(rgba(61, 24, 87, .97), rgba(43, 16, 61, .98)),
    url("assets/purple-texture.png") center / 650px 70px;
}
.progress-card { min-height: 264px; }
.progress-card ul { list-style: none; margin: 0; padding: 6px 10px 8px; }
.progress-card li { display: grid; grid-template-columns: 38px 1fr; gap: 7px; align-items: center; min-height: 40px; }
.progress-card li > .sprite { width: 34px; height: 34px; filter: drop-shadow(1px 2px 0 rgba(72,43,20,.22)); }
.progress-card li p { margin: 0; display: grid; grid-template-columns: 1fr auto; gap: 2px 7px; align-items: center; }
.progress-card li b { font-size: 12px; }
.progress-card li em { font-style: normal; font-size: 12px; font-weight: 1000; }
.progress-card li .progress { grid-column: 1 / -1; height: 7px; }

.updates-card { min-height: 182px; }
.updates-card ul { list-style: none; margin: 0; padding: 6px 10px 9px; }
.updates-card li { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; padding: 7px 0; border-bottom: 1px dashed rgba(74, 49, 28, .35); }
.updates-card li:last-child { border: 0; }
.updates-card a { min-width: 0; font-size: 12px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.updates-card a::before { content: "◆"; color: #6b2a7e; margin-right: 5px; font-size: 10px; }
.updates-card a:hover { color: #6d2b7d; }
.updates-card time { color: #766145; font-size: 11px; }

.tips-card { min-height: 286px; padding-bottom: 38px; position: relative; overflow: hidden; }
.tips-title { display: flex; align-items: center; justify-content: space-between; padding: 8px 11px; border-bottom: 2px solid #160821; }
.tips-title h2 { margin: 0; color: #f5d95c; font-family: var(--serif); font-size: 14px; line-height: 1.15; }
.tips-title > span { color: #f3c83d; font-size: 28px; }
.tips-card blockquote {
  margin: 8px 10px;
  padding: 7px 9px;
  color: #2e2118;
  background: #ead39a;
  border: 1px solid #74502c;
  box-shadow: 2px 3px 0 rgba(0,0,0,.28);
  font-family: var(--serif);
  font-size: 12px;
  line-height: 1.4;
}
.tips-card blockquote:nth-of-type(2) { transform: rotate(-.8deg); }
.tips-card blockquote:nth-of-type(3) { transform: rotate(.7deg); }
.tips-card cite { display: block; margin-top: 3px; text-align: right; font-style: normal; font-size: 11px; }
.tips-card .panel-link { position: absolute; left: 10px; right: 10px; bottom: 8px; height: 26px; }

.utility-strip {
  min-height: 96px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  border-inline: 0;
  padding: 9px 24px;
  gap: 12px;
}
.utility-strip article { display: grid; grid-template-columns: 64px 1fr; gap: 9px; align-items: center; min-width: 0; }
.utility-strip article + article { border-left: 1px dashed rgba(80, 50, 25, .4); padding-left: 12px; }
.utility-strip .sprite { width: 60px; height: 60px; filter: drop-shadow(2px 3px 0 rgba(60, 35, 20, .25)); }
.utility-strip article:last-child .sprite { width: 70px; height: 70px; }
.utility-strip p { margin: 0; min-width: 0; }
.utility-strip b { display: block; color: #542067; font-family: var(--serif); font-size: 12px; }
.utility-strip span { display: block; margin-top: 2px; font-size: 12px; line-height: 1.4; font-weight: 700; }

.site-footer {
  min-height: 82px;
  position: relative;
  display: flex;
  align-items: center;
  padding: 11px 155px 11px 90px;
  color: #e6d5b3;
  background:
    linear-gradient(rgba(32, 12, 45, .93), rgba(25, 9, 35, .98)),
    url("assets/purple-texture.png") center / 650px 70px repeat;
  border-top: 4px solid #14071c;
}
.site-footer > .sprite-treasure:first-child { position: absolute; left: 24px; width: 66px; height: 66px; filter: drop-shadow(2px 3px 0 rgba(0,0,0,.35)); }
.site-footer p { margin: 0; font-size: 12px; line-height: 1.55; }
.footer-mascot { position: absolute; right: 16px; bottom: -9px; width: 126px; height: 126px; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 30px;
  z-index: 200;
  max-width: calc(100vw - 36px);
  padding: 10px 15px;
  color: #fff1c8;
  background: #321447;
  border: 2px solid #e5bd41;
  box-shadow: 0 10px 30px rgba(0,0,0,.45);
  font-size: 12px;
  font-weight: 900;
  opacity: 0;
  transform: translate(-50%, 20px);
  pointer-events: none;
  transition: .22s ease;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

body.night .page-shell { filter: saturate(.82) brightness(.82); }
body.night .topbar,
body.night .site-footer { filter: brightness(1.15); }

@media (max-width: 1180px) {
  .main-nav a { font-size: 12px; padding-inline: 7px; }
  .dashboard { grid-template-columns: 224px minmax(0, 1fr) 262px; }
  .hero { padding-right: 250px; padding-left: 205px; }
  .hero-note { width: 215px; }
  .lower-grid { grid-template-columns: 1fr 1fr; }
  .boss-card { grid-column: 1 / -1; }
  .boss-card ul { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .boss-card li { grid-template-columns: 70px 1fr; border-bottom: 0; }
  .utility-strip { padding-inline: 12px; }
  .utility-strip article { grid-template-columns: 50px 1fr; }
  .utility-strip .sprite { width: 48px; height: 48px; }
}

@media (max-width: 1020px) {
  .map-card .map-stage { overflow: visible; }
  .map-landmarks {
    position: static;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
    padding: 10px;
    background: #241629;
    pointer-events: auto;
  }
  .map-landmark {
    position: static;
    width: auto;
    min-height: 44px;
    padding: 7px 9px;
    text-align: left;
    transform: none;
  }
  .map-landmark span { font-size: 11px; }
  .map-landmark strong { font-size: 13px; }
}

@media (max-width: 920px) {
  .topbar { height: auto; min-height: 60px; padding-left: 150px; }
  .crest { width: 138px; height: 126px; }
  .page-shell > .header-ad { padding-left: 158px; }
  .menu-toggle {
    display: block;
    position: absolute;
    right: 12px;
    top: 11px;
    z-index: 60;
    padding: 8px 12px;
    color: #f0d25a;
    background: #43205b;
    border: 1px solid #a171b0;
    font-weight: 900;
  }
  .main-nav { display: none; height: auto; grid-template-columns: repeat(3, 1fr); padding-top: 60px; margin-left: -150px; }
  .main-nav.open { display: grid; }
  .main-nav a, .main-nav .theme-toggle { min-height: 46px; }
  .hero { padding-left: 160px; padding-right: 20px; }
  .hero-note { display: none; }
  .dashboard { grid-template-columns: 220px minmax(0, 1fr); }
  .right-rail { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, 1fr); }
  .right-rail > * { min-height: 250px; }
  .utility-strip { grid-template-columns: repeat(3, 1fr); }
  .utility-strip article + article { border-left: 0; }
}

@media (max-width: 700px) {
  .page-shell { border: 0; }
  .topbar { padding-left: 0; min-height: 78px; }
  .crest { position: relative; top: 3px; left: 7px; width: 77px; height: 72px; }
  .page-shell > .ad-unit,
  #main-content > .ad-unit {
    width: calc(100% - 20px);
  }
  .page-shell > .header-ad {
    margin-top: 12px;
    padding: 0;
  }
  #main-content > .content-ad { margin-block: 20px; }
  .page-shell > .footer-ad { margin-bottom: 14px; }
  .menu-toggle { top: 20px; }
  .main-nav { margin-left: 0; padding-top: 0; grid-template-columns: repeat(2, 1fr); }
  .hero { padding: 15px 14px; }
  .hero h1 { font-size: 28px; }
  .hero h1 span { display: block; font-size: 38px; }
  .hero-links { gap: 8px; font-size: 11px; }
  .dashboard { display: block; padding: 10px; }
  .left-rail { display: grid; grid-template-columns: 1fr 1fr; margin-bottom: 12px; }
  .completion-card { grid-column: 1 / -1; }
  .content-column { margin-bottom: 12px; }
  .map-card .map-stage { min-height: 0; overflow: visible; }
  .map-footer { align-items: flex-start; flex-direction: column; }
  .map-footer button { align-self: flex-end; }
  .lower-grid { grid-template-columns: 1fr; }
  .boss-card { grid-column: auto; }
  .boss-card ul { display: block; }
  .right-rail { display: block; }
  .right-rail > * { margin-bottom: 12px; }
  .utility-strip { grid-template-columns: 1fr 1fr; }
  .utility-strip article { min-height: 70px; }
  .utility-strip article:last-child { grid-column: 1 / -1; }
  .site-footer { padding: 14px 15px 95px 70px; }
  .footer-mascot { right: 10px; }
}

@media (max-width: 470px) {
  .hero h1 { font-size: 24px; }
  .hero h1 span { font-size: 32px; }
  .left-rail { display: block; }
  .left-rail > * { margin-bottom: 11px; }
  .map-header { align-items: flex-start; gap: 10px; padding-left: 12px; }
  .map-header p { display: none; }
  .map-header h2 { font-size: 18px; }
  .map-header small { letter-spacing: .1em; }
  a.map-filter, .map-filter { padding: 7px 9px; font-size: 11px; }
  .map-card .map-stage { min-height: 0; }
  .map-overview { gap: 8px; font-size: 11px; letter-spacing: 0; }
  .lower-grid > article { min-height: 275px; }
  .treasure-list .sprite-treasure { width: 68px; height: 68px; }
  .utility-strip { grid-template-columns: 1fr; }
  .utility-strip article:last-child { grid-column: auto; }
  .site-footer { padding-left: 14px; }
  .site-footer > .sprite-treasure:first-child { display: none; }
}

@media print {
  body { background: #fff; }
  .page-shell { width: 100%; box-shadow: none; border: 0; }
  .topbar, .ad-unit, .left-rail, .right-rail, .utility-strip, .site-footer, .lower-grid, .hero-note, .toast { display: none !important; }
  .hero { padding: 12px; }
  .dashboard { display: block; padding: 0; }
  .map-card { box-shadow: none; }
  .map-landmarks { display: none; }
}

.database-icon, .ability-icon, .route-icon { image-rendering: pixelated; object-fit: contain; filter: drop-shadow(2px 3px 0 rgba(0,0,0,.35)); }
.treasure-list a { display:grid; grid-template-columns:58px 1fr; grid-template-rows:auto auto auto; column-gap:12px; align-items:center; width:100%; padding:10px; border:1px solid rgba(244,207,86,.22); background:rgba(255,255,255,.035); text-align:left; }
.treasure-list a:hover { background:rgba(244,207,86,.1); } .treasure-list a .database-icon { grid-row:1/4; width:58px; height:58px; }
.route-flow .route-icon { width:70px; height:70px; margin-inline:auto; } .boss-card .ability-icon { width:62px; height:62px; flex:0 0 62px; }
.map-footer-link { display:inline-flex; align-items:center; gap:10px; padding:10px 15px; color:#f7df87; background:var(--purple); border:2px solid #24102f; font-weight:900; box-shadow:2px 3px 0 rgba(0,0,0,.3); }
/* Shared accessibility and layout safeguards. */
.skip-link{position:fixed;left:12px;top:10px;z-index:9999;padding:10px 14px;background:#fff7d2;color:#24102e;border:3px solid #2c123e;font-weight:900;transform:translateY(-150%);transition:transform .15s ease}
.skip-link:focus{transform:translateY(0)}
:focus-visible{outline:3px solid #ffdf55;outline-offset:3px}
.main-nav{overflow-x:auto;scrollbar-width:none}
.main-nav::-webkit-scrollbar{display:none}
.main-nav a,.main-nav .theme-toggle{padding-inline:6px;gap:4px;font-size:clamp(10px,.82vw,13px)}
.main-nav a span{font-size:16px}
.main-nav .theme-toggle{max-width:46px;flex:0 0 46px}
.paper-panel,.purple-card,.database-main>*{min-width:0}
h1,h2,h3,p,li,dd,.technical-line,.record-card,.object-card{overflow-wrap:anywhere}
input,select,button{max-width:100%}
@media (max-width:1180px) and (min-width:921px){.main-nav a span{display:none}.main-nav a{font-size:11px;padding-inline:5px}}
@media (max-width:920px){.main-nav{overflow:visible}.main-nav a span{display:inline}.main-nav a{font-size:13px}}
@media (max-width:470px){.main-nav{grid-template-columns:1fr}.main-nav a,.main-nav .theme-toggle{justify-content:flex-start;padding-inline:18px}.main-nav .theme-toggle{max-width:none}}

/* Homepage integration: keep the original visual language while reducing dashboard noise. */
.dashboard {
  grid-template-columns: 212px minmax(0, 1fr) 252px;
  align-items: start;
}

.left-rail,
.right-rail {
  position: sticky;
  top: 12px;
}

.quick-nav {
  min-height: 0;
}

.quick-nav li {
  min-height: 34px;
}

.coverage-card {
  min-height: 174px;
}

.coverage-card > strong {
  font-size: 52px;
}

.journey-card,
.facts-card {
  padding: 16px;
}

.journey-card h2 {
  margin: 5px 0 8px;
  color: var(--purple);
  font-family: var(--serif);
  font-size: 19px;
}

.journey-card p {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.55;
}

.treasure-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  padding: 8px;
}

.home-record {
  display: grid;
  grid-template-columns: 54px 1fr;
  grid-template-rows: auto auto;
  column-gap: 10px;
  align-items: center;
  padding: 7px;
  color: #f7e9ba;
  background: rgba(15, 6, 24, .5);
  border: 1px solid rgba(244, 207, 86, .24);
}

.home-record img {
  grid-row: 1 / 3;
  width: 52px;
  height: 52px;
}

.home-record b {
  color: #f2ca54;
  font-size: 11px;
}

.home-record small {
  align-self: start;
  color: #d3c4a4;
  font-size: 11px;
  line-height: 1.35;
}

.panel-label {
  pointer-events: none;
  cursor: default;
}

.facts-card {
  padding: 0;
}

.facts-card dl {
  margin: 0;
  padding: 8px 13px 12px;
}

.facts-card dl div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px dashed rgba(74, 49, 28, .35);
}

.facts-card dl div:last-child {
  border-bottom: 0;
}

.facts-card dt {
  font-size: 12px;
  font-weight: 800;
}

.facts-card dd {
  margin: 0;
  color: var(--purple);
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 900;
}

.site-footer a {
  color: var(--gold-light);
  font-weight: 800;
}

.site-footer a:hover {
  text-decoration: underline;
}

.simple-page {
  width: min(820px, calc(100% - 28px));
  min-height: 360px;
  margin: 36px auto;
  padding: clamp(24px, 5vw, 58px);
}

.simple-page h1 {
  margin: 6px 0 16px;
  color: var(--purple);
  font-family: var(--serif);
  font-size: clamp(32px, 6vw, 52px);
}

.simple-page p,
.article-page {
  line-height: 1.7;
}

.simple-action,
.simple-search button {
  display: inline-block;
  margin-top: 16px;
  padding: 10px 15px;
  color: #f7e4b1;
  background: var(--purple);
  border: 2px solid #24102f;
  font-weight: 900;
}

.simple-search label {
  display: block;
  margin-bottom: 6px;
  font-weight: 900;
}

.simple-search div {
  display: flex;
  gap: 8px;
}

.simple-search input {
  flex: 1;
  min-width: 0;
  padding: 10px;
  border: 2px solid #6d4929;
  background: #fff3cf;
}

.simple-search button {
  margin-top: 0;
}

.guide-library {
  width: min(1040px, calc(100% - 28px));
}

.search-summary {
  margin: 20px 0 0;
  padding: 10px 12px;
  background: rgba(255, 244, 199, .55);
  border-left: 4px solid var(--purple);
  font-weight: 800;
}

.guide-note-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 24px;
}

.guide-note-card {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  min-height: 118px;
  overflow: hidden;
  color: #f5e7bd;
  background: linear-gradient(145deg, var(--purple-2), var(--purple-3));
  border: 2px solid #25102f;
  box-shadow: 3px 4px 0 rgba(56, 31, 24, .35);
}

.guide-note-card:hover {
  color: #ffe267;
  filter: brightness(1.08);
}

.guide-note-card img {
  width: 100%;
  height: 100%;
  min-height: 118px;
  object-fit: cover;
}

.guide-note-card > span {
  display: grid;
  align-content: center;
  gap: 7px;
  min-width: 0;
  padding: 16px;
}

.guide-note-card strong {
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.15;
}

.guide-note-card small {
  color: #d8c9aa;
  line-height: 1.45;
}

.guide-empty-state {
  margin-top: 24px;
  padding: 24px;
  text-align: center;
  background: rgba(255, 246, 211, .5);
  border: 1px dashed #755139;
}

.guide-empty-state h2 {
  margin: 0 0 8px;
  color: var(--purple);
  font-family: var(--serif);
}

.guide-empty-state p {
  margin: 0;
}

.guide-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
  font-weight: 900;
}

.guide-pagination a,
.guide-pagination span {
  padding: 8px 11px;
  border: 2px solid var(--purple);
}

.guide-pagination a {
  color: #f7e4b1;
  background: var(--purple);
}

.article-page {
  width: min(900px, calc(100% - 28px));
}

.article-page.article-wide {
  width: min(1180px, calc(100% - 28px));
}

.article-header time {
  display: inline-block;
  margin-bottom: 18px;
  color: #644326;
  font-size: 12px;
  font-weight: 900;
}

.article-banner {
  width: 100%;
  max-height: 440px;
  margin-bottom: 28px;
  object-fit: cover;
  border: 3px solid #56351f;
}

.article-content {
  min-width: 0;
  font-size: 16px;
  line-height: 1.75;
}

.article-content h2,
.article-content h3 {
  margin: 1.6em 0 .55em;
  color: var(--purple);
  font-family: var(--serif);
  line-height: 1.15;
}

.article-content a {
  color: var(--purple-2);
  font-weight: 900;
  text-decoration: underline;
}

.article-content img {
  height: auto;
  margin: 20px auto;
}

.article-content pre,
.article-content code {
  overflow-wrap: anywhere;
}

.article-content pre {
  max-width: 100%;
  overflow: auto;
  padding: 14px;
  color: #f5e5bc;
  background: var(--purple-3);
}

.article-content blockquote {
  margin-inline: 0;
  padding: 10px 16px;
  background: rgba(255, 241, 188, .55);
  border-left: 4px solid var(--purple);
}

.article-content table {
  display: block;
  max-width: 100%;
  overflow-x: auto;
  border-collapse: collapse;
}

.article-content th,
.article-content td {
  padding: 8px;
  border: 1px solid #755139;
}

@media (max-width: 1180px) {
  .dashboard {
    grid-template-columns: 190px minmax(0, 1fr) 225px;
  }
}

@media (max-width: 920px) {
  .dashboard {
    grid-template-columns: 205px minmax(0, 1fr);
  }

  .left-rail,
  .right-rail {
    position: static;
  }

  .right-rail {
    grid-template-columns: 1fr 1fr;
  }

  .right-rail .tips-card {
    grid-column: 1 / -1;
  }
}

@media (max-width: 700px) {
  .dashboard {
    display: flex;
    flex-direction: column;
  }

  .content-column {
    order: 1;
    width: 100%;
  }

  .left-rail {
    order: 2;
    width: 100%;
  }

  .right-rail {
    order: 3;
    width: 100%;
  }

  .left-rail {
    grid-template-columns: 1fr 1fr;
  }

  .journey-card {
    grid-column: 1 / -1;
  }

  .right-rail {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .right-rail > *,
  .right-rail .tips-card {
    grid-column: auto;
    margin: 0;
  }

  .guide-note-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 470px) {
  .left-rail {
    display: block;
  }

  .simple-search div {
    align-items: stretch;
    flex-direction: column;
  }

  .guide-note-card {
    grid-template-columns: 96px minmax(0, 1fr);
  }

  .guide-note-card img {
    min-height: 104px;
  }
}

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

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

/* Guide entry points and catalog pages. */
.archive-entry-section {
  margin: 0 14px 14px;
  padding: 18px;
}

.archive-entry-section > header {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: 5px 18px;
  margin-bottom: 14px;
}

.archive-entry-section > header .overline {
  width: 100%;
}

.archive-entry-section h2 {
  margin: 0;
  color: var(--purple);
  font-family: var(--serif);
  font-size: clamp(23px, 3vw, 34px);
}

.archive-entry-section > header p:last-child {
  margin: 0 0 4px;
  font-size: 11px;
  font-weight: 700;
}

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

.archive-entry-grid a {
  display: grid;
  grid-template-columns: 48px 1fr;
  grid-template-rows: auto auto;
  align-items: center;
  column-gap: 9px;
  min-height: 74px;
  padding: 9px;
  color: #f3e3b9;
  background: linear-gradient(145deg, var(--purple-2), var(--purple-3));
  border: 2px solid #25102f;
  box-shadow: inset 0 0 0 1px rgba(244, 207, 86, .17), 2px 3px 0 rgba(0, 0, 0, .28);
}

.archive-entry-grid a:hover {
  color: #ffe267;
  filter: brightness(1.12);
  transform: translateY(-2px);
}

.archive-entry-grid .sprite,
.archive-entry-grid .archive-letter {
  grid-row: 1 / 3;
  width: 46px;
  height: 46px;
}

.archive-entry-grid .archive-letter {
  display: grid;
  place-items: center;
  color: var(--gold-light);
  font-family: var(--serif);
  font-size: 32px;
  font-weight: 900;
}

.archive-entry-grid strong {
  align-self: end;
  font-family: var(--serif);
  font-size: 15px;
}

.archive-entry-grid small {
  align-self: start;
  margin-top: 2px;
  color: #cabd9e;
  font-size: 11px;
  line-height: 1.3;
}

.database-main {
  width: min(1260px, calc(100% - 28px));
  margin: 26px auto 40px;
}

.database-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: clamp(22px, 4vw, 42px);
}

.database-hero h1 {
  margin: 4px 0 10px;
  color: var(--purple);
  font-family: var(--serif);
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1;
}

.database-hero p:last-child {
  max-width: 760px;
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.55;
}

.database-stat {
  flex: 0 0 132px;
  padding: 14px;
  color: #f5e5b9;
  background: var(--purple);
  border: 2px solid #25102f;
  box-shadow: inset 0 0 0 2px rgba(244, 207, 86, .16), 4px 5px 0 rgba(56, 31, 24, .35);
  text-align: center;
}

.database-stat strong,
.database-stat span {
  display: block;
}

.database-stat strong {
  color: var(--gold-light);
  font-family: Impact, "Arial Black", sans-serif;
  font-size: 42px;
}

.database-stat span {
  margin-top: 2px;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.database-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(180px, .4fr);
  gap: 12px;
  margin-top: 14px;
  padding: 14px;
}

.database-toolbar label {
  display: grid;
  gap: 5px;
  color: #54351e;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.database-toolbar input,
.database-toolbar select {
  width: 100%;
  min-height: 42px;
  padding: 9px 11px;
  color: var(--ink);
  background: #fff1c9;
  border: 2px solid #704b29;
  border-radius: 0;
  font-size: 13px;
}

.database-results {
  min-height: 36px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 8px 4px 4px;
  color: #5b3b22;
  font-size: 11px;
  font-weight: 900;
}

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

.archive-card {
  display: grid;
  grid-template-columns: 108px minmax(0, 1fr);
  min-height: 210px;
  overflow: hidden;
}

.archive-card-visual {
  min-height: 100%;
  display: grid;
  place-items: center;
  padding: 13px;
  background: linear-gradient(145deg, #4b205f, #25102f);
  border-right: 2px solid #6d4929;
}

.archive-card-visual img {
  width: 88px;
  height: 88px;
  object-fit: contain;
  image-rendering: pixelated;
  filter: drop-shadow(3px 4px 0 rgba(0, 0, 0, .35));
}

.archive-card-body {
  min-width: 0;
  padding: 14px;
}

.archive-card h2 {
  margin: 7px 0 4px;
  color: var(--purple);
  font-family: var(--serif);
  font-size: 20px;
}

.archive-card code {
  color: #72583a;
  font-size: 11px;
  font-weight: 800;
}

.archive-card p {
  margin: 8px 0 0;
  font-size: 12px;
  line-height: 1.45;
}

.archive-badges,
.capability-list,
.level-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.archive-badges span,
.capability-list span,
.archive-card .level-chip-list span {
  padding: 3px 6px;
  color: #f3e3bd;
  background: var(--purple);
  border: 1px solid #2a1034;
  font-size: 11px;
  font-weight: 900;
}

.archive-badges .chest-grey { color: #302820; background: #cfc5b4; }
.archive-badges .chest-red { color: #fff1dc; background: #9d2f2f; }
.archive-badges .chest-green { color: #f2f4dc; background: #42692e; }
.archive-badges .chest-blue { color: #f0f4ff; background: #315b91; }

.level-chip-list,
.capability-list {
  margin-top: 10px;
}

.archive-card .level-chip-list span {
  min-width: 28px;
  text-align: center;
}

.archive-empty {
  grid-column: 1 / -1;
  padding: 40px;
  text-align: center;
  font-weight: 900;
}

@media (max-width: 1100px) {
  .archive-entry-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

@media (max-width: 700px) {
  .archive-entry-section {
    margin-inline: 10px;
  }

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

  .database-hero {
    align-items: stretch;
    flex-direction: column;
  }

  .database-stat {
    flex-basis: auto;
  }

  .database-toolbar,
  .archive-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 470px) {
  .archive-entry-grid {
    grid-template-columns: 1fr;
  }

  .archive-card {
    grid-template-columns: 82px minmax(0, 1fr);
  }

  .archive-card-visual {
    padding: 8px;
  }

  .archive-card-visual img {
    width: 66px;
    height: 66px;
  }
}
