:root {
  color-scheme: light;
  --ink: #14222d;
  --muted: rgba(20, 34, 45, 0.66);
  --soft: #f4f7f2;
  --paper: #ffffff;
  --wash: #e5ede5;
  --blue: #1f4f70;
  --teal: #356b65;
  --line: rgba(31, 79, 112, 0.15);
  --line-strong: rgba(31, 79, 112, 0.28);
  --active-bg: rgba(31, 79, 112, 0.08);
  --subtle-bg: rgba(31, 79, 112, 0.06);
  --clinic-bg: rgba(31, 79, 112, 0.07);
  --topbar-height: 48px;
  --botanical-bg: url("/assets/nature/gpt-botanical-meadow-bg.jpg");
  --botanical-line-bg: url("/assets/nature/soft-botanical-bg.svg");
  --page-bg-tint: rgba(255, 255, 255, 0.34);
  --page-color-wash:
    radial-gradient(circle at 12% 16%, rgba(255, 255, 255, 0.64), transparent 32%),
    linear-gradient(132deg, rgba(222, 239, 227, 0.34), rgba(255, 255, 255, 0.08) 54%, rgba(217, 234, 226, 0.26));
  --stage-bg-tint: rgba(255, 255, 255, 0.02);
  --panel-glass: rgba(255, 255, 255, 0.94);
  --panel-glass-soft: rgba(255, 255, 255, 0.84);
  --control-glass: rgba(255, 255, 255, 0.7);
  --display-font: "Noto Serif SC", "Songti SC", "SimSun", "Microsoft YaHei", serif;
  --body-font: Arial, "Microsoft YaHei", "Noto Sans SC", "PingFang SC", sans-serif;
  font-family: var(--body-font);
  letter-spacing: 0;
}

body[data-background="blue-field"] {
  --botanical-bg: url("/assets/nature/unsplash-blue-flower-field-bg.jpg");
  --page-bg-tint: rgba(244, 250, 255, 0.34);
  --page-color-wash:
    radial-gradient(circle at 78% 8%, rgba(159, 199, 232, 0.36), transparent 34%),
    linear-gradient(125deg, rgba(204, 227, 242, 0.26), transparent 52%, rgba(171, 196, 231, 0.24));
  --stage-bg-tint: rgba(255, 255, 255, 0.02);
}

body[data-background="mint"] {
  --botanical-bg: url("/assets/nature/botanical-mint-bg.jpg");
  --page-bg-tint: rgba(248, 255, 251, 0.34);
  --page-color-wash:
    radial-gradient(circle at 12% 20%, rgba(171, 222, 196, 0.42), transparent 33%),
    linear-gradient(132deg, rgba(194, 231, 211, 0.32), transparent 54%, rgba(186, 225, 211, 0.22));
  --stage-bg-tint: rgba(255, 255, 255, 0.02);
}

body[data-background="cyan"] {
  --botanical-bg: url("/assets/nature/botanical-cyan-bg.jpg");
  --page-bg-tint: rgba(244, 255, 255, 0.32);
  --page-color-wash:
    radial-gradient(circle at 18% 18%, rgba(124, 211, 222, 0.34), transparent 34%),
    linear-gradient(132deg, rgba(184, 230, 235, 0.28), transparent 58%, rgba(183, 223, 226, 0.24));
  --stage-bg-tint: rgba(255, 255, 255, 0.02);
}

body[data-background="lavender"] {
  --botanical-bg: url("/assets/nature/botanical-lavender-bg.jpg");
  --page-bg-tint: rgba(252, 248, 255, 0.3);
  --page-color-wash:
    radial-gradient(circle at 72% 12%, rgba(189, 162, 224, 0.34), transparent 35%),
    linear-gradient(132deg, rgba(219, 205, 238, 0.3), transparent 54%, rgba(232, 213, 236, 0.28));
  --stage-bg-tint: rgba(255, 255, 255, 0.02);
}

body[data-background="pink"] {
  --botanical-bg: url("/assets/nature/botanical-pink-bg.jpg");
  --page-bg-tint: rgba(255, 247, 250, 0.3);
  --page-color-wash:
    radial-gradient(circle at 72% 10%, rgba(233, 151, 184, 0.34), transparent 34%),
    linear-gradient(132deg, rgba(239, 194, 210, 0.32), transparent 54%, rgba(247, 201, 211, 0.28));
  --stage-bg-tint: rgba(255, 255, 255, 0.02);
}

body[data-background="yellow"] {
  --botanical-bg: url("/assets/nature/botanical-yellow-bg.jpg");
  --page-bg-tint: rgba(255, 253, 241, 0.3);
  --page-color-wash:
    radial-gradient(circle at 70% 12%, rgba(230, 199, 91, 0.34), transparent 34%),
    linear-gradient(132deg, rgba(240, 221, 151, 0.34), transparent 54%, rgba(235, 214, 146, 0.28));
  --stage-bg-tint: rgba(255, 255, 255, 0.02);
}

body[data-background="orange"] {
  --botanical-bg: url("/assets/nature/botanical-orange-bg.jpg");
  --page-bg-tint: rgba(255, 247, 240, 0.28);
  --page-color-wash:
    radial-gradient(circle at 70% 10%, rgba(232, 148, 76, 0.34), transparent 35%),
    linear-gradient(132deg, rgba(239, 182, 126, 0.34), transparent 55%, rgba(232, 166, 115, 0.28));
  --stage-bg-tint: rgba(255, 255, 255, 0.02);
}

