/* ============================================================
   ANATOME · 解剖图鉴
   Bright academic paper aesthetic
   ============================================================ */

:root {
  --paper: #f4efe4;
  --paper-2: #ece4d3;
  --card: #fbf8f0;
  --card-2: #f7f1e4;
  --ink: #1b2a22;
  --ink-soft: #3d4d45;
  --muted: #6d7a72;
  --faint: #98a29a;
  --line: #d8cdb9;
  --line-soft: #e6ddcc;
  --green: #16553d;
  --green-deep: #0d3b2a;
  --green-soft: #dfe8dd;
  --terra: #b4552d;
  --terra-soft: #f1dfd2;
  --gold: #b39443;
  --film: #0c1210;
  --shadow: 0 1px 2px rgba(27, 42, 34, .05), 0 12px 32px -20px rgba(27, 42, 34, .28);
  --serif: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, "Songti SC", "STSong", "SimSun", "NSimSun", "Noto Serif SC", "Noto Serif CJK SC", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --maxw: 1060px;
  --pad: 20px;
  --radius: 18px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(120% 70% at 8% -8%, #fdfaf3 0%, rgba(253, 250, 243, 0) 58%),
    radial-gradient(90% 60% at 100% 0%, #f7f0e2 0%, rgba(247, 240, 226, 0) 55%),
    linear-gradient(180deg, var(--paper) 0%, #f2ecdf 100%);
  background-attachment: fixed;
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* subtle paper grain */
.paper-grain {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: .28;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.82' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.16'/%3E%3C/svg%3E");
}

.svg-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { width: 22px; height: 22px; display: block; flex: none; }

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
img { display: block; max-width: 100%; }
mark { background: rgba(180, 85, 45, .16); color: inherit; border-radius: 2px; padding: 0 1px; }

::selection { background: rgba(22, 85, 61, .18); }

:focus-visible { outline: 2px solid var(--terra); outline-offset: 3px; border-radius: 4px; }

/* ---------- shell ---------- */

main#view {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 92px var(--pad) 118px;
}

.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 40;
  height: 64px;
  padding: 0 var(--pad);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: rgba(244, 239, 228, .82);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  border-bottom: 1px solid rgba(216, 205, 185, .65);
}
.topbar::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: -1px; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(180, 85, 45, .35), transparent);
}

.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark {
  width: 32px; height: 32px;
  display: grid; place-items: center;
  border: 1px solid var(--green);
  border-radius: 9px;
  color: var(--green);
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 600;
  line-height: 1;
  padding-bottom: 2px;
  background: linear-gradient(160deg, #fdfaf2, #efe7d6);
  box-shadow: inset 0 0 0 3px rgba(251, 248, 240, .7);
}
.brand-text {
  display: flex;
  flex-direction: column;
  font-family: var(--serif);
  font-size: 16px;
  letter-spacing: .18em;
  line-height: 1.1;
  color: var(--ink);
}
.brand-text small {
  font-family: var(--sans);
  font-size: 9.5px;
  letter-spacing: .32em;
  color: var(--muted);
  margin-top: 3px;
}

.icon-btn {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(251, 248, 240, .72);
  cursor: pointer;
  transition: background .18s, border-color .18s, transform .18s;
}
.icon-btn:active { transform: scale(.94); }
.icon-btn:hover { background: var(--card); border-color: var(--green); }

.tabbar {
  position: fixed;
  z-index: 40;
  left: 50%;
  bottom: max(12px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  width: min(520px, calc(100% - 24px));
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  padding: 7px 6px;
  border: 1px solid rgba(216, 205, 185, .9);
  border-radius: 20px;
  background: rgba(251, 248, 240, .88);
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  box-shadow: 0 10px 30px -14px rgba(27, 42, 34, .35);
}
.tabbar a {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 5px 2px 4px;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: .06em;
  border-radius: 13px;
  transition: color .18s, background .18s;
}
.tabbar a .icon { width: 21px; height: 21px; }
.tabbar a[aria-current="page"] { color: var(--green); background: rgba(22, 85, 61, .07); }
.tabbar a[aria-current="page"]::before {
  content: "";
  position: absolute;
  top: 3px; left: 50%;
  width: 4px; height: 4px;
  margin-left: -2px;
  border-radius: 50%;
  background: var(--terra);
}

/* ---------- type & shared ---------- */

.eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--muted);
}
.eyebrow::before {
  content: "";
  width: 22px; height: 1px;
  background: var(--terra);
}

