:root {
  color-scheme: dark;
  --paper: #f4f2ed;
  --pale: #c0c5d0;
  --gold: #e4d3b6;
  --line: rgba(183, 192, 210, .24);
  --serif: "Baskerville Old Face", Baskerville, Georgia, "Times New Roman", serif;
  --mono: "IBM Plex Mono", Consolas, monospace;
  --sky-angle: 0rad;
  --gutter: clamp(21px, 4.4vw, 85px);
  font-family: "Inter", "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--paper);
  background: #070c19;
}
* { box-sizing: border-box; }
body { margin: 0; }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; color: inherit; cursor: pointer; }
button:focus-visible, a:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; }
[hidden] { display: none !important; }
.frame { position: relative; isolation: isolate; height: 100vh; height: 100dvh; overflow: hidden; }
.sky-backdrop { position: absolute; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; background: #070d1b; }
#sky-atmosphere {
  position: absolute; left: 50%; top: 50%;
  width: 142vmax; height: 142vmax;
  width: hypot(100vw, 100dvh); height: hypot(100vw, 100dvh);
  transform: translate(-50%, -50%) rotate(var(--sky-angle));
  object-fit: cover; opacity: .88; will-change: transform;
}
.sky-backdrop::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(ellipse at center, transparent 30%, rgba(4, 8, 21, .07) 69%, rgba(4, 8, 21, .30)),
              linear-gradient(0deg, rgba(3,7,17,.56), transparent 17% 85%, rgba(3,7,17,.37));
}
#sky-chart { position: absolute; inset: 0; width: 100%; height: 100%; }
.masthead, .atlas-footer {
  position: absolute; z-index: 2; pointer-events: none;
  left: max(var(--gutter), env(safe-area-inset-left)); right: max(var(--gutter), env(safe-area-inset-right));
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.masthead { top: max(clamp(20px, 4vh, 45px), env(safe-area-inset-top)); }
.masthead nav, .atlas-footer button { pointer-events: auto; }
.signature {
  margin: 0; display: inline-flex; align-items: center; gap: 10px;
  font: 400 clamp(26px, 2.5vw, 37px)/1 var(--serif); letter-spacing: -.055em;
  text-shadow: 0 1px 15px #050a13;
}
.brand-star { position: relative; display: inline-block; width: 25px; height: 31px; color: var(--gold); }
.brand-star::before, .brand-star::after {
  content: ""; position: absolute; inset: 0; background: currentColor;
  clip-path: polygon(50% 0%, 55% 40%, 100% 50%, 55% 56%, 50% 100%, 45% 56%, 0% 50%, 45% 40%);
}
.brand-star::after { transform: rotate(45deg) scale(.55); opacity: .85; }
.nav-item {
  min-height: 43px; padding: 0 16px; display: flex; align-items: center; gap: 11px;
  border: 1px solid #b3c3d148; border-radius: 30px; color: #e0e6eb;
  background: #09101e85; backdrop-filter: blur(8px); font-size: .88rem; letter-spacing: .065em;
}
.nav-item:hover, .motion-control:hover .motion-icon { border-color: #e8d5b78a; background-color: #162031cd; }
.index-icon { width: 12px; height: 12px; position: relative; display: inline-block; color: #c5cfdb; }
.index-icon::before { content: ""; width: 4px; height: 4px; border-radius: 1px; background: currentColor; position: absolute; top: 0; left: 0; box-shadow: 7px 0, 0 7px, 7px 7px; }
.site-count { padding-left: 10px; border-left: 1px solid #c5cfdb44; font: .76rem/1 var(--mono); color: #d4c3a6; font-variant-numeric: tabular-nums; letter-spacing: .07em; }
.atlas-footer { bottom: max(clamp(21px, 4.5vh, 50px), env(safe-area-inset-bottom)); align-items: flex-end; }
.atlas-caption { min-width: 0; text-shadow: 0 1px 12px #060c15; }
.atlas-caption p { margin: 0; }
.atlas-caption p:first-child { margin-bottom: 7px; font: italic 400 clamp(20px, 1.75vw, 29px)/1.1 var(--serif); letter-spacing: -.015em; color: #e9e5df; }
.atlas-caption p:last-child { color: #bcc4d0; letter-spacing: .065em; font-size: .8rem; line-height: 1.6; }
.motion-control { padding: 0; min-height: 44px; display: inline-flex; align-items: center; gap: 9px; border: 0; background: none; color: #d0d6df; font-size: .82rem; letter-spacing: .065em; white-space: nowrap; }
.motion-icon { display: grid; flex: none; width: 31px; height: 31px; place-items: center; border: 1px solid #cbd2d05c; border-radius: 50%; background: #08101b75; }
.motion-icon::before { content: ""; width: 5px; height: 8px; border-inline: 2px solid var(--gold); }
.motion-control[aria-pressed="false"] .motion-icon::before { width: 0; height: 0; margin-left: 2px; border: 0; border-block: 4px solid transparent; border-left: 6px solid var(--gold); }
.screen-reader { position: fixed; top: 0; left: 0; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.scope-icon { position: relative; width: 15px; height: 15px; border: 1.3px solid currentColor; border-radius: 50%; display: inline-block; flex: none; }
.scope-icon::before { content: ""; position: absolute; inset: 4px; border: 1px solid currentColor; border-radius: 50%; }
.scope-icon::after { content: ""; position: absolute; inset: -3px; background: linear-gradient(currentColor, currentColor) 50% 0 / 1px 4px, linear-gradient(currentColor, currentColor) 50% 100% / 1px 4px, linear-gradient(currentColor, currentColor) 0 50% / 4px 1px, linear-gradient(currentColor, currentColor) 100% 50% / 4px 1px; background-repeat: no-repeat; }
dialog { width: min(440px, calc(100vw - 32px)); max-width: none; max-height: calc(100dvh - 20px); border: 1px solid #768a986e; border-radius: 12px; color: var(--paper); padding: 0; background: #101c29; box-shadow: 0 24px 100px #0008; }
dialog::backdrop { background: #030a13aa; backdrop-filter: blur(5px); }
.dialog-body { padding: clamp(17px, 3.8vw, 30px); }
.directory-heading, .index-pager { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.directory-heading { border-bottom: 1px solid var(--line); padding-bottom: 10px; }
.directory-heading h2 { font-size: 1.22rem; letter-spacing: .05em; font-weight: 550; margin: 0; }
#entry-hint { margin: 10px 0 2px; color: var(--pale); font-size: .8rem; line-height: 1.5; }
.icon-button { position: relative; width: 44px; height: 44px; background: transparent; border: 0; border-radius: 5px; }
.icon-button:hover { background: #ffffff0d; }
.close-icon::before, .close-icon::after { content: ""; position: absolute; top: 50%; left: 30%; width: 40%; height: 1px; background: var(--pale); transform: rotate(45deg); }
.close-icon::after { transform: rotate(-45deg); }
.index-empty { text-align: center; padding: clamp(18px, 4vh, 36px) 0 9px; }
.index-empty .brand-star { width: 25px; height: 30px; }
.index-empty p { margin: 12px 0; color: var(--pale); font-size: 1rem; }
.index-links { list-style: none; margin: 0; padding: 0; }
.index-links li { display: flex; align-items: center; gap: 8px; border-bottom: 1px solid #a7b8c21a; }
.index-links a { flex: 1; display: flex; align-items: center; min-width: 0; min-height: 48px; gap: 12px; padding: 4px; text-decoration: none; color: #dde3e7; }
.index-links a::before { content: "✦"; font-size: .85rem; color: var(--gold); }
.index-links a span { overflow-wrap: anywhere; line-height: 1.35; }
.index-links a:hover { color: var(--gold); }
.show-on-chart { display: grid; place-items: center; color: #d7c49f; }
.index-pager { margin-top: 10px; color: var(--pale); font-size: .85rem; }
.index-pager button { min-height: 40px; background: none; font-size: .85rem; padding: 4px 10px; border: 1px solid var(--line); border-radius: 3px; }
.index-pager button:disabled { opacity: .36; cursor: default; }
@media (max-width: 570px) {
  .masthead { top: max(18px, env(safe-area-inset-top)); }
  .signature { gap: 8px; }
  .brand-star { width: 20px; height: 26px; }
  .nav-item { min-height: 42px; padding-inline: 12px; gap: 8px; font-size: .8rem; }
  .site-count { padding-left: 8px; }
  .atlas-footer { bottom: max(19px, env(safe-area-inset-bottom)); }
  .atlas-caption p:first-child { margin-bottom: 5px; }
  .motion-control { font-size: .78rem; gap: 6px; }
}
@media (max-height: 480px) and (orientation: landscape) {
  .masthead { top: max(8px, env(safe-area-inset-top)); }
  .atlas-footer { bottom: max(8px, env(safe-area-inset-bottom)); }
  .atlas-caption p:first-child { font-size: 18px; margin-bottom: 1px; }
  .nav-item { min-height: 40px; }
  .dialog-body { padding: 12px 18px; }
}
