:root {
  color-scheme: light;
  --app-bg: #f4f6f8;
  --surface: #ffffff;
  --surface-soft: #eef3f2;
  --ink: #182235;
  --muted: #667085;
  --line: #d9e0e8;
  --accent: #0f766e;
  --accent-strong: #0b5f59;
  --accent-soft: #dff3f0;
  --gold: #a66b18;
  --gold-soft: #f7ecd9;
  --blue: #3356a8;
  --blue-soft: #e4ebfa;
  --coral: #b14f48;
  --coral-soft: #f8e5e2;
  --shadow: 0 12px 30px rgba(21, 35, 54, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--app-bg);
  scroll-behavior: smooth;
}

body {
  width: 100%;
  max-width: 480px;
  min-height: 100vh;
  margin: 0 auto;
  background: var(--app-bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

.mobile-app {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  background: var(--app-bg);
}

.mobile-toolbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 58px;
  padding: 10px 16px;
  border-bottom: 1px solid rgba(217, 224, 232, 0.82);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(16px);
}

.mobile-toolbar__brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 800;
}

.mobile-toolbar__mark {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 9px;
  background: var(--accent);
  color: #fff;
  font-size: 13px;
  font-weight: 900;
}

.mobile-toolbar .portal-meta__status {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 9px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.mobile-toolbar__back {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 36px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
}

.mobile-toolbar__back::before {
  content: "";
  width: 7px;
  height: 7px;
  border-bottom: 2px solid currentColor;
  border-left: 2px solid currentColor;
  transform: rotate(45deg);
  margin-left: 2px;
}

.portal-hero {
  padding: 26px 18px 22px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.portal-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 10px;
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.portal-kicker::before {
  content: "";
  width: 18px;
  height: 2px;
  background: var(--accent);
}

.portal-logos {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 20px;
}

.portal-logos img {
  width: 64px;
  height: 64px;
  object-fit: contain;
}

.portal-logos span {
  color: var(--muted);
  font-size: 18px;
  font-weight: 800;
}

.portal-hero h1 {
  margin: 0;
  font-size: 30px;
  line-height: 1.16;
  font-weight: 800;
}

.portal-hero__lead {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.75;
}

.portal-topics {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.portal-topics span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 11px;
  border: 1px solid #d2e0dc;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 700;
}

.portal-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.portal-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--accent-strong);
  font-size: 11px;
  font-weight: 700;
}

.portal-guide {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.portal-guide__item {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-height: 72px;
  padding: 12px 6px;
  text-align: center;
}

.portal-guide__item + .portal-guide__item {
  border-left: 1px solid var(--line);
}

.portal-guide__item strong {
  color: var(--accent-strong);
  font-size: 18px;
  line-height: 1;
}

.portal-guide__item span {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.project-section {
  padding: 20px 16px 30px;
}

.project-section__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 14px;
}

.project-section__head h2 {
  margin: 0;
  font-size: 20px;
  line-height: 1.2;
}

.project-section__head span {
  color: var(--muted);
  font-size: 12px;
}

.project-list {
  display: grid;
  gap: 14px;
}

.project-card {
  display: block;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--shadow);
}

.project-card__visual {
  position: relative;
  display: grid;
  min-height: 148px;
  place-items: center;
  overflow: hidden;
  background: var(--blue-soft);
}

.project-card__visual img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-card__visual-tag {
  position: absolute;
  top: 12px;
  left: 12px;
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  color: var(--ink);
  font-size: 11px;
  font-weight: 800;
  backdrop-filter: blur(10px);
}

.project-card__monogram {
  color: var(--ink);
  font-size: 26px;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.project-card__body {
  padding: 16px;
}

.project-card__body h3 {
  margin: 0;
  font-size: 18px;
  line-height: 1.3;
}

.project-card__body p {
  margin: 8px 0 14px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.project-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.project-card__meta span {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  padding: 0 9px;
  border-radius: 7px;
  background: var(--surface-soft);
  color: var(--ink);
  font-size: 11px;
}

.project-card__action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 14px;
  padding-top: 13px;
  border-top: 1px solid var(--line);
  color: var(--accent-strong);
  font-size: 13px;
  font-weight: 800;
}

.project-card__action::after {
  content: "";
  width: 8px;
  height: 8px;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
  transform: rotate(45deg);
}

.portal-footer {
  padding: 22px 18px 32px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
  text-align: center;
}

.tone-green {
  background: var(--accent-soft);
}

.tone-gold {
  background: var(--gold-soft);
}

.tone-blue {
  background: var(--blue-soft);
}

.tone-coral {
  background: var(--coral-soft);
}

.tone-slate {
  background: #e6ebf0;
}

/* Unified override for the legacy single-page works. */
.page-shell,
.site,
.exhibit-card {
  width: 100%;
  max-width: 480px;
  margin-right: auto;
  margin-left: auto;
}

.page-shell {
  padding: 0;
}

.exhibit-card {
  min-height: auto;
  padding: 28px 18px 36px;
  border: 0;
  border-radius: 0;
  background: #fff;
  box-shadow: none;
}

.exhibit-card h1 {
  max-width: 100%;
  font-size: 28px;
  letter-spacing: 0;
}

.exhibit-card h2 {
  font-size: 20px;
  letter-spacing: 0;
}

.exhibit-card p {
  font-size: 14px;
  line-height: 1.8;
  letter-spacing: 0;
}

.exhibit-card .eyebrow,
.exhibit-card .model-name,
.exhibit-card .architecture-kicker,
.exhibit-card figcaption,
.exhibit-card .footer-note {
  letter-spacing: 0.06em;
}

.exhibit-card section + section,
.exhibit-card figure + section,
.exhibit-card section + figure {
  margin-top: 30px;
}

.exhibit-card .advantages {
  gap: 16px;
}

.exhibit-card .advantage {
  padding-left: 38px;
}

.exhibit-card .flow-row,
.exhibit-card .mode-strip,
.exhibit-card .protocol-row,
.exhibit-card .chip-row {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.exhibit-card .system-map,
.exhibit-card .control-map,
.exhibit-card .trajectory-map {
  max-width: 100%;
}

.exhibit-card .system-map text,
.exhibit-card .control-map text,
.exhibit-card .trajectory-map text {
  font-size: 10px;
}

.exhibit-card .trajectory-map {
  padding: 10px;
}

.exhibit-card .category-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.exhibit-card .category {
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--ink);
  font-size: 12px;
}

.mobile-page-back {
  position: fixed;
  z-index: 60;
  top: 12px;
  left: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid rgba(217, 224, 232, 0.9);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  box-shadow: var(--shadow);
  font-size: 12px;
  font-weight: 800;
  backdrop-filter: blur(12px);
}

.mobile-page-back::before {
  content: "";
  width: 7px;
  height: 7px;
  border-bottom: 2px solid currentColor;
  border-left: 2px solid currentColor;
  transform: rotate(45deg);
  margin-left: 2px;
}

@media (max-width: 360px) {
  .portal-hero h1 {
    font-size: 27px;
  }

  .project-card__visual {
    min-height: 132px;
  }

  .project-card__body h3 {
    font-size: 17px;
  }
}

@media print {
  .mobile-toolbar,
  .mobile-page-back {
    display: none !important;
  }
}