h1, h2, h3, .serif { font-family: var(--serif); font-weight: 600; }

.page-head { margin-bottom: 22px; }
.page-head h1 {
  margin: 8px 0 6px;
  font-size: clamp(30px, 8vw, 44px);
  line-height: 1.08;
  letter-spacing: -.02em;
}
.page-head p { margin: 0; color: var(--muted); font-size: 13.5px; }

.section { margin-top: 44px; }
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}
.section-head h2 {
  margin: 0;
  font-size: 24px;
  letter-spacing: -.01em;
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.section-head h2 .idx {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--terra);
  letter-spacing: .1em;
}
.section-head .more {
  font-size: 12px;
  color: var(--green);
  display: inline-flex;
  align-items: center;
  gap: 3px;
  white-space: nowrap;
}
.section-head .more .icon { width: 15px; height: 15px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 40px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  color: var(--ink);
  font-size: 13px;
  cursor: pointer;
  transition: background .18s, border-color .18s, transform .18s;
}
.btn:active { transform: scale(.97); }
.btn:hover { border-color: var(--green); }
.btn .icon { width: 16px; height: 16px; }
.btn-primary { background: var(--green); border-color: var(--green); color: #f7f1e3; }
.btn-primary:hover { background: var(--green-deep); }
.btn-terra { color: var(--terra); border-color: rgba(180, 85, 45, .4); }
.btn-terra.is-on { background: var(--terra); border-color: var(--terra); color: #fff6ea; }

.backlink {
  display: flex;
  width: fit-content;
  align-items: center;
  gap: 4px;
  margin-bottom: 14px;
  font-size: 12.5px;
  color: var(--muted);
}
.backlink .icon { width: 17px; height: 17px; }
.backlink:hover { color: var(--green); }

.chip-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 0 8px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.chip-row::-webkit-scrollbar { display: none; }
.chip {
  flex: none;
  height: 34px;
  padding: 0 13px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(251, 248, 240, .6);
  color: var(--ink-soft);
  font-size: 12.5px;
  cursor: pointer;
  white-space: nowrap;
  transition: all .16s;
}
.chip:hover { border-color: var(--green); }
.chip.is-on {
  background: var(--green);
  border-color: var(--green);
  color: #f8f2e5;
}
.chip .n { font-family: var(--mono); font-size: 10px; opacity: .7; }

.stat-row {
  display: flex;
  gap: 0;
  margin: 22px 0 20px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.stat {
  flex: 1;
  padding: 13px 6px 12px;
  text-align: center;
  border-right: 1px solid var(--line-soft);
}
.stat:last-child { border-right: 0; }
.stat b {
  display: block;
  font-family: var(--serif);
  font-size: 25px;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -.02em;
}
.stat span {
  display: block;
  margin-top: 4px;
  font-size: 10px;
  letter-spacing: .1em;
  color: var(--muted);
}

/* ---------- hero ---------- */

.hero { position: relative; padding: 10px 0 0; }
.hero h1 {
  margin: 14px 0 12px;
  font-size: clamp(42px, 12.5vw, 78px);
  line-height: .98;
  letter-spacing: -.035em;
}
.hero h1 em {
  display: block;
  font-style: normal;
  font-weight: 600;
  color: var(--green);
  letter-spacing: -.04em;
}
.hero .lede {
  max-width: 38ch;
  margin: 0 0 20px;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.75;
}
.hero .lede b { font-weight: 600; color: var(--ink); }

.search-pill {
  width: 100%;
  height: 52px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(251, 248, 240, .78);
  color: var(--muted);
  font-size: 13px;
  cursor: text;
  text-align: left;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .6);
  transition: border-color .18s, background .18s;
}
.search-pill:hover { border-color: var(--green); background: var(--card); }
.search-pill .icon { width: 19px; height: 19px; color: var(--green); }
.search-pill kbd {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 10px;
  padding: 2px 6px;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--faint);
  background: var(--paper);
}

/* ---------- region grid ---------- */

.region-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 11px;
}
.region-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 146px;
  padding: 14px 13px 10px;
  border: 1px solid var(--line);
  border-radius: 15px;
  overflow: hidden;
  background:
    radial-gradient(120% 100% at 100% 100%, #fdfaf2 0%, rgba(253, 250, 242, 0) 60%),
    linear-gradient(160deg, var(--card) 0%, var(--card-2) 100%);
  transition: transform .2s, border-color .2s, box-shadow .2s;
}
.region-card:hover {
  transform: translateY(-2px);
  border-color: rgba(22, 85, 61, .45);
  box-shadow: var(--shadow);
}
.region-card .num {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: .12em;
  color: var(--faint);
}
.region-card h3 {
  position: relative;
  z-index: 2;
  margin: 8px 0 1px;
  font-size: 20px;
  line-height: 1.15;
  letter-spacing: -.02em;
}
.region-card .en {
  position: relative;
  z-index: 2;
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
}
.region-card .foot {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: flex-end;
  gap: 6px;
  margin-top: auto;
  padding-top: 12px;
}
.region-card .meta {
  flex: 1;
  min-width: 0;
  font-size: 10px;
  line-height: 1.4;
  color: var(--muted);
}
.region-card .meta b { color: var(--green); font-family: var(--mono); font-weight: 500; }
.region-thumbs {
  flex: none;
  display: flex;
  align-items: flex-end;
  z-index: 1;
  opacity: .95;
}
.region-thumbs img {
  width: 38px; height: 38px;
  object-fit: cover;
  border: 3px solid var(--card);
  border-radius: 8px;
  box-shadow: 0 3px 10px rgba(12, 18, 16, .2);
  transform: rotate(-5deg);
}
.region-thumbs img + img {
  margin-left: -16px;
  transform: rotate(4deg) translateY(2px);
}