body[data-background="red"] {
  --botanical-bg: url("/assets/nature/botanical-red-bg.jpg");
  --page-bg-tint: rgba(255, 244, 244, 0.26);
  --page-color-wash:
    radial-gradient(circle at 72% 8%, rgba(206, 67, 78, 0.28), transparent 34%),
    radial-gradient(circle at 6% 92%, rgba(225, 128, 128, 0.28), transparent 34%),
    linear-gradient(132deg, rgba(226, 146, 148, 0.36), transparent 54%, rgba(207, 84, 93, 0.2));
  --stage-bg-tint: rgba(255, 255, 255, 0.01);
}

body[data-background="white-flowers"] {
  --botanical-bg: url("/assets/nature/unsplash-white-flowers-bg.jpg");
  --page-bg-tint: rgba(255, 255, 255, 0.3);
  --page-color-wash:
    radial-gradient(circle at 18% 10%, rgba(255, 255, 255, 0.52), transparent 32%),
    linear-gradient(132deg, rgba(221, 232, 220, 0.26), transparent 55%, rgba(230, 216, 203, 0.22));
  --stage-bg-tint: rgba(255, 255, 255, 0.01);
}

body[data-background="none"] {
  --botanical-bg: none;
  --page-bg-tint: rgba(255, 255, 255, 0.25);
  --page-color-wash:
    radial-gradient(circle at 20% 18%, rgba(223, 239, 235, 0.74), transparent 34%),
    linear-gradient(132deg, #f7fbfb, #edf6f3 55%, #f6f1ea);
  --stage-bg-tint: rgba(255, 255, 255, 0.08);
}

body[data-theme="red"] {
  --soft: #faf6f4;
  --wash: #efe3de;
  --blue: #a40000;
  --teal: #7c2b22;
  --line: rgba(164, 0, 0, 0.15);
  --line-strong: rgba(164, 0, 0, 0.28);
  --active-bg: rgba(164, 0, 0, 0.08);
  --subtle-bg: rgba(164, 0, 0, 0.06);
  --clinic-bg: rgba(164, 0, 0, 0.07);
}

body[data-theme="teal"] {
  --soft: #f2f8f8;
  --wash: #dceced;
  --blue: #00606a;
  --teal: #2b6c63;
  --line: rgba(0, 96, 106, 0.16);
  --line-strong: rgba(0, 96, 106, 0.3);
  --active-bg: rgba(0, 96, 106, 0.08);
  --subtle-bg: rgba(0, 96, 106, 0.06);
  --clinic-bg: rgba(0, 96, 106, 0.07);
}

body[data-theme="green"] {
  --soft: #f4f8f3;
  --wash: #e1eadf;
  --blue: #285943;
  --teal: #3f7055;
  --line: rgba(40, 89, 67, 0.16);
  --line-strong: rgba(40, 89, 67, 0.3);
  --active-bg: rgba(40, 89, 67, 0.08);
  --subtle-bg: rgba(40, 89, 67, 0.06);
  --clinic-bg: rgba(40, 89, 67, 0.07);
}

body[data-theme="gold"] {
  --soft: #faf8f0;
  --wash: #eee5cd;
  --blue: #8b6f2d;
  --teal: #6e633f;
  --line: rgba(139, 111, 45, 0.18);
  --line-strong: rgba(139, 111, 45, 0.32);
  --active-bg: rgba(139, 111, 45, 0.1);
  --subtle-bg: rgba(139, 111, 45, 0.07);
  --clinic-bg: rgba(139, 111, 45, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: clip;
}

body {
  min-width: 320px;
  margin: 0;
  overflow-x: clip;
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.08)),
    var(--page-color-wash),
    var(--botanical-bg) center top / cover no-repeat,
    var(--soft);
  background-attachment: fixed;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

button {
  font: inherit;
}

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

h1,
h2,
h3,
p {
  margin-top: 0;
}

p,
span,
strong,
li,
dd,
dt {
  overflow-wrap: anywhere;
}

.upgrade-topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  min-height: var(--topbar-height);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 5px clamp(16px, 3vw, 34px);
  border-bottom: 1px solid var(--line);
  background: rgba(250, 254, 253, 0.9);
  backdrop-filter: blur(16px);
  box-shadow: none;
}

.upgrade-brand {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 17px;
}

.upgrade-brand strong {
  color: var(--ink);
  font-family: "Noto Serif SC", "Songti SC", "SimSun", "Microsoft YaHei", serif;
  font-size: clamp(24px, 2.25vw, 30px);
  line-height: 1;
  font-weight: 900;
}

.brand-tagline {
  position: relative;
  min-width: 0;
  max-width: min(860px, 61vw);
  display: inline-flex;
  align-items: center;
  color: color-mix(in srgb, var(--blue) 86%, var(--ink));
  font-family: var(--display-font);
  font-size: clamp(16px, 1.18vw, 18px);
  line-height: 1.18;
  font-weight: 850;
  overflow-wrap: normal;
  word-break: keep-all;
  letter-spacing: 0;
}

.brand-tagline::before {
  content: "";
  width: 1px;
  height: 24px;
  flex: 0 0 auto;
  display: inline-block;
  margin-right: 18px;
  background: color-mix(in srgb, var(--blue) 46%, transparent);
}

.upgrade-actions {
  display: flex;
  align-items: center;
  justify-content: end;
  gap: 6px;
}

