:root {
  --sea: #7fa7f2;
  --foam: #b7d6f7;
  --sun: #eef1ff;
  --peach: #a9a4ff;
  --lagoon: #6f7ef6;
  --lav: #f6f7ff;
  --ink: #242b63;
  --deep: #171d4b;
  --muted: #626a9a;
  --paper: rgba(246, 247, 255, 0.88);
  --line: rgba(36, 43, 99, 0.16);
  --shadow: 0 28px 80px rgba(74, 88, 183, 0.22);
  --active: #7fa7f2;
}

* { box-sizing: border-box; letter-spacing: 0; }
html, body { height: 100%; }
body {
  margin: 0;
  overflow: hidden;
  color: var(--ink);
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans SC", Arial, sans-serif;
  background:
    linear-gradient(118deg, rgba(127,167,242,.42), transparent 24%, rgba(183,214,247,.52) 48%, transparent 68%, rgba(169,164,255,.34)),
    linear-gradient(135deg, #eef1ff 0%, #dfe8ff 48%, #f7f5ff 100%);
  background-size: 170% 170%, 100% 100%;
  animation: tideShift 14s ease-in-out infinite alternate;
}

body::before {
  position: fixed;
  inset: 0;
  pointer-events: none;
  content: "";
  background-image:
    linear-gradient(115deg, rgba(36, 43, 99, 0.14) 0 2px, transparent 2px 58px),
    linear-gradient(20deg, rgba(111, 126, 246, 0.14) 0 2px, transparent 2px 64px);
  animation: gridDrift 18s linear infinite;
}

img { display: block; max-width: 100%; }
a { color: inherit; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--lagoon); outline-offset: 4px; }

.shell {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100dvh;
  padding: 16px;
  gap: 14px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
  border: 1px solid rgba(255,255,255,.7);
  border-radius: 28px;
  background: rgba(255,255,255,.78);
  padding: 12px 14px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  text-decoration: none;
}

.brand span {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--sea), var(--foam) 52%, var(--peach));
  box-shadow: 0 12px 26px rgba(111, 126, 246, .32);
  font-weight: 900;
}

.brand strong, .brand small { display: block; }
.brand small { margin-top: 2px; color: var(--muted); font-size: 12px; font-weight: 700; }

.top-actions {
  display: flex;
  gap: 8px;
  overflow-x: auto;
}

.top-actions a {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255,255,255,.65);
  padding: 10px 14px;
  text-decoration: none;
  font-weight: 900;
}

.top-actions .current { background: var(--sea); }

.workspace {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr) 300px;
  gap: 14px;
  min-height: 0;
  flex: 1 1 auto;
}

.profile-panel,
.content-panel,
.proof-panel {
  min-height: 0;
  border: 1px solid rgba(255,255,255,.72);
  border-radius: 32px;
  background: var(--paper);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.profile-panel,
.proof-panel {
  overflow-y: auto;
  padding: 16px;
}

.profile-panel {
  background:
    linear-gradient(160deg, rgba(255,255,255,.94), rgba(183,214,247,.76) 52%, rgba(238,241,255,.72)),
    var(--paper);
}

.proof-panel {
  background:
    linear-gradient(160deg, rgba(23,29,75,.98), rgba(70,82,176,.94) 58%, rgba(127,167,242,.84));
  color: white;
}

.portrait {
  margin: 0 0 16px;
  overflow: hidden;
  border-radius: 26px;
  background: white;
}

.portrait img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: 42% center;
}

.eyebrow {
  margin: 0;
  color: #5264dc;
  font-weight: 950;
}

.proof-panel .eyebrow,
.proof-panel h3,
.proof-panel p {
  color: white;
}

h1, h2, h3, p { overflow-wrap: anywhere; }
h1 {
  margin: 8px 0 0;
  font-family: Georgia, "Times New Roman", "Songti SC", serif;
  font-size: 42px;
  line-height: 1;
}

.intro,
.module-head p,
.proof-panel p,
.desk-card p {
  color: var(--muted);
  line-height: 1.7;
  font-weight: 700;
}

.identity-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0;
}

.identity-tags span,
.desk-card .tag {
  border: 1px solid rgba(23,57,76,.1);
  border-radius: 999px;
  background: rgba(255,255,255,.64);
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 900;
}

.metric-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.metric-grid div {
  border-radius: 22px;
  background: rgba(255,255,255,.78);
  padding: 13px;
}

.metric-grid strong,
.metric-grid span { display: block; }
.metric-grid strong { font-size: 19px; }
.metric-grid span { margin-top: 4px; color: var(--muted); font-size: 12px; font-weight: 800; }

.content-panel {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.module-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  flex: 0 0 auto;
  padding: 22px;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(120deg, rgba(127,167,242,.48), rgba(183,214,247,.6), rgba(238,241,255,.72), rgba(169,164,255,.38)),
    rgba(255,255,255,.76);
  background-size: 180% 180%;
  animation: headCurrent 9s ease-in-out infinite alternate;
}

.module-head h2 {
  margin: 6px 0 0;
  font-family: Georgia, "Times New Roman", "Songti SC", serif;
  font-size: 44px;
  line-height: 1.08;
}

.module-status {
  align-self: flex-start;
  display: grid;
  gap: 10px;
  width: min(220px, 100%);
}

.module-count {
  border-radius: 20px;
  background: var(--deep);
  color: white;
  padding: 12px 14px;
  font-weight: 950;
  white-space: nowrap;
}

.route-meter {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(5,42,51,.14);
}

.route-meter i {
  display: block;
  width: var(--progress, 25%);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--active), var(--foam), var(--peach));
  transition: width 560ms cubic-bezier(.2,.8,.2,1);
}