/* ---------- theme index ---------- */

.theme-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.theme-card {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 60px;
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: linear-gradient(160deg, var(--card) 0%, var(--card-2) 100%);
  color: var(--ink);
  transition: transform .18s, border-color .18s, box-shadow .18s;
}
.theme-card:hover {
  transform: translateY(-2px);
  border-color: rgba(22, 85, 61, .45);
  box-shadow: var(--shadow);
}
.theme-card .glyph {
  flex: none;
  display: grid;
  place-items: center;
  width: 40px; height: 40px;
  border: 1px solid rgba(22, 85, 61, .1);
  border-radius: 11px;
  background: rgba(22, 85, 61, .06);
}
.theme-card .glyph img { width: 26px; height: 26px; object-fit: contain; opacity: .9; }
.theme-card .txt { flex: 1; min-width: 0; }
.theme-card b {
  display: block;
  font-family: var(--serif);
  font-size: 15.5px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -.01em;
}
.theme-card .en {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-top: 3px;
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
}
.theme-card .en > span:first-child {
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.theme-card .n { flex: none; font-family: var(--mono); font-size: 10px; letter-spacing: 0; color: var(--terra); }
.theme-card.is-wide { grid-column: 1 / -1; }

/* ---------- module cards ---------- */

.module-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.module-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(170deg, var(--card) 0%, var(--card-2) 100%);
  padding: 8px;
  transition: transform .2s, border-color .2s, box-shadow .2s;
}
.module-card:hover {
  transform: translateY(-2px);
  border-color: rgba(22, 85, 61, .4);
  box-shadow: var(--shadow);
}
.module-card .cover {
  position: relative;
  aspect-ratio: 1.3 / 1;
  border-radius: 11px;
  overflow: hidden;
  background: var(--film);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .5);
}
.module-card .cover img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .5s ease;
}
.module-card:hover .cover img { transform: scale(1.035); }
.module-card .cover::after {
  content: "";
  position: absolute; inset: 7px;
  border: 1px solid rgba(255, 248, 230, .18);
  border-radius: 6px;
  pointer-events: none;
}
.mod-badge {
  position: absolute;
  left: 9px; top: 9px;
  z-index: 2;
  padding: 3px 7px;
  border-radius: 4px;
  background: rgba(9, 14, 11, .72);
  border: 1px solid rgba(255, 246, 228, .28);
  color: #f6efdf;
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: .12em;
  backdrop-filter: blur(3px);
}
.module-card .body { padding: 10px 5px 5px; }
.module-card h3 {
  margin: 0;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -.01em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.module-card .sub {
  margin-top: 3px;
  font-size: 10.5px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.module-card .meta {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed var(--line-soft);
  display: flex;
  flex-wrap: wrap;
  gap: 3px 8px;
  font-family: var(--mono);
  font-size: 9px;
  color: var(--muted);
  letter-spacing: .03em;
}
.module-card .meta b { color: var(--green); font-weight: 500; }

/* horizontal featured rail */
.rail {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 2px 2px 12px;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.rail::-webkit-scrollbar { display: none; }
.rail .module-card {
  flex: 0 0 168px;
  scroll-snap-align: start;
}
.rail .module-card .cover { aspect-ratio: 1.18 / 1; }

/* ---------- daily structure ---------- */

.daily-card {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  padding: 22px 20px 20px;
  color: #f4efe2;
  background:
    radial-gradient(90% 100% at 100% 0%, #1e6549 0%, rgba(30, 101, 73, 0) 55%),
    linear-gradient(150deg, #10412f 0%, #0c2e22 100%);
  box-shadow: 0 16px 40px -24px rgba(13, 59, 42, .8);
}
.daily-card::before {
  content: "";
  position: absolute; inset: 10px;
  border: 1px solid rgba(244, 239, 226, .16);
  border-radius: 13px;
  pointer-events: none;
}
.daily-card .label {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: #c9b98f;
}
.daily-card h3 {
  margin: 8px 0 2px;
  font-size: 27px;
  line-height: 1.15;
  letter-spacing: -.02em;
}
.daily-card .en {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: .1em;
  color: #b9c8b8;
  text-transform: uppercase;
}
.daily-card p {
  margin: 13px 0 16px;
  font-size: 12.5px;
  line-height: 1.7;
  color: #d7dfd2;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.daily-card .art {
  position: absolute;
  right: 16px; top: 22px;
  width: 78px; height: 78px;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, #fdfaf2, #e8dfcb);
  display: grid; place-items: center;
  box-shadow: 0 0 0 1px rgba(244, 239, 226, .3), 0 8px 20px -8px rgba(0, 0, 0, .5);
}
.daily-card .art img { width: 52px; height: 52px; object-fit: contain; }
.daily-card .cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 13px;
  border: 1px solid rgba(244, 239, 226, .35);
  border-radius: 999px;
  font-size: 11.5px;
  color: #f4efe2;
}
.daily-card .cta .icon { width: 15px; height: 15px; }

/* ---------- library ---------- */

.lib-tools {
  position: sticky;
  top: 64px;
  z-index: 20;
  margin: 0 calc(var(--pad) * -1) 16px;
  padding: 10px var(--pad) 2px;
  background: linear-gradient(180deg, rgba(244, 239, 228, .97) 65%, rgba(244, 239, 228, 0) 100%);
  backdrop-filter: blur(8px);
}
.search-field {
  display: flex;
  align-items: center;
  gap: 9px;
  height: 46px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--card);
}
.search-field .icon { width: 18px; height: 18px; color: var(--green); }
.search-field input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  font: inherit;
  font-size: 14px;
  color: var(--ink);
}
.search-field input::placeholder { color: var(--faint); }
.search-field .clear {
  border: 0; background: transparent; padding: 4px; cursor: pointer; color: var(--muted);
}
.search-field .clear .icon { width: 16px; height: 16px; }

.result-note {
  margin: 14px 0 4px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .1em;
  color: var(--muted);
  text-transform: uppercase;
}

/* ---------- module detail ---------- */

.mod-hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}
.mod-hero .plate {
  position: relative;
  aspect-ratio: 1.55 / 1;
  border-radius: 16px;
  overflow: hidden;
  background: var(--film);
  box-shadow: 0 18px 40px -26px rgba(12, 18, 16, .85);
}
.mod-hero .plate img { width: 100%; height: 100%; object-fit: cover; }
.mod-hero .plate::after {
  content: "";
  position: absolute; inset: 9px;
  border: 1px solid rgba(255, 248, 230, .2);
  border-radius: 9px;
}
.mod-hero .plate .tag {
  position: absolute; left: 12px; top: 12px; z-index: 2;
  padding: 4px 9px;
  border-radius: 4px;
  background: rgba(9, 14, 11, .7);
  border: 1px solid rgba(255, 246, 228, .3);
  color: #f6efdf;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .14em;
}
.mod-hero .intro h1 {
  margin: 7px 0 4px;
  font-size: clamp(27px, 7vw, 38px);
  line-height: 1.12;
  letter-spacing: -.025em;
}
.mod-hero .intro .en {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
}
.mod-hero .intro .desc {
  margin: 12px 0 0;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.7;
}
.mod-actions { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }

.subhead {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin: 30px 0 8px;
}
.subhead h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 21px;
  letter-spacing: -.01em;
}
.subhead .count {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--muted);
  letter-spacing: .08em;
}