.background-picker,
.theme-picker,
.panel-bg-picker,
.language-toggle {
  position: relative;
  z-index: 1;
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 8px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--blue);
  background: #ffffff;
  box-shadow: none;
  backdrop-filter: none;
  font-size: 13px;
  font-weight: 830;
}

.background-picker:hover,
.theme-picker:hover,
.panel-bg-picker:hover,
.language-toggle:hover,
.background-picker:focus-within,
.theme-picker:focus-within,
.panel-bg-picker:focus-within,
.language-toggle:focus-visible {
  border-color: color-mix(in srgb, var(--blue) 34%, transparent);
  background: var(--active-bg);
}

.background-picker select,
.theme-picker select,
.panel-bg-picker select {
  width: 86px;
  min-height: 24px;
  border: 0;
  color: var(--ink);
  background: transparent;
  font: inherit;
  font-weight: 760;
  cursor: pointer;
}

.theme-picker select {
  width: 68px;
}

.panel-bg-picker select {
  width: 86px;
}

.background-picker select:focus-visible,
.theme-picker select:focus-visible,
.panel-bg-picker select:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--blue) 34%, transparent);
  outline-offset: 2px;
}

.language-toggle {
  min-width: 48px;
  padding: 0 12px;
  cursor: pointer;
}

.upgrade-shell {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(198px, 224px) minmax(0, 1fr);
  min-height: calc(100svh - var(--topbar-height));
}

.upgrade-shell::before {
  content: "";
  position: fixed;
  top: var(--topbar-height);
  bottom: 0;
  left: clamp(198px, 17vw, 224px);
  z-index: 0;
  width: min(28vw, 420px);
  pointer-events: none;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0.42) 42%, rgba(255, 255, 255, 0));
}

.upgrade-rail {
  position: sticky;
  top: var(--topbar-height);
  align-self: start;
  height: calc(100svh - var(--topbar-height));
  overflow: auto;
  isolation: isolate;
  padding: 24px 13px 22px 16px;
  border-right: 1px solid rgba(255, 255, 255, 0.66);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.9) 52%, rgba(255, 255, 255, 0.96)),
    rgba(255, 255, 255, 0.93);
  backdrop-filter: blur(26px) saturate(1.05);
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.64), 20px 0 54px rgba(20, 34, 45, 0.05);
}

.upgrade-rail::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.46), rgba(255, 255, 255, 0.7) 58%, rgba(255, 255, 255, 0.9)),
    var(--botanical-bg) 52% center / cover no-repeat;
  opacity: 0.38;
}

.upgrade-rail::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: -1;
  width: 88px;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.76));
}

.mobile-menu-toggle {
  display: none;
}

.profile-tree {
  position: relative;
  z-index: 1;
  min-height: auto;
  display: block;
  overflow: visible;
  padding-right: 4px;
}

.tree-leaf,
.tree-parent,
.tree-children button {
  width: 100%;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: color-mix(in srgb, var(--blue) 52%, var(--ink));
  text-align: left;
  cursor: pointer;
  transition: background-color 180ms ease, color 180ms ease, box-shadow 180ms ease;
}

.tree-leaf {
  min-height: 42px;
  display: flex;
  align-items: center;
  padding: 7px 10px 7px 13px;
  border: 0;
  border-bottom: 1px solid color-mix(in srgb, var(--blue) 14%, transparent);
  background: transparent;
}

.tree-leaf span,
.tree-parent strong {
  font-size: 15px;
  line-height: 1.35;
  font-weight: 700;
  letter-spacing: 0;
}

.tree-leaf:hover,
.tree-leaf:focus-visible,
.tree-leaf.is-active {
  color: var(--blue);
  background-color: var(--active-bg);
  box-shadow: none;
}

.tree-leaf.is-active {
  color: #ffffff;
  background: var(--blue);
  box-shadow: none;
  margin-top: -1px;
}

.tree-leaf.is-active span,
.tree-children button.is-active span {
  color: inherit;
}

.tree-group {
  margin: 0;
  padding: 0 0 8px;
  border-bottom: 1px solid color-mix(in srgb, var(--blue) 14%, transparent);
}

.tree-parent {
  min-height: 44px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 20px;
  gap: 12px;
  align-items: center;
  padding: 7px 10px 7px 13px;
  border: 0;
  background: transparent;
}

.tree-parent i {
  width: 9px;
  height: 9px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform 180ms ease;
}

.tree-parent:hover,
.tree-parent:focus-visible,
.tree-group.is-open .tree-parent {
  color: var(--blue);
  background: var(--subtle-bg);
}

.tree-group.is-open .tree-parent i {
  transform: rotate(225deg) translate(-2px, -2px);
}

.tree-children {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: max-height 320ms ease, opacity 260ms ease, visibility 0s linear 320ms;
}

.tree-group.is-open .tree-children {
  max-height: 190px;
  margin: 0 0 0 14px;
  padding: 4px 0 4px 12px;
  border-left: 1px solid color-mix(in srgb, var(--blue) 16%, transparent);
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: max-height 320ms ease, opacity 260ms ease, visibility 0s;
}

.tree-children button {
  min-height: 36px;
  display: flex;
  align-items: center;
  margin: 0 0 4px;
  padding: 6px 10px;
  color: color-mix(in srgb, var(--blue) 46%, var(--ink));
  font-size: 14px;
  line-height: 1.35;
  font-weight: 650;
  border: 0;
  background: transparent;
}