.module-tabs {
  display: flex;
  gap: 8px;
  flex: 0 0 auto;
  overflow-x: auto;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}

.module-tabs button {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255,255,255,.62);
  color: var(--ink);
  cursor: pointer;
  padding: 9px 15px;
  font: inherit;
  font-weight: 950;
}

.module-tabs button.active {
  background: var(--deep);
  color: white;
  box-shadow: 0 12px 28px rgba(5,42,51,.26);
}

.desk-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 12px;
  min-height: 0;
  overflow-y: auto;
  padding: 16px;
}

.desk-card {
  position: relative;
  min-height: 240px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.78);
  border-radius: 28px;
  background:
    linear-gradient(145deg, rgba(255,255,255,.94), rgba(255,255,255,.68)),
    var(--accent, var(--sea));
  padding: 16px;
  transform-origin: 50% 92%;
}

.desk-card::after {
  position: absolute;
  right: -26px;
  top: -26px;
  width: 82px;
  height: 82px;
  border-radius: 50%;
  background: var(--accent, var(--sea));
  opacity: .5;
  content: "";
}

.desk-card h3 {
  position: relative;
  margin: 12px 0 0;
  font-size: 22px;
  line-height: 1.28;
}

.desk-card p {
  position: relative;
  margin: 8px 0 0;
  font-size: 15px;
  line-height: 1.58;
}

.proof-focus {
  overflow: hidden;
  margin: 14px 0;
  border-radius: 26px;
  background: white;
  box-shadow: 0 24px 56px rgba(0,0,0,.22);
}

.proof-focus img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: contain;
  background: white;
}

.proof-panel h3 {
  margin: 10px 0 0;
  font-size: 24px;
}

.proof-dots {
  display: flex;
  gap: 8px;
  margin-top: 16px;
}

.proof-dots i {
  width: 34px;
  height: 10px;
  border-radius: 999px;
  background: var(--c);
  opacity: .9;
}

.is-entering {
  animation: cardIn 760ms cubic-bezier(.2,.8,.2,1) both;
}

@keyframes cardIn {
  0% { opacity: 0; transform: translateY(34px) scale(.94) rotateX(8deg); }
  68% { opacity: 1; transform: translateY(-4px) scale(1.015) rotateX(0); }
  100% { opacity: 1; transform: translateY(0) scale(1) rotateX(0); }
}

@keyframes cardFade {
  from { opacity: .28; }
  to { opacity: 1; }
}

.module-pulse {
  animation: modulePulse 720ms cubic-bezier(.2,.8,.2,1);
}

@keyframes modulePulse {
  0% { filter: saturate(1); }
  45% { filter: saturate(1.45) brightness(1.06); }
  100% { filter: saturate(1); }
}

@keyframes tideShift {
  from { background-position: 0% 45%, center; }
  to { background-position: 100% 55%, center; }
}

@keyframes gridDrift {
  from { background-position: 0 0, 0 0; }
  to { background-position: 160px 90px, -120px 100px; }
}

@keyframes headCurrent {
  from { background-position: 0% 50%; }
  to { background-position: 100% 50%; }
}

.shell {
  max-width: 460px;
  margin: 0 auto;
}

.workspace {
  grid-template-columns: 1fr;
  grid-template-rows: 142px minmax(0, 1fr);
}

.topbar {
  align-items: flex-start;
  flex-direction: column;
  border-radius: 24px;
}

.profile-panel {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  grid-template-rows: auto auto 1fr;
  gap: 6px 12px;
  overflow: hidden;
  padding: 10px;
}

.portrait {
  grid-row: 1 / 4;
  margin: 0;
  border-radius: 20px;
}

.portrait img {
  aspect-ratio: 1 / 1;
  object-position: center;
}

.profile-panel h1 {
  margin-top: 0;
  font-size: 27px;
}

.intro {
  margin: 0;
  font-size: 12px;
  line-height: 1.45;
}

.identity-tags,
.metric-grid {
  display: none;
}

.proof-panel {
  display: none;
}

.module-head {
  flex-direction: column;
  padding: 16px;
}

.module-head h2 {
  font-size: 31px;
}

.desk-grid {
  grid-template-columns: 1fr;
}

@media (max-width: 1080px) {
  .proof-panel { display: none; }
}

@media (max-width: 760px) {
  body { overflow: hidden; }
  .shell { height: 100dvh; min-height: 0; padding: 10px; }
  .topbar { align-items: flex-start; flex-direction: column; border-radius: 24px; }
  .workspace {
    grid-template-columns: 1fr;
    grid-template-rows: 142px minmax(0, 1fr);
    overflow: hidden;
  }
  .profile-panel {
    display: grid;
    grid-template-columns: 86px minmax(0, 1fr);
    grid-template-rows: auto auto 1fr;
    gap: 6px 12px;
    overflow: hidden;
    padding: 10px;
  }
  .portrait {
    grid-row: 1 / 4;
    margin: 0;
    border-radius: 20px;
  }
  .portrait img { aspect-ratio: 1 / 1; object-position: center; }
  .profile-panel h1 {
    margin-top: 0;
    font-size: 27px;
  }
  .intro {
    margin: 0;
    font-size: 12px;
    line-height: 1.45;
  }
  .identity-tags,
  .metric-grid {
    display: none;
  }
  .content-panel { height: auto; }
  .module-head { flex-direction: column; padding: 16px; }
  .module-head h2 { font-size: 31px; }
  .desk-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  body {
    animation-duration: 28s;
  }

  body::before {
    animation: none;
  }

  .module-head {
    animation-duration: 18s;
  }

  .is-entering {
    animation: cardFade 420ms ease-out both;
  }

  .route-meter i {
    transition-duration: 300ms;
  }
}