.series-list { border-top: 1px solid var(--line-soft); }
.series-row {
  display: grid;
  grid-template-columns: 26px 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line-soft);
}
.series-row .idx {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--faint);
}
.series-row .ori {
  width: 42px; height: 42px;
  display: grid; place-items: center;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--paper);
}
.series-row .ori img { width: 30px; height: 30px; opacity: .78; }
.series-row .txt { min-width: 0; }
.series-row .txt b {
  display: block;
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.series-row .txt span {
  display: block;
  font-size: 10px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.series-row .n {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--muted);
  text-align: right;
}
.series-row .n b { display: block; color: var(--green); font-size: 12px; font-weight: 500; }

.layer-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}
.layer {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: rgba(251, 248, 240, .55);
  font-size: 11.5px;
  min-width: 0;
}
.layer img { width: 26px; height: 26px; object-fit: contain; flex: none; opacity: .85; }
.layer .ph {
  width: 26px; height: 26px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--green-soft);
  color: var(--green);
  font-family: var(--serif);
  font-size: 12px;
  flex: none;
}
.layer span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.struct-list { border-top: 1px solid var(--line-soft); }
.struct-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto 16px;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line-soft);
}
.struct-row .art {
  width: 34px; height: 34px;
  display: grid; place-items: center;
  border-radius: 8px;
  background: var(--paper);
  border: 1px solid var(--line-soft);
}
.struct-row .art img { width: 26px; height: 26px; object-fit: contain; }
.struct-row .txt { min-width: 0; }
.struct-row .txt b {
  display: block;
  font-size: 12.5px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.struct-row .txt span {
  display: block;
  font-size: 10px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.struct-row .n {
  font-family: var(--mono);
  font-size: 9.5px;
  color: var(--muted);
}
.struct-row .icon { width: 15px; height: 15px; color: var(--faint); }

.note {
  margin-top: 18px;
  padding: 12px 14px;
  border-left: 2px solid var(--gold);
  background: rgba(179, 148, 67, .07);
  color: var(--ink-soft);
  font-size: 11.5px;
  line-height: 1.7;
  border-radius: 0 8px 8px 0;
}

/* ---------- atlas tree ---------- */

.seg {
  display: inline-flex;
  padding: 4px;
  gap: 3px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(251, 248, 240, .62);
  margin: 4px 0 14px;
}
.seg button {
  border: 0;
  background: transparent;
  padding: 7px 13px;
  border-radius: 9px;
  font-size: 12px;
  color: var(--muted);
  cursor: pointer;
}
.seg button.is-on {
  background: var(--green);
  color: #f8f2e5;
  box-shadow: 0 2px 6px rgba(13, 59, 42, .22);
}

.tree { border-top: 1px solid var(--line); }
.tree-node { border-bottom: 1px solid var(--line-soft); }
.node-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 0;
}
.node-toggle {
  flex: none;
  width: 25px; height: 25px;
  display: grid; place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(251, 248, 240, .7);
  color: var(--muted);
  cursor: pointer;
  transition: transform .2s, background .2s, border-color .2s;
}
.node-toggle .icon { width: 13px; height: 13px; transition: transform .2s; }
.node-toggle.is-open { background: var(--green); border-color: var(--green); color: #f8f2e5; }
.node-toggle.is-open .icon { transform: rotate(90deg); }
.node-toggle.is-leaf { border-style: dashed; opacity: .55; cursor: default; }
.node-toggle.is-leaf .icon { width: 10px; height: 10px; color: var(--faint); }
.node-main { flex: 1; min-width: 0; }
.node-main a { display: block; }
.node-main b {
  display: block;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.node-main span {
  display: block;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .02em;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.node-count {
  flex: none;
  font-family: var(--mono);
  font-size: 9px;
  color: var(--faint);
}
.node-children { display: none; }
.node-children.is-open { display: block; }
.node-children .node-row {
  border-top: 1px dotted var(--line-soft);
}

.root-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 12px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: linear-gradient(160deg, var(--card), var(--card-2));
  margin-bottom: 8px;
}
.root-card .glyph {
  width: 38px; height: 38px;
  flex: none;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--green-soft);
  color: var(--green);
  font-family: var(--serif);
  font-size: 18px;
}
.root-card .txt { flex: 1; min-width: 0; }
.root-card .txt b { display: block; font-size: 14px; font-weight: 600; }
.root-card .txt span { display: block; font-size: 10px; color: var(--muted); }
.root-card .icon { width: 16px; height: 16px; color: var(--faint); }

/* ---------- structure detail ---------- */

.crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  margin-bottom: 14px;
  font-size: 10.5px;
  color: var(--muted);
}
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--green); text-decoration: underline; }
.crumbs .sep { color: var(--faint); }