.tree-children button span {
  font-size: inherit;
  line-height: inherit;
  font-weight: inherit;
}

.tree-children button:hover,
.tree-children button:focus-visible,
.tree-children button.is-active {
  color: var(--blue);
  background: var(--active-bg);
}

.tree-children button.is-active {
  color: #ffffff;
  background: var(--blue);
}

.upgrade-stage {
  position: relative;
  isolation: isolate;
  min-width: 0;
  overflow: hidden;
  padding: clamp(40px, 4.2vw, 68px) clamp(28px, 3.2vw, 52px) clamp(28px, 3.2vw, 52px);
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.68) 0%, rgba(255, 255, 255, 0.38) 24%, rgba(255, 255, 255, 0.12) 58%, rgba(255, 255, 255, 0.04) 100%),
    var(--stage-bg-tint);
}

.upgrade-stage::before,
.upgrade-stage::after {
  content: "";
  position: fixed;
  top: var(--topbar-height);
  right: 0;
  bottom: 0;
  left: clamp(198px, 17vw, 224px);
  z-index: -2;
  pointer-events: none;
}

.upgrade-stage::before {
  background: var(--botanical-bg) right center / cover no-repeat;
  -webkit-mask-image: linear-gradient(90deg, rgba(0, 0, 0, 0.04) 0%, rgba(0, 0, 0, 0.2) 16%, rgba(0, 0, 0, 0.64) 42%, #000 100%);
  mask-image: linear-gradient(90deg, rgba(0, 0, 0, 0.04) 0%, rgba(0, 0, 0, 0.2) 16%, rgba(0, 0, 0, 0.64) 42%, #000 100%);
}

.upgrade-stage::after {
  left: clamp(198px, 17vw, 224px);
  z-index: -1;
  width: auto;
  right: 0;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0.52) 18%, rgba(255, 255, 255, 0.24) 42%, rgba(255, 255, 255, 0.08) 76%);
  -webkit-mask-image: linear-gradient(90deg, #000 0%, rgba(0, 0, 0, 0.78) 22%, rgba(0, 0, 0, 0.28) 56%, transparent 86%);
  mask-image: linear-gradient(90deg, #000 0%, rgba(0, 0, 0, 0.78) 22%, rgba(0, 0, 0, 0.28) 56%, transparent 86%);
}

.profile-panel {
  position: relative;
  isolation: isolate;
  width: min(1280px, 100%);
  min-height: min(640px, calc(100svh - var(--topbar-height) - 84px));
  display: block;
  padding: clamp(30px, 3.8vw, 58px);
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: 8px;
  background:
    radial-gradient(circle at 82% 12%, rgba(255, 255, 255, 0.28), transparent 28%),
    linear-gradient(90deg, rgba(255, 255, 255, 0.97) 0%, rgba(255, 255, 255, 0.88) 30%, rgba(255, 255, 255, 0.62) 66%, rgba(255, 255, 255, 0.32) 100%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.78) 0%, rgba(255, 255, 255, 0.44) 52%, rgba(255, 255, 255, 0.84) 100%),
    var(--botanical-bg) right center / cover no-repeat,
    var(--paper);
  backdrop-filter: blur(14px) saturate(1.03);
  overflow: hidden;
  animation: panelIn 220ms ease both;
  box-shadow: 0 34px 95px rgba(20, 34, 45, 0.12);
}

.profile-panel > * {
  position: relative;
  z-index: 1;
}

.profile-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.96) 0%, rgba(255, 255, 255, 0.86) 44%, rgba(255, 255, 255, 0.22) 100%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0.28) 58%, rgba(255, 255, 255, 0.78)),
    var(--botanical-bg) right center / cover no-repeat;
  opacity: 0.34;
}

.profile-panel[data-panel="overview"] {
  max-width: 1320px;
  border-color: rgba(255, 255, 255, 0.52);
  background:
    radial-gradient(circle at 88% 9%, rgba(255, 255, 255, 0.26), transparent 24%),
    linear-gradient(90deg, rgba(255, 255, 255, 0.97) 0%, rgba(255, 255, 255, 0.84) 34%, rgba(255, 255, 255, 0.56) 72%, rgba(255, 255, 255, 0.24) 100%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.76) 0%, rgba(255, 255, 255, 0.36) 50%, rgba(255, 255, 255, 0.84) 100%),
    var(--botanical-bg) right center / cover no-repeat,
    var(--paper);
  backdrop-filter: blur(16px) saturate(1.08);
}

/* Keep every profile panel aligned to the full stage width on wide screens. */
.profile-panel,
.profile-panel[data-panel="overview"] {
  width: 100%;
  max-width: none;
}

.profile-panel[data-panel="overview"]::before {
  content: "";
  position: absolute;
  inset: 1px;
  z-index: -1;
  border-radius: inherit;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.7), transparent 46%),
    linear-gradient(180deg, transparent 0%, rgba(255, 255, 255, 0.44) 100%);
}

body[data-panel-background="none"] .profile-panel,
body[data-panel-background="none"] .profile-panel[data-panel="overview"],
body[data-panel-background="rail"] .profile-panel,
body[data-panel-background="rail"] .profile-panel[data-panel="overview"] {
  background:
    linear-gradient(180deg, #ffffff 0%, #fbfdfd 100%),
    var(--paper);
  backdrop-filter: none;
}

body[data-panel-background="none"] .profile-panel[data-panel="overview"]::before,
body[data-panel-background="rail"] .profile-panel[data-panel="overview"]::before {
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.86), transparent 46%),
    linear-gradient(180deg, transparent 0%, rgba(255, 255, 255, 0.68) 100%);
}

