/* A full-screen market entrance. All artwork is local. */
html:has([data-atlas-cover]),body:has([data-atlas-cover]) { margin:0; background:#112e2c; }
body:has([data-atlas-cover]) .shell,body:has([data-atlas-cover]) main#main { margin:0; padding:0; width:100%; max-width:none; }
html:has([data-atlas-cover]) { overflow-x: clip; }
.home-intro.atlas-cover, .atlas-ui .home-intro.atlas-cover {
  --cover-x: 0;
  --cover-y: 0;
  --ivory: #fff3d7;
  --brass: #e9c484;
  --copper: #ffbb82;
  --jade: #b9ead8;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: block;
  width: 100%;
  max-width: none;
  height: 100vh;
  height: 100svh;
  min-height: 460px;
  margin: 0;
  padding: 0;
  background: #112e2c;
  color: var(--ivory);
}
.atlas-cover .market-scene, .atlas-cover .market-shade { position: absolute; inset: 0; }
.atlas-cover .market-scene { inset: -7px; transform: translate3d(calc(var(--cover-x) * -4px),calc(var(--cover-y) * -3px),0); }
.atlas-cover .market-scene img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 62% 56%; }
.atlas-cover .market-shade {
  pointer-events: none;
  background: linear-gradient(90deg,rgba(5,24,24,.74),rgba(7,28,26,.24) 33%,transparent 56%),
    linear-gradient(0deg,rgba(4,22,22,.84),rgba(8,28,26,.25) 25%,transparent 48%);
}
.atlas-cover .market-copy {
  position: absolute; z-index: 2; left: clamp(32px,6vw,138px); top: 20%;
  max-width: 45%; text-shadow: 0 2px 15px #071b1a;
}
.atlas-cover .market-course { display: flex; align-items: center; gap: 12px; margin: 0 0 16px; color: var(--brass); font: 600 14px/1.4 "Songti SC",STSong,serif; letter-spacing: .18em; }
.atlas-cover .market-course::before { content: ""; width: 32px; height: 1px; background: currentColor; }
.atlas-cover #cover-title, .atlas-ui .atlas-cover #cover-title {
  margin: 0; color: var(--ivory);
  font: 600 clamp(64px,6.7vw,114px)/1.16 "Songti SC",STSong,"Noto Serif CJK SC",serif;
  letter-spacing: .045em; white-space: nowrap;
}
.atlas-cover .market-lead { margin: 14px 0 24px; color: #fff5df; font: 400 clamp(15px,1.23vw,21px)/1.65 "Songti SC",STSong,serif; }
.atlas-cover .market-copy .home-open {
  display: inline-flex; align-items: center; justify-content: space-between; gap: 26px;
  min-height: 46px; padding: 10px 20px; border: 1px solid #e5be82; border-radius: 2px;
  color: #24332a; background: #f1d6a3; text-decoration: none; text-shadow: none;
  font: 650 16px/1.45 "Songti SC",STSong,serif;
}
.atlas-cover .market-copy .home-open:hover { color: #112622; background: #ffe9bd; }
.atlas-cover .home-open span { font: 23px/1 Georgia,serif; }
/* Floating model. The controller places the article within the cover. */
.atlas-cover .market-card {
  position: absolute;
  z-index: 4;
  box-sizing: border-box;
  width: min(276px, calc(100% - 20px));
  overflow-y: auto;
  padding: 8px 14px 3px;
  border: 1px solid #b7a47b;
  border-top: 2px solid var(--brass);
  border-radius: 6px;
  background: linear-gradient(145deg, rgb(30 55 48 / .97), rgb(14 35 33 / .96));
  box-shadow: 0 8px 26px rgb(4 18 17 / .34);
  color: var(--ivory);
  pointer-events: auto;
}
.atlas-cover .market-card[hidden], .atlas-cover .market-summon[hidden] { display: none; }
.atlas-cover .graph-title {
  margin: 0;
  color: var(--ivory);
  font: 650 18px/1.35 "Songti SC", STSong, serif;
}
.atlas-cover .graph-title small { color: var(--brass); font: 500 14px/1.2 Georgia, serif; }
.atlas-cover .graph-condition, .atlas-cover .graph-reading {
  margin: 3px 0 0;
  overflow-wrap: anywhere;
  font: 400 13px/1.45 "PingFang SC", "Microsoft YaHei", sans-serif;
}
.atlas-cover .graph-condition { color: #e0dbc8; }
.atlas-cover .graph-reading {
  color: #f7e0ac;
  font-size: 14px;
  font-weight: 550;
  font-variant-numeric: tabular-nums;
}
.atlas-cover .market-card svg {
  display: block;
  width: 100%;
  height: 92px;
  margin: 4px 0 0;
  padding: 0;
  border: 0;
  background: transparent;
  touch-action: none;
  pointer-events: auto;
  user-select: none;
  -webkit-user-select: none;
  cursor: crosshair;
}
.atlas-cover .market-card .graph-axis {
  fill: none;
  stroke: #b6c3b0;
  stroke-width: 1.2;
}
.atlas-cover .market-card .graph-line {
  fill: none;
  stroke-width: 2.5;
  stroke-linejoin: round;
  stroke-linecap: round;
}
.atlas-cover .graph-line:not([stroke]) { stroke: var(--jade); }
.atlas-cover .graph-tick { fill: #f7e9ca; font: 14px Georgia, "Songti SC", serif; }
.atlas-cover .graph-handle {
  fill: #ffe3a5;
  stroke: transparent;
  stroke-width: 18;
  pointer-events: all;
  cursor: grab;
}
.atlas-cover .graph-handle:active { cursor: grabbing; }
.atlas-cover .graph-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 3px;
  border-top: 1px solid rgb(222 206 166 / .36);
}
.atlas-cover .graph-actions > :is(a,button), .atlas-cover .market-summon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  touch-action: manipulation;
  color: var(--ivory);
  font: 550 14px/1.35 "PingFang SC", "Microsoft YaHei", sans-serif;
  cursor: pointer;
}
.atlas-cover .graph-actions > a {
  color: #ffe1aa;
  text-decoration: underline;
  text-decoration-color: #bba277;
  text-underline-offset: 3px;
}
.atlas-cover .graph-actions > button {
  min-width: 44px;
  padding: 4px 6px;
  border: 0;
  background: transparent;
}
.atlas-cover .market-summon {
  padding: 8px 14px;
  border: 1px solid #d4bb8d;
  border-radius: 2px;
  background: rgb(17 43 39 / .88);
}
.atlas-cover .market-copy .home-open + .market-summon { margin-inline-start: 10px; }
.atlas-cover :is(a,button):focus-visible {
  outline: 2px solid #fff4d8;
  outline-offset: 3px;
  box-shadow: 0 0 0 5px #173b37;
}
@media (hover: hover) {
  .atlas-cover .market-summon:hover { background: #29483e; }
  .atlas-cover .graph-actions > :is(a,button):hover { color: white; text-decoration: underline; }
}
.atlas-cover .market-card.is-leaving {
  pointer-events: none;
  animation: market-card-mist 480ms ease-out both;
}
.atlas-cover .market-card.is-leaving * { pointer-events: none; }
@keyframes market-card-mist {
  from { opacity: 1; filter: blur(0); scale: 1; }
  to { opacity: 0; filter: blur(5px); scale: 1.035; }
}
@keyframes market-card-fade { from { opacity: 1; } to { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .atlas-cover .market-card.is-leaving { animation-name: market-card-fade; }
}
[data-motion="reduced"] .atlas-cover .market-card.is-leaving { animation-name: market-card-fade; }

@media (max-width: 600px) {
  .home-intro.atlas-cover, .atlas-ui .home-intro.atlas-cover {
    display:block;
    height:100vh; height:100svh; min-height:540px;
    margin-bottom:0;
  }
  .atlas-cover .market-scene img { object-position: 62% 56%; }
  .atlas-cover .market-copy { position: relative; inset: auto; margin: clamp(105px,17svh,160px) 5% 0 6%; max-width: none; }
  .atlas-cover .market-copy .home-open { display: flex; width: fit-content; }
  .atlas-cover .market-copy .home-open + .market-summon { margin: 8px 0 0; }
  .atlas-cover .market-card { width: min(256px, calc(100% - 16px)); padding-inline: 12px; }
  .atlas-cover .market-course { font-size: 13px; margin-bottom: 10px; }
  .atlas-cover #cover-title,.atlas-ui .atlas-cover #cover-title { font-size: clamp(48px,12vw,66px); }
  .atlas-cover .market-lead { font-size: 15px; margin: 9px 0 16px; }
  }

.atlas-cover .cover-mast { position:absolute; z-index:5; top:clamp(12px,3vh,35px); left:6%; right:6%; display:flex; align-items:center; justify-content:space-between; color:#f4e6cb; font:500 14px/1.4 "Songti SC",STSong,serif; letter-spacing:.1em; text-shadow:0 1px 6px #071b1a; }
.atlas-cover .cover-directory { display:inline-flex; align-items:center; gap:10px; min-height:44px; padding:10px 0 10px 14px; text-decoration:none; }
.atlas-cover .market-routes,.atlas-cover .market-extras { display:flex; gap:10px; align-items:center; flex-wrap:wrap; }
.atlas-cover .market-routes a { min-height:46px; }
.atlas-cover .formula-door { display:inline-flex; align-items:center; gap:22px; padding:10px 18px; border:1px solid #ecdbb5; color:#fff0ce; background:#112925d9; font:600 16px/1.45 "Songti SC",STSong,serif; text-decoration:none; border-radius:2px; }
.atlas-cover .formula-door:hover { background:#24413b; }
.atlas-cover .market-extras { margin-top:14px; gap:18px; }
.atlas-cover .market-extras button:not([hidden]) { min-height:44px; border:0; padding:4px 0; background:transparent; color:#f9e3b3; text-shadow:0 1px 5px #142320; text-decoration:underline; text-underline-offset:5px; font:500 14px/1.4 "Songti SC",STSong,serif; cursor:pointer; }
@media(max-width:600px) {
  .atlas-cover .market-routes { gap:7px; }
  .atlas-cover .market-routes a,.atlas-cover .market-copy .home-open { padding:9px 11px; gap:6px; font-size:14px; }
  .atlas-cover .market-shade::after { content:""; position:absolute; inset:0; background:linear-gradient(180deg,rgba(5,24,24,.45),rgba(5,24,24,.30) 55%,rgba(5,24,24,0) 80%); }
  .atlas-cover .market-extras { margin-top:5px; }
  .atlas-cover .cover-mast { font-size:13px; }
}
@media(max-height:500px) and (orientation:landscape) {
  .home-intro.atlas-cover,.atlas-ui .home-intro.atlas-cover { min-height:300px; }
  .atlas-cover .cover-mast { top:0; }
  .atlas-cover .market-copy { top:22%; max-width:70%; }
  .atlas-cover #cover-title,.atlas-ui .atlas-cover #cover-title { font-size:48px; }
  .atlas-cover .market-lead { font-size:14px; margin:9px 0 12px; }
  .atlas-cover .market-routes a { padding:8px 12px; gap:12px; font-size:14px; }
  .atlas-cover .market-extras { margin-top:0; }
}