.st-head { display: flex; gap: 16px; align-items: flex-start; }
.st-head .art {
  flex: none;
  width: 74px; height: 74px;
  display: grid; place-items: center;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: radial-gradient(circle at 35% 30%, #fdfaf2, #ece3d1);
  box-shadow: inset 0 0 0 3px rgba(251, 248, 240, .8);
}
.st-head .art img { width: 56px; height: 56px; object-fit: contain; }
.st-head .art .ph {
  font-family: var(--serif);
  font-size: 30px;
  color: var(--green);
}
.st-head h1 {
  margin: 0 0 3px;
  font-size: clamp(27px, 8vw, 40px);
  line-height: 1.1;
  letter-spacing: -.025em;
}
.st-head .en {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
}
.st-head .la {
  margin-top: 5px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 13px;
  color: var(--ink-soft);
}

.tag-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.tag {
  padding: 3px 9px;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .06em;
  color: var(--muted);
  background: rgba(251, 248, 240, .55);
}
.tag.green { color: var(--green); border-color: rgba(22, 85, 61, .28); background: rgba(22, 85, 61, .05); }

.theme-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 10px;
}
.theme-row-label {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--faint);
}
.theme-tag {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: var(--green);
  border-color: rgba(22, 85, 61, .28);
  background: rgba(22, 85, 61, .05);
}
.theme-tag .icon { width: 11px; height: 11px; }
.page-head + .chip-row { margin-top: 4px; }

