/* Global chrome and the lookup desk */
:root {
  --ink: #24202a;
  --muted: #645c68;
  --teal: #76506e;
  --dark: #241f2b;
  --paper: #f6f2ed;
  --line: #d5cdd1;
  --coral: #f38daf;
  --display: "Arial Black", "Microsoft YaHei UI", "PingFang SC", sans-serif;
}
.mast {
  background: #19151f;
  color: #f6f0ed;
  border-color: #35303b;
}
.mast .shell,
.hub-shell,
.foot {
  max-width: 1232px;
  width: calc(100% - 80px);
}
.mast-inner {
  min-height: 64px;
  gap: 26px;
}
.brand,
.brand:hover {
  color: #fff6ee;
}
.brand img {
  width: 38px;
  height: 38px;
}
.brand span {
  font:
    900 italic 17px/0.95 Arial,
    sans-serif;
  letter-spacing: 0.01em;
}
.brand small {
  font: 650 9px/1 var(--sans);
  letter-spacing: 0.23em;
  margin-top: 4px;
  color: #e1c4d4;
}
.mast nav {
  gap: 27px;
}
.mast nav a {
  color: #c9bfce;
  font-weight: 700;
}
.mast nav a[aria-current] {
  color: white;
}
.mast nav a[aria-current="page"]:after {
  background: #fa98bc;
  height: 3px;
}
.mast .spoiler-switch {
  color: #ede5ed;
}
.switch-track {
  background: #615667;
}
.spoiler-switch[aria-pressed="true"] .switch-track {
  background: #ca7798;
}
footer {
  background: #19151f;
  border-color: #39303d;
  color: #d7cbd4;
}
.foot,
.foot b,
.foot a {
  color: #ddd0d9;
}
.handbook-desk {
  background: #19161e;
  color: #fbf5f0;
  min-height: calc(100vh - 130px);
  padding: 24px 0 38px;
}
.hub-shell {
  margin: auto;
}
.handbook-desk .hero {
  border: 1px solid #58414d;
  border-radius: 16px;
  background: #291d2f;
  min-height: 0;
  height: clamp(228px, 22vw, 300px);
}
.hero .cover-image {
  background-position: 74% 51%;
  background-size: cover;
}
.hero .cover-wash {
  background:
    linear-gradient(
      92deg,
      #221524 0%,
      rgba(42, 24, 39, 0.96) 20%,
      rgba(45, 24, 37, 0.65) 41%,
      rgba(51, 24, 38, 0.09) 68%,
      rgba(30, 18, 30, 0.02)
    ),
    linear-gradient(0deg, #2013229c, transparent 39%);
}
.cover-title {
  position: absolute;
  inset: 0 auto 0 4.2%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
}
.hero .cover-title h1 {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 18px;
  margin: 0;
  line-height: 0.98;
}
.hero .cover-title h1 span {
  font:
    900 italic clamp(76px, 7.1vw, 116px) / 0.98 "Arial Black",
    Arial,
    sans-serif;
  letter-spacing: -0.085em;
  color: #ffa0b9;
  background: linear-gradient(
    170deg,
    #ffda9d 6%,
    #ff9a98 42%,
    #f587b8 66%,
    #bc98f3 97%
  );
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  padding-right: 0.11em;
}
.hero .cover-title h1 b {
  font: 850 clamp(30px, 3.1vw, 50px) / 1.15 var(--sans);
  letter-spacing: -0.05em;
  color: #fff9ed;
}
.cover-title p {
  color: #e1d6db;
  font-size: 14px;
  font-weight: 620;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 12px 0 0 4px;
}
.cover-title i {
  display: inline-block;
  width: 22px;
  height: 1px;
  background: #eba3b2;
}
.cover-control {
  right: 16px;
  bottom: 12px;
  gap: 6px;
  max-width: calc(100% - 20px);
  height: auto;
}
.cover-control a,
.cover-control button {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #fff6f2;
  background: #211822de;
  border: 1px solid #d6b7c568;
  border-radius: 6px;
  font: 600 12px/1.2 var(--sans);
  min-height: 32px;
  padding: 3px 8px;
  text-shadow: none;
}
.lookup {
  position: relative;
  margin: 14px 0;
}
.lookup .search-box {
  background: #fcf5ef;
  border: 1px solid #dccad0;
  border-radius: 10px;
  margin: 0;
  box-shadow: none;
  width: 100%;
  color: #564257;
  min-height: 54px;
  padding: 4px 6px 4px 16px;
  gap: 10px;
}
.lookup input,
.lookup input::placeholder {
  color: #675b68;
}
.lookup .submit {
  background: #533456;
  border: 0;
  color: #fff7f0;
  border-radius: 6px;
  min-height: 42px;
  font-weight: 750;
}
.lookup .submit:hover {
  background: #70476e;
}
.hub-tools {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.hub-tool {
  --accent: #f7a8c8;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 14px;
  color: #fff5ee;
  border: 1px solid #4a3748;
  background: linear-gradient(115deg, #352833, #29222e 75%);
  border-radius: 10px;
  transition: border-color 0.12s;
}
.hub-tool:hover,
.feature-card:hover,
.chapter-strip button:hover,
.help-desk a:hover {
  border-color: var(--accent, #e8a4c7);
}
.hub-tool > svg {
  margin-left: auto;
  color: var(--accent);
}
.tile-map {
  --accent: #93e0cb;
  border-color: #374943;
  background: linear-gradient(115deg, #263834, #242b2b);
}
.tile-index {
  --accent: #ffd196;
  border-color: #504338;
  background: linear-gradient(115deg, #3b302b, #2d2829);
}
.tile-progress {
  --accent: #c3b0ff;
  border-color: #42394f;
  background: linear-gradient(115deg, #332d42, #282533);
}
.tool-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: none;
  border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent);
  color: var(--accent);
  border-radius: 10px;
  background: #17171d64;
}
.hub-tool strong,
.hub-tool small {
  display: block;
}
.hub-tool strong {
  font-size: 17px;
  line-height: 1.3;
}
.hub-tool small {
  font-size: 12px;
  color: #d2c6cf;
  margin-top: 4px;
  line-height: 1.45;
}
.home-columns {
  display: grid;
  grid-template-columns: minmax(0, 2.25fr) minmax(224px, 1fr);
  gap: 30px;
  margin-top: 30px;
}
.home-main {
  display: grid;
  gap: 28px;
  min-width: 0;
}
.desk-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: space-between;
  margin: 0 0 13px;
}
.desk-heading h2 {
  font-size: 22px;
  line-height: 1.35;
  letter-spacing: -0.035em;
  font-weight: 800;
}
.desk-heading > a,
.help-desk .all-guides {
  font-size: 13px;
  color: #e6abc5;
  font-weight: 650;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.chapter-strip {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 5px;
}
.chapter-strip button {
  border-radius: 6px;
  border: 1px solid #453a46;
  background: #28222c;
  color: #e9dfe5;
  padding: 8px 2px;
  min-height: 44px;
  font-size: 14px;
  font-weight: 700;
}
.chapter-strip button[aria-pressed="true"] {
  color: #271b29;
  background: #f6b3ca;
  border-color: #f6b3ca;
}
.chapter-brief {
  margin-top: 8px;
  padding: 8px 14px 10px;
  border: 1px solid #4a394a;
  background: #2b242e;
  border-radius: 8px;
}
.chapter-brief a,
.help-desk > a {
  display: flex;
  align-items: center;
  gap: 9px;
  justify-content: space-between;
  min-height: 44px;
  color: #f8eff1;
  font-size: 14px;
}
.chapter-brief a + a,
.help-desk > a + a {
  border-top: 1px solid #423643;
}
.chapter-brief a span {
  margin-right: auto;
}
.chapter-brief a small {
  color: #cda4be;
  font-size: 12px;
}
.chapter-brief a svg,
.help-desk a svg {
  color: #cca4bd;
}
.help-desk {
  align-self: start;
  padding: 16px 18px 9px;
  background: #252029;
  border: 1px solid #433845;
  border-radius: 10px;
}
.help-desk .desk-heading {
  margin: 0 0 6px;
}
.help-desk .desk-heading h2 {
  font-size: 19px;
}
.help-desk .all-guides {
  display: flex;
}
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.feature-card {
  overflow: hidden;
  border-radius: 9px;
  border: 1px solid #483b47;
  background: #26212b;
}
.feature-card img {
  width: 100%;
  aspect-ratio: 1.95;
  object-fit: cover;
}
.feature-card > span {
  display: block;
  padding: 12px;
}
.feature-card small {
  color: #efadc4;
  font-weight: 650;
  font-size: 12px;
}
.feature-card strong {
  display: block;
  font-size: 17px;
  margin: 3px 0;
}
.feature-card p {
  font-size: 13px;
  color: #cdbfc9;
  line-height: 1.6;
}
.coverage-note {
  border-top: 1px solid #473b46;
  margin-top: 28px;
  color: #cfc2cb;
  font-size: 13px;
  padding: 12px 0;
}
.coverage-note summary {
  font-weight: 650;
  padding: 6px 0;
}
.coverage-note summary span {
  margin-left: 12px;
  font-weight: 400;
}
.coverage-note p {
  margin: 9px 0;
}
.coverage-note div {
  display: flex;
  gap: 8px 20px;
  flex-wrap: wrap;
  color: #efb6cf;
}
.catalog-caption {
  padding: 2px 0 5px;
}
.catalog-caption a {
  display: inline-flex;
  gap: 2px;
  align-items: center;
  color: #eab8cb;
  min-height: 38px;
}
.catalog-caption h1 {
  font-size: clamp(30px, 3vw, 45px);
  line-height: 1.2;
}
.library-mode {
  background: #211c26;
}
.library-mode .hub-shell {
  max-width: 990px;
}
.library-mode #index-panel {
  background: #f8f3ed;
  color: #25202a;
  padding: 22px;
  border-radius: 12px;
  scroll-margin-top: 8px;
}
.library-mode #result-count {
  color: #6a5c69;
  font-size: 14px;
}
.library-mode #cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.library-mode .entry-card {
  min-height: 92px;
  margin: 0;
  background: #fffdfa;
  border-color: #dcd4d7;
}
.library-mode .card-copy strong {
  font-family: var(--sans);
}
.library-mode .card-img {
  width: 100px;
}
.library-mode .eng {
  color: #685d6a;
}
.library-mode .filters {
  gap: 5px;
}
.library-mode .filters button[aria-pressed="true"],
.library-mode .solid {
  background: #513455;
  color: #fff;
  border-color: #513455;
}
.library-mode .filters button {
  min-height: 38px;
}
.library-mode .filter-row {
  margin: 0 0 12px;
}
.library-mode #cards .empty {
  grid-column: 1/-1;
}
@media (max-width: 1000px) {
  .mast .shell,
  .hub-shell,
  .foot {
    width: calc(100% - 44px);
  }
  .hub-tool {
    gap: 7px;
    padding: 13px 9px;
  }
  .tool-icon {
    width: 32px;
    height: 34px;
  }
  .hub-tool small {
    font-size: 11px;
  }
  .home-columns {
    gap: 18px;
    grid-template-columns: minmax(0, 2fr) minmax(190px, 1fr);
  }
}
@media (max-width: 760px) {
  .mast .shell,
  .hub-shell,
  .foot {
    width: calc(100% - 28px);
  }
  .mast-inner {
    min-height: 54px;
    gap: 12px;
  }
  .brand {
    gap: 6px;
  }
  .brand img {
    width: 31px;
    height: 31px;
  }
  .brand span {
    font-size: 13px;
  }
  .brand small {
    font-size: 7px;
    margin-top: 4px;
  }
  .mast nav {
    gap: 12px;
    margin-left: auto;
  }
  .mast nav a,
  .mast .spoiler-switch {
    font-size: 13px;
  }
  .mast .spoiler-switch {
    padding: 0;
    gap: 4px;
    min-height: 44px;
  }
  .handbook-desk {
    padding: 12px 0 24px;
  }
  .handbook-desk .hero {
    height: 176px;
    border-radius: 11px;
  }
  .cover-title {
    left: 5%;
    bottom: 13px;
  }
  .hero .cover-title h1 {
    flex-direction: column;
    gap: 2px;
    align-items: start;
  }
  .hero .cover-title h1 span {
    font-size: clamp(54px, 13vw, 77px);
  }
  .hero .cover-title h1 b {
    font-size: clamp(24px, 5.8vw, 33px);
  }
  .cover-title p {
    font-size: 12px;
    margin: 9px 0 0;
  }
  .cover-control {
    right: 8px;
    bottom: 7px;
    gap: 4px;
  }
  .cover-control a,
  .cover-control button {
    font-size: 10px;
    min-height: 28px;
    padding: 2px 5px;
  }
  .lookup {
    margin: 10px 0;
  }
  .lookup .search-box {
    min-height: 49px;
    padding: 3px 5px 3px 12px;
  }
  .lookup .submit {
    padding: 7px 13px;
    min-height: 39px;
  }
  .hub-tools {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
  }
  .hub-tool {
    padding: 11px 9px;
    gap: 8px;
    border-radius: 8px;
  }
  .hub-tool strong {
    font-size: 15px;
  }
  .hub-tool small {
    font-size: 11px;
    margin-top: 2px;
  }
  .hub-tool > svg {
    display: none;
  }
  .tool-icon {
    width: 31px;
    height: 33px;
    border-radius: 7px;
  }
  .tool-icon svg {
    width: 19px;
  }
  .home-columns {
    margin-top: 22px;
    display: flex;
    flex-direction: column;
    gap: 20px;
  }
  .home-main {
    display: contents;
  }
  .chapter-section {
    order: 0;
  }
  .help-desk {
    order: 1;
    align-self: stretch;
  }
  .home-main > section:last-child {
    order: 2;
  }
  .desk-heading h2 {
    font-size: 20px;
  }
  .desk-heading {
    margin-bottom: 10px;
  }
  .chapter-strip {
    gap: 4px;
  }
  .chapter-strip button {
    font-size: 13px;
  }
  .feature-grid {
    grid-template-columns: 1fr;
  }
  .feature-card {
    display: grid;
    grid-template-columns: 31% 1fr;
  }
  .feature-card img {
    height: 100%;
    max-height: 120px;
    min-height: 88px;
    aspect-ratio: auto;
  }
  .feature-card > span {
    padding: 8px 12px;
  }
  .feature-card strong {
    font-size: 16px;
  }
  .library-mode #index-panel {
    padding: 14px 10px;
  }
  .library-mode #cards {
    grid-template-columns: 1fr;
  }
  .library-mode .card-img {
    width: 86px;
  }
  .library-mode .filters {
    justify-content: start;
  }
}
@media (max-width: 420px) {
  .mast nav {
    gap: 10px;
  }
  .brand span {
    display: none;
  }
  .mast-inner {
    gap: 10px;
  }
  .mast nav {
    margin-left: 0;
    margin-right: auto;
  }
}
@media (max-width: 360px) {
  .mast .shell,
  .hub-shell,
  .foot {
    width: calc(100% - 20px);
  }
  .hub-tool {
    padding: 10px 6px;
    gap: 5px;
  }
  .hub-tool small {
    font-size: 10.5px;
  }
  .chapter-strip button {
    font-size: 12px;
  }
}
.desk-codex {
  padding: 13px 0 4px;
  border-top: 1px solid #493c49;
  margin-top: 6px;
}
.desk-codex > b {
  font-size: 15px;
  display: block;
  margin-bottom: 5px;
}
.desk-codex > span {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}
.desk-codex a {
  color: #ead9e2;
  padding: 5px 8px;
  display: flex;
  align-items: center;
  gap: 5px;
  border: 1px solid #554451;
  border-radius: 5px;
  font-size: 13px;
  min-height: 34px;
}
main:has(.reader),
main:has(.reader-flow),
main:has(.atlas-page) {
  background: #181620;
  color: #f9f3ef;
}
.atlas-page {
  --ink: #faf1ed;
  --muted: #c7bdcb;
  --teal: #a7e1d3;
  --line: #514556;
}
.atlas-page .eyebrow {
  color: #94decb;
}
.atlas-page .atlas-filters input,
.atlas-page .atlas-filters select,
.atlas-page .pager button,
.map-tools button,
.atlas-page #map-info button,
.atlas-page .jump-links a {
  background: #302a36;
  color: #f4ecea;
  border-color: #62526a;
}
.atlas-page .map-list {
  background: #25212d;
  border-color: #493f50;
}
.atlas-page .pin-link {
  border-color: #463d4e;
}
.atlas-page .pin-link[aria-current] {
  background: #4a3347;
  color: #ffe0ec;
}
.atlas-page .map-stage {
  border-color: #62536b;
}
.atlas-page .atlas-visit-filter input {
  accent-color: #a5ddce;
}
.atlas-page .atlas-filters input::placeholder {
  color: #c1b6c7;
}
@media (max-width: 370px) {
  .atlas-page .atlas-filters {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
  .atlas-page .atlas-filters label {
    min-width: 0;
    max-width: 100%;
  }
}

.atlas-page .lead {
  color: #c8c0cf;
}
.hub-tool .tool-icon {
  color: #251925;
  border-color: transparent;
  background: linear-gradient(
    150deg,
    color-mix(in srgb, var(--accent) 72%, white),
    var(--accent)
  );
  box-shadow: inset 0 1px 0 #ffffff66;
}
.tool-icon svg {
  stroke-width: 1.95;
}
.tile-map {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}
.tile-map:before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0 0 0 62%;
  background:
    linear-gradient(to right, #242c2b, transparent 68%),
    url("media/leonida-atlas.webp") 54% 60%/250% auto;
  opacity: 0.16;
  pointer-events: none;
}
.chapter-brief a:hover span,
.help-desk > a:hover,
.desk-codex a:hover {
  color: #ffd3e5;
  text-decoration: underline;
}
@media (min-width: 761px) {
  .hero .cover-title h1 {
    flex-direction: column;
    gap: 1px;
    align-items: flex-start;
  }
  .hero .cover-title h1 b {
    font-size: clamp(28px, 2.8vw, 40px);
    letter-spacing: -0.035em;
  }
  .hero .cover-title h1 span {
    font-size: clamp(82px, 7.6vw, 116px);
  }
}