body[data-panel-background="none"] .profile-panel::after,
body[data-panel-background="rail"] .profile-panel::after {
  display: none;
}

body[data-panel-background="none"] .upgrade-rail::before,
body[data-panel-background="panel"] .upgrade-rail::before {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.72));
  opacity: 1;
}

.profile-panel[hidden] {
  display: none;
}

@keyframes panelIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.profile-panel h2 {
  max-width: 980px;
  margin: 0 0 18px;
  color: var(--ink);
  font-family: var(--display-font);
  font-size: clamp(60px, 8.8vw, 132px);
  line-height: 0.9;
  letter-spacing: 0;
  font-weight: 900;
}

.profile-panel:not([data-panel="overview"]) h2 {
  color: var(--blue);
  font-size: clamp(26px, 3.2vw, 34px);
  line-height: 1.22;
}

.profile-positioning {
  max-width: 760px;
  margin: 0 0 26px;
  color: var(--blue);
  font-family: var(--display-font);
  font-size: clamp(24px, 3.1vw, 40px);
  line-height: 1.24;
  font-weight: 900;
}

.overview-support {
  max-width: 720px;
  margin: 0 0 clamp(26px, 3.4vw, 42px);
  color: color-mix(in srgb, var(--ink) 76%, var(--blue));
  font-size: clamp(16px, 1.35vw, 19px);
  line-height: 1.85;
  font-weight: 620;
}

.overview-kicker {
  display: inline-flex;
  width: fit-content;
  margin-bottom: 18px;
  padding: 8px 13px;
  border: 1px solid rgba(255, 255, 255, 0.66);
  border-radius: 999px;
  color: var(--blue);
  background: rgba(255, 255, 255, 0.48);
  box-shadow: 0 12px 30px rgba(20, 34, 45, 0.07);
  backdrop-filter: blur(14px);
  font-size: 13px;
  line-height: 1;
  font-weight: 850;
}

.overview-hero {
  display: grid;
  grid-template-columns: minmax(500px, 1fr) minmax(320px, 430px);
  gap: clamp(38px, 5.2vw, 74px);
  align-items: center;
  min-height: min(680px, calc(100svh - var(--topbar-height) - 126px));
  margin: 0 0 clamp(38px, 5vw, 66px);
}

.overview-copy {
  min-width: 0;
  display: grid;
  align-content: center;
  position: relative;
  isolation: isolate;
}

.overview-copy::before {
  content: none;
}

.summary-fields {
  width: min(620px, 100%);
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  overflow: visible;
  margin: clamp(24px, 3vw, 36px) 0 0;
  padding: 0;
  border-top: 1px solid var(--line);
  background: transparent;
  backdrop-filter: none;
}

.summary-fields div {
  display: grid;
  grid-template-columns: minmax(110px, 0.18fr) minmax(0, 1fr);
  gap: clamp(16px, 2.8vw, 34px);
  align-items: center;
  min-height: 54px;
  padding: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.summary-fields div:last-child {
  border-bottom: 0;
  max-width: 100%;
}

.summary-fields dt,
.summary-fields dd {
  margin: 0;
  font-size: 16px;
  line-height: 1.55;
}

.summary-fields dt {
  color: #555555;
  font-weight: 700;
}

.summary-fields dd {
  color: #222222;
  font-weight: 700;
}

.overview-portrait {
  min-width: 0;
  display: grid;
  align-content: start;
  margin: 0;
  padding: clamp(10px, 1.2vw, 14px);
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.34);
  box-shadow: 0 42px 92px rgba(20, 34, 45, 0.16);
  transform: translateY(8px);
}

.overview-portrait img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center top;
  border-radius: 6px;
  box-shadow: 0 18px 36px rgba(20, 34, 45, 0.13);
}

.intro-copy {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(22px, 3.2vw, 42px);
  padding: clamp(28px, 3.6vw, 46px);
  border: 1px solid rgba(255, 255, 255, 0.48);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.5);
  box-shadow: 0 22px 56px rgba(20, 34, 45, 0.07);
  backdrop-filter: blur(16px);
}

.intro-copy p,
.lead,
.plain-list li,
.fact-rows dd {
  color: color-mix(in srgb, var(--ink) 84%, #ffffff);
  font-size: 16px;
  line-height: 1.9;
}

.intro-copy p,
.lead {
  margin: 0;
}

.intro-copy p {
  max-width: 60ch;
}

.lead {
  max-width: 940px;
  margin-bottom: 22px;
}

.overview-expertise-links {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  margin-top: clamp(28px, 3.8vw, 46px);
  border: 1px solid color-mix(in srgb, var(--blue) 12%, transparent);
  border-radius: 8px;
  box-shadow: 0 22px 54px rgba(20, 34, 45, 0.07);
  background: color-mix(in srgb, var(--blue) 14%, rgba(255, 255, 255, 0.26));
}

.overview-expertise-links button {
  min-width: 0;
  display: grid;
  gap: 10px;
  align-content: start;
  padding: clamp(20px, 2.4vw, 30px);
  border: 0;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.58);
  backdrop-filter: blur(14px);
  text-align: left;
  cursor: pointer;
  transition: background 180ms ease, transform 180ms ease, color 180ms ease;
}