.desc-wrap {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.desc-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.desc-head h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 20px;
}
.desc {
  font-size: 14px;
  line-height: 1.85;
  color: var(--ink-soft);
}
.desc p { margin: 0 0 12px; }
.desc p:last-child { margin-bottom: 0; }
.desc.is-en { font-size: 13.5px; line-height: 1.8; }
.desc.is-en > p:first-child::first-letter {
  font-family: var(--serif);
  font-size: 2.9em;
  float: left;
  line-height: .82;
  padding: 5px 7px 0 0;
  color: var(--green);
}
.desc-empty {
  padding: 16px;
  border: 1px dashed var(--line);
  border-radius: 10px;
  color: var(--muted);
  font-size: 12.5px;
  text-align: center;
}
.lang-toggle { display: inline-flex; gap: 4px; }
.lang-toggle button {
  border: 1px solid var(--line);
  background: transparent;
  border-radius: 6px;
  padding: 3px 8px;
  font-family: var(--mono);
  font-size: 9px;
  color: var(--muted);
  cursor: pointer;
}
.lang-toggle button.is-on { background: var(--green); border-color: var(--green); color: #f8f2e5; }

.child-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.child-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 10px;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  background: rgba(251, 248, 240, .6);
  font-size: 11.5px;
}
.child-pill:hover { border-color: var(--green); color: var(--green); }
.child-pill .n { font-family: var(--mono); font-size: 8.5px; color: var(--faint); }