.overview-expertise-links button:hover,
.overview-expertise-links button:focus-visible {
  background: rgba(255, 255, 255, 0.78);
  transform: translateY(-2px);
}

.overview-expertise-links strong {
  color: var(--blue);
  font-family: var(--display-font);
  font-size: clamp(19px, 1.7vw, 24px);
  line-height: 1.3;
  font-weight: 900;
}

.overview-expertise-links span {
  color: color-mix(in srgb, var(--ink) 82%, var(--blue));
  font-size: 15px;
  line-height: 1.7;
}

.expertise-hero {
  margin: 0 0 28px;
  border: 1px solid var(--line);
  background: #f8fbfb;
}

.expertise-hero img {
  width: 100%;
  aspect-ratio: 16 / 6;
  object-fit: cover;
}

.expertise-hero figcaption {
  padding: 10px 14px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
  font-weight: 650;
  text-align: center;
}

.expertise-heading {
  max-width: 900px;
  margin: 0 auto 26px;
  text-align: center;
}

.expertise-heading span {
  display: block;
  margin-bottom: 10px;
  color: var(--blue);
  font-size: 12px;
  line-height: 1.4;
  font-weight: 850;
  text-transform: uppercase;
}

.expertise-heading h2 {
  margin-right: auto;
  margin-left: auto;
}

.expertise-heading .lead {
  margin-right: auto;
  margin-left: auto;
}

.case-feature {
  display: grid;
  grid-template-columns: minmax(340px, 1fr) minmax(0, 1fr);
  gap: clamp(22px, 3vw, 38px);
  align-items: center;
  margin: 0 0 32px;
  padding: clamp(22px, 3vw, 34px) 0;
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--blue) 5%, transparent), transparent 56%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(248, 251, 251, 0.55));
}

.case-feature-reverse {
  grid-template-columns: minmax(0, 1fr) minmax(340px, 1fr);
}

.case-feature-reverse .case-visual {
  order: 2;
}

.case-feature-reverse .case-copy {
  order: 1;
}

.case-visual {
  min-width: 0;
  margin: 0;
  border: 1px solid var(--line);
  background: #ffffff;
}

.case-visual img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}

.case-visual figcaption {
  padding: 10px 14px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
  font-weight: 700;
}

.case-copy {
  min-width: 0;
}

.case-copy > span {
  display: block;
  margin-bottom: 10px;
  color: var(--blue);
  font-size: 12px;
  line-height: 1.3;
  font-weight: 850;
  text-transform: uppercase;
}

.case-copy h3 {
  margin: 0 0 14px;
  color: var(--ink);
  font-size: clamp(22px, 2.4vw, 30px);
  line-height: 1.28;
  font-weight: 860;
}

.case-copy p {
  margin: 0;
  color: #303b41;
  font-size: 16px;
  line-height: 1.85;
}

.case-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  margin: 20px 0 18px;
  border: 1px solid var(--line);
  background: var(--line);
}

.case-meta div {
  min-width: 0;
  display: grid;
  gap: 6px;
  align-content: start;
  padding: 14px;
  background: rgba(255, 255, 255, 0.88);
}

.case-meta strong {
  color: var(--blue);
  font-size: 13px;
  line-height: 1.35;
  font-weight: 850;
}

.case-meta span {
  color: #333;
  font-size: 14px;
  line-height: 1.55;
  font-weight: 650;
}

.case-points {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-left: 20px;
}

.case-points li {
  color: #333;
  font-size: 15px;
  line-height: 1.78;
}

.case-points li::marker {
  color: var(--blue);
}

.expertise-story {
  max-width: 980px;
  margin: 0 auto 28px;
  padding: 26px 0;
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line);
}

.expertise-story h3,
.expertise-grid h3,
.research-stack h3,
.output-list h3 {
  margin: 0 0 12px;
  color: var(--ink);
  font-size: 20px;
  line-height: 1.35;
  font-weight: 820;
}

.expertise-story p,
.expertise-grid li,
.pathway-list span,
.research-stack p,
.output-list p {
  color: #333;
  font-size: 16px;
  line-height: 1.85;
}

.expertise-story p {
  margin: 0;
}

.expertise-story p + p {
  margin-top: 14px;
}

.expertise-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  margin-top: 28px;
  border: 1px solid var(--line);
  background: var(--line);
}

.expertise-grid article {
  min-width: 0;
  padding: clamp(20px, 2.5vw, 28px);
  background: #fbfdfd;
}

.expertise-grid ul {
  display: grid;
  gap: 12px;
  margin: 0;
  padding-left: 20px;
}

.expertise-grid li::marker {
  color: var(--blue);
}

.pathway-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin: 28px 0 0;
  padding: 0;
  border: 1px solid var(--line);
  background: var(--line);
  list-style: none;
}

.pathway-list li {
  min-width: 0;
  display: grid;
  gap: 12px;
  padding: 22px;
  background: #fbfdfd;
}

.pathway-list strong {
  color: var(--blue);
  font-size: 14px;
  line-height: 1.3;
  font-weight: 860;
}

.research-stack {
  display: grid;
  gap: 0;
  margin-top: 28px;
  border-top: 1px solid var(--line-strong);
}

.research-stack article {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr);
  grid-template-areas:
    "marker title"
    "marker copy";
  gap: clamp(18px, 3vw, 36px);
  row-gap: 14px;
  align-items: start;
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
}

.research-stack span {
  grid-area: marker;
  display: block;
  padding-top: 0;
  color: var(--blue);
  font-size: 26px;
  line-height: 1;
  font-weight: 860;
}