.rel-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.rel-card {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: rgba(251, 248, 240, .55);
}
.rel-card img {
  width: 38px; height: 38px;
  border-radius: 7px;
  object-fit: cover;
  flex: none;
  background: var(--film);
}
.rel-card b {
  display: block;
  font-size: 10.5px;
  font-weight: 500;
  line-height: 1.35;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.rel-card span { display: block; font-family: var(--mono); font-size: 8.5px; color: var(--muted); }

/* ---------- 3D galaxy ---------- */

.galaxy-cta {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px solid rgba(22, 85, 61, .38);
  border-radius: 14px;
  background: linear-gradient(135deg, #13251d, #0b1611);
  color: #ece6d8;
  box-shadow: 0 12px 26px -20px rgba(13, 59, 42, .95);
  transition: transform .18s, box-shadow .18s;
}
.galaxy-cta:active { transform: scale(.99); }
.galaxy-cta > .icon { width: 22px; height: 22px; color: #9fc7b2; }
.galaxy-cta .txt { flex: 1; min-width: 0; }
.galaxy-cta .txt b {
  display: block;
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .02em;
}
.galaxy-cta .txt span {
  display: block;
  margin-top: 1px;
  font-size: 10.5px;
  color: rgba(236, 230, 216, .6);
}
.galaxy-cta > .icon:last-child { width: 16px; height: 16px; color: rgba(236, 230, 216, .48); }

.galaxy-shell {
  position: relative;
  margin-top: 16px;
  height: min(64vh, 440px);
  min-height: 320px;
  border-radius: 20px;
  overflow: hidden;
  background:
    radial-gradient(90% 70% at 50% 4%, rgba(34, 76, 60, .5) 0%, rgba(10, 20, 16, 0) 62%),
    radial-gradient(120% 120% at 50% 50%, #10201a 0%, #0a120f 58%, #060a08 100%);
  box-shadow: inset 0 0 0 1px rgba(22, 85, 61, .45), 0 18px 40px -28px rgba(13, 59, 42, .9);
  touch-action: none;
}
.galaxy-shell::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  border-radius: inherit;
  box-shadow: inset 0 0 56px 8px rgba(0, 0, 0, .5);
}
#galaxyCanvas {
  width: 100%;
  height: 100%;
  display: block;
  cursor: grab;
  touch-action: none;
}
#galaxyCanvas:active { cursor: grabbing; }

.galaxy-tools {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  display: flex;
  gap: 6px;
}
.g-btn {
  height: 28px;
  padding: 0 10px;
  border: 1px solid rgba(236, 230, 216, .22);
  border-radius: 999px;
  background: rgba(9, 18, 14, .62);
  color: rgba(236, 230, 216, .74);
  font-size: 10.5px;
  letter-spacing: .04em;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  cursor: pointer;
  transition: background .16s, border-color .16s, transform .16s;
}
.g-btn:active { transform: scale(.95); }
.g-btn.is-on {
  background: rgba(22, 85, 61, .92);
  border-color: rgba(159, 199, 178, .55);
  color: #eef3ea;
}

.galaxy-hint {
  position: absolute;
  top: 13px;
  left: 12px;
  z-index: 2;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .08em;
  color: rgba(236, 230, 216, .42);
  pointer-events: none;
}

.galaxy-pick {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 10px;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 8px 9px 12px;
  border: 1px solid rgba(236, 230, 216, .18);
  border-radius: 13px;
  background: rgba(11, 22, 17, .88);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  color: #ece6d8;
}
.galaxy-pick[hidden] { display: none; }
.galaxy-pick a { flex: 1; min-width: 0; }
.galaxy-pick b {
  display: block;
  font-family: var(--serif);
  font-size: 14px;
  font-weight: 600;
}
.galaxy-pick span {
  display: block;
  font-size: 9.5px;
  color: rgba(236, 230, 216, .58);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.galaxy-pick .g-close {
  flex: none;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: rgba(236, 230, 216, .55);
  cursor: pointer;
}
.galaxy-pick .g-close .icon { width: 15px; height: 15px; }

.galaxy-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}
.g-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 30px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(251, 248, 240, .6);
  font-size: 11px;
  color: var(--ink-soft);
  cursor: pointer;
  transition: background .16s, border-color .16s, color .16s;
}
.g-chip i { flex: none; width: 7px; height: 7px; border-radius: 50%; }
.g-chip em { font-family: var(--mono); font-size: 9px; font-style: normal; color: var(--muted); }
.g-chip.is-on { border-color: var(--green); background: rgba(22, 85, 61, .1); color: var(--green); }
.g-chip.is-on em { color: var(--green); }

/* ---------- search ---------- */

.search-page .search-field { height: 52px; border-radius: 14px; }
.search-page .search-field input { font-size: 15px; }

.res-group { margin-top: 26px; }
.res-group h2 {
  margin: 0 0 8px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 400;
}
.res-item {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) 16px;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line-soft);
}
.res-item .art {
  width: 36px; height: 36px;
  display: grid; place-items: center;
  border-radius: 8px;
  border: 1px solid var(--line-soft);
  background: var(--paper);
}
.res-item .art img { width: 28px; height: 28px; object-fit: contain; }
.res-item .art .ph { font-family: var(--serif); font-size: 15px; color: var(--green); }
.res-item b { display: block; font-size: 13px; font-weight: 500; }
.res-item span { display: block; font-size: 10px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.res-item .icon { width: 14px; height: 14px; color: var(--faint); }
.empty {
  padding: 60px 20px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}
.empty .big {
  font-family: var(--serif);
  font-size: 38px;
  color: var(--line);
  display: block;
  margin-bottom: 8px;
}

/* ---------- saved ---------- */

.saved-tabs { display: flex; gap: 16px; margin-bottom: 14px; }
.saved-tabs button {
  border: 0; background: transparent; padding: 4px 0;
  font-size: 13px; color: var(--muted); cursor: pointer;
  border-bottom: 1.5px solid transparent;
}
.saved-tabs button.is-on { color: var(--ink); border-bottom-color: var(--terra); }
.saved-item {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 30px;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line-soft);
}
.saved-item .art {
  width: 34px; height: 34px; display: grid; place-items: center;
  border: 1px solid var(--line-soft); border-radius: 8px; background: var(--paper);
}
.saved-item .art img { width: 27px; height: 27px; object-fit: contain; }
.saved-item b { display: block; font-size: 12.5px; font-weight: 500; }
.saved-item span { display: block; font-size: 9.5px; color: var(--muted); }
.saved-item .rm {
  width: 30px; height: 30px; display: grid; place-items: center;
  border: 0; background: transparent; color: var(--faint); cursor: pointer; border-radius: 50%;
}
.saved-item .rm:hover { color: var(--terra); background: var(--terra-soft); }
.saved-item .rm .icon { width: 15px; height: 15px; }