.research-stack h3,
.research-stack p {
  grid-column: auto;
}

.research-stack h3 {
  grid-area: title;
  align-self: start;
}

.research-stack p {
  grid-area: copy;
}

.research-stack article > div,
.output-list article > div {
  min-width: 0;
}

.research-stack p,
.output-list p {
  margin: 0;
}

.output-list {
  display: grid;
  gap: 0;
  margin-top: 28px;
  border-top: 1px solid var(--line-strong);
}

.output-list article {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  grid-template-areas: "date output";
  gap: clamp(22px, 3.2vw, 42px);
  align-items: start;
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
}

.output-list time {
  grid-area: date;
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  padding-top: 1px;
  color: var(--blue);
  font-family: "Microsoft YaHei", "Noto Sans SC", "PingFang SC", Arial, sans-serif;
  font-size: clamp(24px, 2.2vw, 31px);
  line-height: 1;
  font-weight: 900;
  white-space: nowrap;
}

.output-list article > div {
  grid-area: output;
}

.plain-list {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
  list-style: none;
}

.plain-list li {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.fact-rows {
  display: grid;
  gap: 0;
  margin: 0;
  border-top: 1px solid var(--line-strong);
}

.fact-rows div {
  display: grid;
  grid-template-columns: minmax(130px, 0.2fr) minmax(0, 1fr);
  gap: 18px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.fact-rows dt,
.fact-rows dd {
  margin: 0;
}

.fact-rows dt {
  color: #555;
  font-size: 15px;
  line-height: 1.75;
  font-weight: 700;
}

.weekly-clinic {
  overflow: hidden;
  margin-top: 4px;
  border: 1px solid var(--line);
}

.week-row {
  display: grid;
  grid-template-columns: minmax(86px, 0.58fr) repeat(7, minmax(0, 1fr));
}

.week-row > * {
  min-width: 0;
  border-right: 1px solid var(--line);
}

.week-row > *:last-child {
  border-right: 0;
}

.week-head span {
  min-height: 42px;
  display: grid;
  place-items: center;
  color: var(--muted);
  background: #f8fbfb;
  font-weight: 850;
}

.week-slots {
  border-top: 1px solid var(--line);
}

.week-slots div {
  min-height: 96px;
  display: grid;
  align-content: center;
  gap: 8px;
  padding: 10px;
  text-align: center;
  background: #ffffff;
}

.week-slots .slot-label {
  color: var(--blue);
  background: #f8fbfb;
  font-size: 16px;
  font-weight: 800;
}

.week-slots strong {
  color: rgba(20, 34, 45, 0.42);
  font-size: 16px;
}

.week-slots span,
.week-slots b {
  display: block;
  line-height: 1.45;
}

.week-slots span {
  color: #444;
  font-size: 14px;
  font-weight: 650;
}

.week-slots b {
  color: var(--blue);
  font-size: 15px;
  font-weight: 800;
}

.week-slots .is-clinic {
  background: var(--clinic-bg);
}

.week-slots .is-clinic strong {
  color: var(--blue);
}

.clinic-note {
  margin: 16px 0 0;
  padding: 12px 14px;
  border-left: 4px solid var(--blue);
  background: var(--clinic-bg);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.65;
  font-weight: 650;
}

.contact-rows {
  margin-top: 28px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }
}

@media (max-width: 1080px) {
  .upgrade-shell {
    grid-template-columns: minmax(180px, 210px) minmax(0, 1fr);
  }

  .overview-hero {
    grid-template-columns: 1fr;
  }

  .overview-portrait {
    width: min(420px, 100%);
  }

  .intro-copy,
  .overview-expertise-links,
  .case-feature,
  .pathway-list {
    grid-template-columns: 1fr;
  }

  .case-feature-reverse {
    grid-template-columns: 1fr;
  }

  .case-feature-reverse .case-visual,
  .case-feature-reverse .case-copy {
    order: initial;
  }

  .case-meta {
    grid-template-columns: 1fr;
  }

  .expertise-hero img {
    aspect-ratio: 16 / 9;
  }

  .week-row {
    min-width: 960px;
  }

  .weekly-clinic {
    overflow-x: auto;
  }
}

@media (max-width: 820px) {
  body {
    background:
      linear-gradient(180deg, #fbfefd 0%, #f3f9f8 48%, #f8fbfb 100%),
      var(--soft);
    background-attachment: scroll;
  }

  .upgrade-topbar {
    position: static;
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 10px 14px 9px;
    border-bottom-color: rgba(0, 96, 106, 0.08);
    background: #fbfefd;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.88);
  }

  .upgrade-brand strong {
    color: #13232c;
  }

  .brand-tagline {
    color: color-mix(in srgb, var(--blue) 92%, var(--ink));
    text-shadow: none;
  }

  .upgrade-actions {
    position: relative;
    z-index: 2;
    justify-content: start;
    flex-wrap: nowrap;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    padding: 3px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: none;
    backdrop-filter: none;
    scrollbar-width: none;
  }

  .upgrade-actions::-webkit-scrollbar {
    display: none;
  }

  .background-picker,
  .theme-picker,
  .panel-bg-picker,
  .language-toggle {
    border-color: var(--line);
    color: var(--blue);
    background: #ffffff;
    box-shadow: none;
    font-weight: 880;
  }

  .background-picker select,
  .theme-picker select,
  .panel-bg-picker select {
    color: color-mix(in srgb, var(--ink) 82%, var(--blue));
    font-weight: 860;
  }

  .upgrade-shell {
    grid-template-columns: 1fr;
  }

  .upgrade-shell::before {
    display: none;
  }

  .upgrade-rail {
    position: static;
    height: auto;
    overflow: visible;
    padding: 10px 14px;
    border-right: 0;
    border-bottom: 1px solid rgba(0, 96, 106, 0.08);
    background: #fbfefd;
  }

  .mobile-menu-toggle {
    position: relative;
    z-index: 2;
    width: 100%;
    min-height: 44px;
    display: flex;
    gap: 8px;
    align-items: center;
    padding: 9px 12px;
    border: 1px solid color-mix(in srgb, var(--blue) 18%, rgba(255, 255, 255, 0.8));
    border-radius: 6px;
    color: color-mix(in srgb, var(--blue) 88%, var(--ink));
    background: #ffffff;
    box-shadow: 0 12px 28px rgba(20, 34, 45, 0.08);
    text-align: left;
    font-size: 15px;
    font-weight: 900;
    cursor: pointer;
  }

  .mobile-menu-toggle::before {
    content: attr(data-current-prefix);
    flex: 0 0 auto;
    color: color-mix(in srgb, var(--ink) 76%, var(--blue));
    font-size: 13px;
    font-weight: 840;
  }

  .mobile-menu-toggle span {
    min-width: 0;
    flex: 1 1 auto;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.2;
  }

  .mobile-menu-toggle i {
    flex: 0 0 auto;
    width: 9px;
    height: 9px;
    margin-left: 4px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
    transition: transform 180ms ease;
  }

  .upgrade-rail.is-mobile-open .mobile-menu-toggle i {
    transform: rotate(225deg) translate(-2px, -2px);
  }

  .profile-tree {
    max-height: 0;
    overflow: hidden;
    padding-right: 0;
    opacity: 0;
    visibility: hidden;
    transition: max-height 220ms ease, opacity 180ms ease, visibility 0s linear 220ms;
  }

  .upgrade-rail.is-mobile-open .profile-tree {
    max-height: 760px;
    margin-top: 10px;
    opacity: 1;
    visibility: visible;
    transition: max-height 220ms ease, opacity 180ms ease, visibility 0s;
  }

  .tree-children {
    visibility: hidden;
  }

  .tree-group.is-open .tree-children {
    max-height: 220px;
  }

  .upgrade-stage {
    padding: 16px;
    background: linear-gradient(180deg, #fbfefd 0%, #f6fbfa 100%);
  }

  .upgrade-stage::before,
  .upgrade-stage::after {
    display: none;
  }

  .profile-panel {
    min-height: 0;
    padding: 28px 18px;
    background: #ffffff;
    backdrop-filter: none;
  }

  .profile-panel::after {
    display: none;
  }

  .profile-panel[data-panel="overview"] {
    background: #ffffff;
  }

  .profile-panel h2 {
    font-size: clamp(38px, 12vw, 58px);
  }

  .profile-positioning {
    margin-bottom: 22px;
    font-size: clamp(20px, 6vw, 28px);
  }

  .overview-hero {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .overview-portrait {
    max-width: 340px;
  }

  .summary-fields {
    width: 100%;
    grid-template-columns: 1fr;
    margin-top: 24px;
  }

  .fact-rows div {
    grid-template-columns: 1fr;
    gap: 6px;
    min-height: 0;
    padding: 18px 0;
  }

  .summary-fields div {
    grid-template-columns: 82px minmax(0, 1fr);
    gap: 12px;
    min-height: 0;
    padding: 13px 0;
  }

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

  .research-stack article,
  .output-list article {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .summary-fields dt {
    font-size: 13px;
  }

  .summary-fields dd {
    font-size: 15px;
  }
}

@media (max-width: 520px) {
  .upgrade-brand {
    align-items: start;
    flex-direction: column;
    gap: 5px;
  }

  .brand-tagline {
    max-width: 100%;
    display: block;
    color: color-mix(in srgb, var(--blue) 86%, var(--ink));
    font-family: var(--body-font);
    font-size: 13px;
    line-height: 1.35;
    font-weight: 820;
    overflow-wrap: anywhere;
    white-space: normal;
  }

  .brand-tagline::before {
    display: none;
  }

  .upgrade-actions {
    flex-wrap: nowrap;
  }

  .background-picker,
  .panel-bg-picker,
  .theme-picker,
  .language-toggle {
    min-height: 32px;
  }

  .background-picker select {
    width: 76px;
  }

  .panel-bg-picker select {
    width: 76px;
  }

  .theme-picker select {
    width: 58px;
  }

  .language-toggle {
    min-width: 42px;
    padding: 0 9px;
  }

  .profile-panel:not([data-panel="overview"]) h2 {
    font-size: 25px;
  }

  .expertise-hero {
    margin-bottom: 22px;
  }

  .expertise-hero img {
    aspect-ratio: 16 / 9;
  }

  .expertise-heading {
    text-align: left;
  }

  .expertise-story {
    padding: 20px 0;
  }

  .case-feature {
    margin-bottom: 24px;
    padding: 20px 0;
    background: transparent;
  }

  .case-visual img {
    aspect-ratio: 4 / 3;
  }

  .case-copy h3 {
    font-size: 22px;
  }

  .overview-expertise-links button,
  .expertise-grid article,
  .pathway-list li {
    padding: 18px;
  }
}