/* ---------- about ---------- */

.about-block {
  border: 1px solid var(--line);
  border-radius: 15px;
  background: linear-gradient(165deg, var(--card), var(--card-2));
  padding: 16px;
  margin-bottom: 12px;
}
.about-block h2 {
  margin: 0 0 8px;
  font-family: var(--serif);
  font-size: 19px;
}
.about-block p { margin: 0 0 8px; font-size: 12.5px; line-height: 1.75; color: var(--ink-soft); }
.about-block p:last-child { margin-bottom: 0; }
.kv { display: grid; grid-template-columns: 90px 1fr; gap: 5px 10px; font-size: 11.5px; }
.kv dt { color: var(--muted); font-family: var(--mono); font-size: 9.5px; letter-spacing: .04em; padding-top: 1px; }
.kv dd { margin: 0; color: var(--ink-soft); }
.about-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-top: 12px; }
.about-stats div {
  padding: 10px;
  border: 1px solid var(--line-soft);
  border-radius: 9px;
  background: rgba(251, 248, 240, .5);
}
.about-stats b { display: block; font-family: var(--serif); font-size: 20px; color: var(--green); }
.about-stats span { display: block; font-size: 9.5px; color: var(--muted); letter-spacing: .05em; }

/* ---------- toast / misc ---------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: 88px;
  transform: translate(-50%, 12px);
  z-index: 60;
  padding: 9px 16px;
  border-radius: 999px;
  background: rgba(13, 59, 42, .94);
  color: #f5efe1;
  font-size: 12px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .22s, transform .22s;
  box-shadow: 0 8px 24px -8px rgba(13, 59, 42, .6);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.skeleton {
  background: linear-gradient(90deg, rgba(216, 205, 185, .28) 25%, rgba(216, 205, 185, .5) 37%, rgba(216, 205, 185, .28) 63%);
  background-size: 400% 100%;
  animation: shimmer 1.4s ease infinite;
  border-radius: 8px;
}
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }

.loading-page {
  padding: 80px 0;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: .1em;
}
.loader {
  width: 26px; height: 26px;
  margin: 0 auto 14px;
  border: 1.5px solid var(--line);
  border-top-color: var(--green);
  border-radius: 50%;
  animation: spin .9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* entrance */
.view-enter > * { animation: rise .5s cubic-bezier(.2, .7, .2, 1) both; }
.view-enter > *:nth-child(2) { animation-delay: .04s; }
.view-enter > *:nth-child(3) { animation-delay: .08s; }
.view-enter > *:nth-child(4) { animation-delay: .12s; }
.view-enter > *:nth-child(5) { animation-delay: .16s; }
.view-enter > *:nth-child(6) { animation-delay: .2s; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* ---------- responsive ---------- */

@media (min-width: 620px) {
  :root { --pad: 28px; }
  .region-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .module-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .layer-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .rel-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .mod-hero { grid-template-columns: 300px 1fr; align-items: start; gap: 24px; }
  .mod-hero .plate { aspect-ratio: 1 / 1; }
  .about-stats { grid-template-columns: repeat(4, 1fr); }
  .galaxy-shell { height: min(70vh, 540px); }
}

@media (min-width: 900px) {
  main#view { padding-top: 104px; }
  .module-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .hero { padding-top: 22px; }
  .hero h1 { font-size: clamp(58px, 7vw, 84px); }
  .rail .module-card { flex-basis: 196px; }
  .tabbar { bottom: 20px; }
}

@media (max-width: 360px) {
  :root { --pad: 16px; }
  .module-grid { gap: 9px; }
  .module-card h3 { font-size: 13px; }
  .region-card h3 { font-size: 18px; }
}
