/* 主题变量统一由 ../shared/tokens.css 提供 */

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
}

html {
  background: var(--bg);
}

body {
  overflow-x: auto;
  color: var(--text);
  background: var(--bg);
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans SC", Arial, sans-serif;
  letter-spacing: 0;
}

button,
a {
  color: inherit;
  font: inherit;
}

button {
  cursor: pointer;
}

.stage {
  position: relative;
  width: 100%;
  max-width: 1680px;
  height: 945px;
  min-height: 945px;
  margin: 0 auto;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 39%, rgba(245, 154, 55, .18), transparent 34%),
    linear-gradient(180deg, rgba(6, 8, 9, .1), rgba(6, 8, 9, .44) 51%, rgba(5, 8, 8, .84) 100%),
    url("assets/replica-bg.webp") center / cover no-repeat;
}

.stage::before {
  position: absolute;
  inset: 0;
  z-index: 0;
  content: "";
  background:
    linear-gradient(90deg, rgba(3, 5, 5, .66), transparent 18%, transparent 76%, rgba(3, 5, 5, .68)),
    radial-gradient(circle at 49% 72%, rgba(245, 129, 31, .2), transparent 22%);
  pointer-events: none;
}

.stage::after {
  position: absolute;
  inset: 0;
  z-index: 0;
  content: "";
  background: rgba(0, 0, 0, .16);
  backdrop-filter: saturate(.9);
  pointer-events: none;
}

.nav-bar,
.dashboard {
  position: relative;
  z-index: 1;
}

.nav-bar {
  display: grid;
  grid-template-columns: 380px 1fr 250px;
  align-items: center;
  height: 80px;
  padding: 14px 96px 0 72px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.logo-mark {
  display: grid;
  width: 50px;
  height: 50px;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(255, 222, 150, .72);
  border-radius: 50%;
  background: rgba(255, 236, 184, .18);
  box-shadow: 0 0 24px rgba(248, 180, 72, .34);
}

.logo-mark img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.brand-name {
  color: #ffe0a2;
  font-size: 28px;
  font-weight: 700;
  line-height: 1;
}

.brand-divider {
  width: 1px;
  height: 21px;
  background: rgba(234, 205, 151, .5);
}

.brand-sub {
  color: rgba(238, 221, 190, .8);
  font-size: 14px;
}

.main-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 56px;
  white-space: nowrap;
}

.main-nav a {
  position: relative;
  padding: 11px 0 20px;
  color: rgba(236, 218, 188, .68);
  font-size: 17px;
  font-weight: 600;
  text-decoration: none;
}

.main-nav a.active {
  color: var(--gold-bright);
}

.main-nav a.active::before {
  position: absolute;
  left: 50%;
  bottom: 6px;
  width: 6px;
  height: 6px;
  content: "";
  border-radius: 50%;
  background: var(--gold-bright);
  box-shadow: 0 0 14px rgba(255, 216, 135, .95);
  transform: translateX(-50%);
}

.main-nav a.active::after {
  position: absolute;
  left: 50%;
  bottom: 8px;
  width: 44px;
  height: 2px;
  content: "";
  background: linear-gradient(90deg, transparent, rgba(255, 216, 135, .9), transparent);
  transform: translateX(-50%);
}

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

.search,
.login {
  border: 0;
  background: transparent;
}

.search {
  position: relative;
  width: 34px;
  height: 42px;
  padding: 0;
}

.search svg {
  display: none;
}

.search::before {
  position: absolute;
  top: 8px;
  left: 5px;
  width: 17px;
  height: 17px;
  content: "";
  border: 2px solid rgba(255, 246, 224, .92);
  border-radius: 50%;
}

.search::after {
  position: absolute;
  top: 25px;
  left: 22px;
  width: 13px;
  height: 2px;
  content: "";
  background: rgba(255, 246, 224, .92);
  border-radius: 99px;
  transform: rotate(45deg);
  transform-origin: left center;
}

.login {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 42px;
  padding: 0 23px;
  border: 1px solid rgba(220, 169, 91, .46);
  border-radius: 999px;
  color: #ffd98c;
  background: rgba(16, 14, 11, .34);
  font-weight: 700;
  text-decoration: none;
  box-shadow: inset 0 0 18px rgba(214, 153, 62, .08);
}

.dashboard {
  display: grid;
  grid-template-columns: 380px 600px 462px;
  grid-template-rows: 376px 244px;
  column-gap: 28px;
  row-gap: 24px;
  padding: 26px 110px 0 110px;
}

.intro {
  padding-top: 15px;
}

.intro h1 {
  margin: 0 0 14px;
  color: #fff0d2; /* 回退色 */
  font-family: var(--xh-font-kai);
  font-size: 58px;
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: 4px;
  background: linear-gradient(176deg, #fff6e0 0%, #ffe6b0 52%, var(--xh-gold) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 8px 26px rgba(0, 0, 0, .55)) drop-shadow(0 0 14px rgba(244, 200, 121, .2));
}

.lead {
  margin: 0 0 14px;
  color: #f2d6aa;
  font-size: 22px;
  line-height: 1.35;
}

.gold-line {
  display: block;
  width: 50px;
  height: 2px;
  margin: 0 0 17px;
  background: var(--xh-grad-rule);
  box-shadow: 0 0 12px rgba(244, 200, 121, 0.5);
}

.desc {
  margin: 0 0 35px;
  color: rgba(244, 230, 205, .78);
  font-size: 15px;
  line-height: 1.75;
}

.visibility .label {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 13px;
  color: #efd6a8;
  font-size: 16px;
  font-weight: 600;
}

.visibility .label span {
  display: inline-grid;
  width: 15px;
  height: 15px;
  place-items: center;
  border: 1px solid rgba(240, 215, 176, .4);
  border-radius: 50%;
  color: rgba(240, 215, 176, .65);
  font-size: 10px;
}

.segmented {
  display: inline-flex;
  width: 338px;
  height: 39px;
  padding: 3px;
  border: 1px solid rgba(210, 157, 83, .42);
  border-radius: 999px;
  background: rgba(15, 14, 11, .52);
}

.segmented button {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  color: rgba(237, 219, 189, .66);
  background: transparent;
  font-size: 13px;
  white-space: nowrap;
}

.segmented button.active {
  color: #fff1cf;
  background: linear-gradient(135deg, rgba(255, 216, 132, .3), rgba(177, 105, 31, .22));
  box-shadow: inset 0 0 0 1px rgba(255, 222, 143, .45), 0 0 22px rgba(226, 154, 56, .22);
}

.mini-globe,
.mini-dial,
.mini-lock {
  position: relative;
  width: 14px;
  height: 14px;
  border: 1px solid currentColor;
  border-radius: 50%;
}

.mini-lock {
  border-radius: 3px;
}

.mini-lock::before {
  position: absolute;
  left: 2px;
  top: -7px;
  width: 8px;
  height: 7px;
  content: "";
  border: 1px solid currentColor;
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
}

.visibility p {
  margin: 14px 0 0;
  color: rgba(235, 218, 188, .58);
  font-size: 13px;
  line-height: 1.7;
}

.card {
  position: relative;
  border: 1px solid var(--xh-border);
  border-radius: var(--xh-radius-md);
  background:
    linear-gradient(180deg, rgba(255, 232, 170, .05), transparent 42%),
    var(--xh-panel);
  box-shadow: var(--xh-shadow-lg), var(--xh-glass-sheen);
  backdrop-filter: blur(var(--xh-glass-blur));
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.card:hover {
  border-color: var(--xh-border-hot);
  box-shadow: var(--xh-shadow-lg), var(--xh-glow-gold);
  transform: translateY(-2px);
}

.id-area {
  padding-top: 1px;
}

.passport {
  width: 600px;
  height: 310px;
  padding: 28px 48px 26px;
  overflow: hidden;
  background:
    linear-gradient(100deg, rgba(255, 231, 166, .08), rgba(26, 23, 17, .74)),
    rgba(20, 19, 15, .7);
}

.passport::before {
  position: absolute;
  inset: 8px;
  content: "";
  border: 1px solid rgba(222, 168, 82, .42);
  border-radius: 6px;
  pointer-events: none;
}

.passport::after {
  position: absolute;
  inset: 0;
  content: "";
  background: url("assets/replica-bg.webp") center 65% / 1700px auto no-repeat;
  opacity: .14;
  pointer-events: none;
}

.corner {
  position: absolute;
  z-index: 2;
  width: 36px;
  height: 36px;
  opacity: .75;
}

.corner::before,
.corner::after {
  position: absolute;
  content: "";
  background: rgba(218, 156, 65, .65);
}

.corner::before {
  width: 26px;
  height: 1px;
}

.corner::after {
  width: 1px;
  height: 26px;
}

.corner-lt { left: 18px; top: 18px; }
.corner-rt { right: 18px; top: 18px; transform: scaleX(-1); }
.corner-lb { left: 18px; bottom: 18px; transform: scaleY(-1); }
.corner-rb { right: 18px; bottom: 18px; transform: scale(-1); }

.passport-top,
.passport-content {
  position: relative;
  z-index: 3;
}

.passport-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.passport-top h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  color: #f7d79e;
  font-size: 22px;
  font-weight: 500;
}

.shield {
  width: 17px;
  height: 19px;
  border: 1px solid var(--gold);
  clip-path: polygon(50% 0, 92% 18%, 82% 74%, 50% 100%, 18% 74%, 8% 18%);
  opacity: .9;
}

.passport-number {
  text-align: right;
}

.passport-number small {
  display: block;
  color: rgba(232, 211, 177, .42);
  font-size: 12px;
}

.passport-number strong {
  display: block;
  margin-top: 4px;
  color: #ffe0a8;
  font-size: 21px;
  letter-spacing: 1.5px;
}

.passport-content {
  display: grid;
  grid-template-columns: 151px 1fr;
  align-items: center;
  margin-top: 34px;
}

.avatar-wrap {
  position: relative;
  width: 126px;
  height: 126px;
}

.avatar {
  display: grid;
  width: 118px;
  height: 118px;
  place-items: center;
  border: 7px solid rgba(255, 234, 185, .22);
  border-radius: 50%;
  background: radial-gradient(circle, #fff0c5 0 37%, #eba73c 58%, #5d3416 100%);
  box-shadow: 0 0 24px rgba(247, 183, 76, .35);
}

.avatar svg {
  width: 86px;
  height: 86px;
}

.avatar circle {
  fill: rgba(255, 242, 204, .72);
  stroke: rgba(133, 82, 28, .45);
}

.avatar path {
  fill: #b8641d;
}

.medal {
  position: absolute;
  left: 48px;
  bottom: -4px;
  width: 30px;
  height: 30px;
  border: 4px solid rgba(255, 236, 196, .55);
  border-radius: 50%;
  background: linear-gradient(135deg, #dca449, #8a551d);
  box-shadow: 0 0 12px rgba(249, 195, 99, .3);
}

.person {
  min-width: 0;
}

.name-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 15px;
}

.name-row h3 {
  margin: 0;
  color: #ffe3ad;
  font-size: 26px;
  font-weight: 400;
}

.level,
.tags span {
  border: 1px solid rgba(221, 174, 99, .42);
  border-radius: 999px;
  background: rgba(220, 170, 88, .1);
  color: rgba(248, 226, 185, .78);
}

.level {
  padding: 4px 11px;
  font-size: 12px;
}

.tags {
  display: flex;
  gap: 10px;
  margin-bottom: 19px;
}

.tags span {
  padding: 6px 13px;
  font-size: 13px;
}

.quote {
  position: relative;
  margin: 0 0 17px;
  padding: 0 32px;
  color: rgba(241, 219, 180, .78);
  font-size: 14px;
  line-height: 1.5;
}

.quote::before,
.quote::after {
  position: absolute;
  top: -2px;
  color: #d6a862;
  font-size: 28px;
  line-height: 1;
}

.quote::before {
  left: 3px;
  content: "“";
}

.quote::after {
  right: 11px;
  content: "”";
}

.site small {
  display: block;
  margin-bottom: 4px;
  color: rgba(235, 217, 184, .44);
  font-size: 12px;
}

.site a {
  color: #f4d49a;
  font-size: 14px;
  text-decoration: none;
}

.external {
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-left: 8px;
  border-top: 1px solid var(--gold);
  border-right: 1px solid var(--gold);
  transform: translateY(-1px);
}

.main-actions {
  display: grid;
  grid-template-columns: 250px 220px;
  justify-content: center;
  gap: 20px;
  margin-top: 18px;
}

.main-actions button,
.main-actions a,
.finish-actions button,
.finish-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 50px;
  border-radius: 14px;
  font-size: 18px;
  text-decoration: none;
}

.enter {
  border: 1px solid rgba(255, 223, 151, .7);
  color: #fff0cf;
  background: linear-gradient(135deg, #f3c36f, #b96f22);
  box-shadow: 0 0 34px rgba(230, 146, 43, .42), inset 0 1px 0 rgba(255, 255, 255, .18);
}

.enter span {
  margin-left: 10px;
}

.update {
  border: 1px solid rgba(219, 168, 90, .55);
  color: #f3d49a;
  background: rgba(19, 17, 14, .5);
}

.update span {
  margin-left: 9px;
  font-size: 15px;
}

.side {
  display: grid;
  gap: 14px;
}

.status-card {
  height: 224px;
  padding: 17px 23px 0;
}

.todo-card {
  height: 152px;
  padding: 15px 22px 0;
}

.status-card header,
.todo-card header,
.todo-card header div {
  display: flex;
  align-items: center;
}

.status-card header,
.todo-card header {
  height: 31px;
}

.status-card h2,
.todo-card h2 {
  margin: 0;
  color: #f0d29b;
  font-size: 17px;
  font-weight: 600;
}

.icon {
  display: inline-block;
  width: 18px;
  height: 18px;
  margin-right: 10px;
  border: 1px solid var(--gold);
  border-radius: 4px;
}

.clock {
  border-radius: 50%;
}

.todo-card header {
  justify-content: space-between;
  border-bottom: 1px solid rgba(205, 157, 83, .18);
}

.todo-card header a {
  color: rgba(238, 217, 185, .52);
  font-size: 12px;
  text-decoration: none;
}

.complete {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 20px;
  align-items: center;
  height: 136px;
}

.ring {
  position: relative;
  display: grid;
  width: 116px;
  height: 116px;
  margin: 8px 0 0 18px;
  place-content: center;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, rgba(24, 22, 18, .92) 0 54%, transparent 55%),
    conic-gradient(var(--gold-soft) 0 245deg, rgba(255, 223, 160, .13) 245deg 360deg);
  box-shadow: 0 0 20px rgba(232, 174, 80, .24);
}

.ring::after {
  position: absolute;
  inset: 11px;
  content: "";
  border: 1px solid rgba(255, 230, 176, .14);
  border-radius: 50%;
}

.pct {
  display: block;
  color: #ffe3ad;
  font-size: 34px;
  line-height: 1;
  text-align: center;
}

.done {
  display: block;
  margin-top: 8px;
  color: rgba(238, 217, 185, .65);
  font-size: 12px;
  text-align: center;
}

.status-card ul,
.todo-card ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.status-card li {
  display: grid;
  grid-template-columns: 16px 1fr auto;
  align-items: center;
  gap: 7px;
  margin: 10px 0;
  color: rgba(241, 224, 193, .72);
  font-size: 14px;
}

.status-card li strong {
  color: var(--xh-warn);
  font-weight: 600;
}

.status-card li strong.ok-text {
  color: var(--xh-success);
}

.dot {
  width: 8px;
  height: 8px;
  border: 1px solid currentColor;
  border-radius: 50%;
}

.dot.pending {
  color: var(--xh-warn);
}

.dot.ok {
  color: var(--xh-success);
  background: var(--xh-success);
}

.status-card > p {
  margin: 0;
  color: rgba(234, 215, 181, .48);
  font-size: 12px;
}

.todo-card li {
  display: grid;
  grid-template-columns: 22px 1fr 48px 70px;
  align-items: center;
  gap: 10px;
  height: 31px;
  color: rgba(242, 225, 194, .74);
  font-size: 14px;
}

.round-icon {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ffd990, #c47b27);
}

.todo-card b {
  font-weight: 500;
}

.todo-card em {
  color: rgba(245, 228, 198, .72);
  font-style: normal;
  text-align: right;
}

.todo-card strong {
  padding: 4px 12px;
  border: 1px solid rgba(211, 148, 58, .34);
  border-radius: 999px;
  color: #e5a13e;
  background: rgba(202, 123, 38, .12);
  font-size: 12px;
  font-weight: 500;
  text-align: center;
}

.todo-card strong.warn {
  color: var(--xh-warn);
}

.overview {
  display: grid;
  grid-column: 1 / 4;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
}

.info-card {
  height: 244px;
  padding: 18px 22px;
}

.info-card h3 {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 30px;
  margin: 0 0 8px;
  color: #efd19a;
  font-size: 18px;
  font-weight: 600;
}

.person-icon,
.trophy-icon,
.case-icon,
.spark-icon {
  position: relative;
  display: inline-block;
  width: 22px;
  height: 22px;
  color: var(--gold-soft);
}

.person-icon::before {
  position: absolute;
  left: 7px;
  top: 2px;
  width: 8px;
  height: 8px;
  content: "";
  border-radius: 50%;
  background: currentColor;
}

.person-icon::after {
  position: absolute;
  left: 3px;
  bottom: 2px;
  width: 16px;
  height: 9px;
  content: "";
  border-radius: 9px 9px 2px 2px;
  background: currentColor;
}

.trophy-icon::before,
.case-icon::before,
.spark-icon::before {
  position: absolute;
  inset: 3px;
  content: "";
  border: 2px solid currentColor;
  border-radius: 4px;
}

.spark-icon::before {
  transform: rotate(45deg);
}

.info-card dl {
  margin: 0;
  padding: 6px 0 0;
  border-top: 1px solid rgba(217, 166, 91, .18);
}

.info-card dl div {
  display: flex;
  justify-content: space-between;
  margin: 7px 0;
  color: rgba(241, 225, 196, .72);
  font-size: 14px;
  line-height: 1.25;
}

.info-card dt {
  color: rgba(241, 225, 196, .72);
}

.info-card dd {
  margin: 0;
  color: rgba(245, 231, 205, .78);
}

.info-card dd.highlight {
  color: var(--xh-warn);
}

.info-card > a {
  position: absolute;
  left: 22px;
  bottom: 16px;
  color: #d9a85f;
  font-size: 14px;
  text-decoration: none;
}

.flow {
  display: grid;
  grid-column: 1 / 4;
  grid-template-columns: 250px 1fr 250px 1fr 250px 1fr 250px;
  align-items: center;
  height: 114px;
  padding: 0 63px;
  background:
    linear-gradient(100deg, rgba(113, 75, 26, .22), rgba(25, 23, 17, .72) 34%, rgba(92, 62, 25, .22)),
    rgba(18, 17, 14, .68);
}

.flow-item {
  display: grid;
  grid-template-columns: 70px 1fr;
  align-items: center;
  gap: 14px;
}

.big-icon {
  position: relative;
  display: grid;
  width: 62px;
  height: 62px;
  place-items: center;
  border: 1px solid rgba(214, 164, 87, .48);
  border-radius: 50%;
  background: rgba(209, 145, 52, .08);
  box-shadow: inset 0 0 0 5px rgba(215, 169, 95, .05), 0 0 24px rgba(215, 169, 95, .12);
}

.big-icon::before {
  content: "";
  width: 24px;
  height: 24px;
  border: 2px solid #d8ad67;
  border-radius: 5px;
}

.big-icon.user::before {
  width: 26px;
  height: 24px;
  border: 0;
  border-top: 2px solid #d8ad67;
  border-radius: 50%;
  box-shadow: 0 -13px 0 -7px transparent;
}

.flow-item h4 {
  margin: 0 0 6px;
  color: #f3d79f;
  font-size: 19px;
  font-weight: 500;
}

.flow-item p {
  margin: 0;
  color: rgba(235, 215, 182, .45);
  font-size: 12px;
}

.arrow {
  position: relative;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(229, 185, 112, .75));
}

.arrow::after {
  position: absolute;
  right: -1px;
  top: -5px;
  width: 10px;
  height: 10px;
  content: "";
  border-top: 2px solid rgba(229, 185, 112, .75);
  border-right: 2px solid rgba(229, 185, 112, .75);
  transform: rotate(45deg);
}

@media (max-width: 1200px) {
  .stage {
    transform-origin: top left;
  }
}

@media (min-width: 901px) and (max-width: 1679px) {
  .nav-bar {
    grid-template-columns: 330px 1fr 220px;
    padding: 14px 48px 0;
  }

  .main-nav {
    gap: 34px;
  }

  .dashboard {
    grid-template-columns: minmax(300px, .78fr) minmax(460px, 1.22fr) minmax(350px, .92fr);
    column-gap: 20px;
    padding: 26px 48px 0;
  }

  .intro h1 {
    font-size: 52px;
  }

  .passport {
    width: 100%;
    padding-inline: 34px;
  }

  .passport-content {
    grid-template-columns: 132px 1fr;
  }

  .tags {
    flex-wrap: wrap;
    gap: 8px;
  }

  .overview {
    gap: 20px;
  }

  .flow {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    padding: 0 32px;
  }

  .flow > .arrow {
    display: none;
  }
}

.edit-stage {
  width: 100%;
  min-width: 1180px;
  height: auto;
  min-height: 100vh;
  overflow: visible;
  background:
    radial-gradient(circle at 58% 18%, rgba(245, 154, 55, .18), transparent 32%),
    linear-gradient(180deg, rgba(6, 8, 9, .12), rgba(6, 8, 9, .58) 45%, rgba(5, 8, 8, .94) 100%),
    url("assets/replica-bg.webp") center top / cover no-repeat;
}

.edit-page {
  position: relative;
  z-index: 1;
  max-width: 1460px;
  margin: 0 auto;
  padding: 34px 48px 72px;
}

.edit-hero {
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 28px;
  align-items: end;
  margin-bottom: 28px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--gold-bright);
  font-size: 14px;
  letter-spacing: 2px;
}

.edit-hero h1 {
  margin: 0 0 12px;
  color: #fff0d2;
  font-family: "STKaiti", "KaiTi", "Songti SC", serif;
  font-size: 50px;
  font-weight: 400;
  letter-spacing: 3px;
}

.edit-hero p {
  max-width: 760px;
  margin: 0;
  color: rgba(244, 230, 205, .74);
  font-size: 15px;
  line-height: 1.8;
}

.edit-progress {
  min-height: 126px;
  padding: 20px;
}

.edit-progress span,
.edit-progress small {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.edit-progress strong {
  display: block;
  margin: 8px 0;
  color: #ffe2a7;
  font-size: 42px;
  line-height: 1;
}

.edit-shell {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr) 430px;
  gap: 22px;
  align-items: start;
}

.edit-rail,
.preview-column {
  position: sticky;
  top: 24px;
}

.edit-rail {
  display: grid;
  gap: 6px;
  padding: 14px;
}

.edit-rail a {
  min-height: 44px;
  padding: 12px 14px;
  border-radius: 8px;
  color: rgba(238, 219, 188, .64);
  text-decoration: none;
}

.edit-rail a.active,
.edit-rail a:hover {
  color: #fff0cf;
  background: rgba(222, 164, 78, .16);
  box-shadow: inset 0 0 0 1px rgba(230, 178, 98, .32);
}

.edit-form {
  display: grid;
  gap: 18px;
}

.form-card {
  padding: 24px;
}

.form-card header {
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 14px;
  align-items: start;
  margin-bottom: 20px;
}

.section-index {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid rgba(231, 178, 98, .45);
  border-radius: 50%;
  color: #ffd887;
  background: rgba(216, 153, 62, .1);
}

.form-card h2,
.preview-notes h2 {
  margin: 0 0 6px;
  color: #f2d29a;
  font-size: 21px;
  font-weight: 600;
}

.form-card p {
  margin: 0;
  color: rgba(235, 215, 182, .54);
  font-size: 13px;
  line-height: 1.65;
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.field {
  display: grid;
  gap: 8px;
}

.field.wide {
  grid-column: 1 / -1;
}

.field span {
  color: #edd2a0;
  font-size: 14px;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 46px;
  border: 1px solid rgba(220, 169, 91, .34);
  border-radius: 8px;
  color: #f9e6c3;
  background: rgba(10, 10, 8, .44);
  outline: 0;
  padding: 0 14px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04);
}

.field textarea {
  padding: 13px 14px;
  resize: vertical;
  line-height: 1.7;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: rgba(255, 216, 135, .82);
  box-shadow: 0 0 0 3px rgba(228, 160, 65, .14);
}

.field input[readonly] {
  color: rgba(245, 231, 205, .52);
}

.setting-list,
.work-list,
.timeline {
  display: grid;
  gap: 12px;
}

.setting-row {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 12px;
  align-items: start;
  min-height: 62px;
  padding: 14px;
  border: 1px solid rgba(220, 169, 91, .2);
  border-radius: 8px;
  background: rgba(10, 10, 8, .24);
}

.setting-row input {
  margin-top: 4px;
  accent-color: #d7a95f;
}

.setting-row b,
.work-row b,
.timeline b {
  display: block;
  color: #f5d8a3;
  font-weight: 600;
}

.setting-row small,
.work-row span,
.timeline p {
  display: block;
  margin-top: 4px;
  color: rgba(235, 215, 182, .56);
  font-size: 13px;
  line-height: 1.55;
}

.tag-editor {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.tag-editor span,
.tag-editor button {
  min-height: 36px;
  padding: 8px 13px;
  border: 1px solid rgba(221, 174, 99, .42);
  border-radius: 999px;
  color: rgba(248, 226, 185, .82);
  background: rgba(220, 170, 88, .1);
}

.tag-editor button {
  color: #ffd887;
  background: rgba(12, 12, 10, .42);
}

.work-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 74px;
  padding: 15px 16px;
  border: 1px solid rgba(220, 169, 91, .2);
  border-radius: 8px;
  background: rgba(10, 10, 8, .24);
}

.work-row a {
  flex: 0 0 auto;
  color: #d9a85f;
  font-size: 13px;
  text-decoration: none;
}

.ghost-action {
  min-height: 44px;
  border: 1px dashed rgba(220, 169, 91, .44);
  border-radius: 8px;
  color: #f1d29a;
  background: rgba(12, 12, 10, .28);
}

.timeline article {
  position: relative;
  padding: 14px 16px 14px 24px;
  border-left: 1px solid rgba(220, 169, 91, .44);
  background: linear-gradient(90deg, rgba(220, 169, 91, .08), transparent);
}

.timeline article::before {
  position: absolute;
  left: -5px;
  top: 20px;
  width: 9px;
  height: 9px;
  content: "";
  border-radius: 50%;
  background: #d7a95f;
  box-shadow: 0 0 14px rgba(255, 216, 135, .68);
}

.timeline span {
  display: block;
  margin-bottom: 5px;
  color: rgba(235, 215, 182, .48);
  font-size: 12px;
}

.finish-actions {
  display: flex;
  gap: 14px;
}

.finish-actions .enter,
.finish-actions .update {
  min-width: 170px;
}

.preview-column {
  display: grid;
  gap: 18px;
}

.preview-passport {
  width: 430px;
  height: auto;
  min-height: 314px;
  padding: 24px 28px;
}

.preview-passport .passport-content {
  grid-template-columns: 118px 1fr;
}

.preview-passport .avatar,
.preview-passport .avatar img {
  width: 96px;
  height: 96px;
}

.preview-passport .avatar img {
  display: block;
  border-radius: 50%;
  object-fit: cover;
}

.preview-passport .avatar-wrap {
  width: 106px;
  height: 106px;
}

.preview-passport .medal {
  left: 38px;
}

.preview-passport .name-row {
  align-items: flex-start;
  flex-direction: column;
  gap: 8px;
}

.preview-passport .name-row h3 {
  font-size: 24px;
}

.preview-passport .tags {
  flex-wrap: wrap;
  gap: 8px;
}

.preview-passport .tags span {
  padding: 5px 9px;
  font-size: 12px;
}

.preview-notes {
  padding: 20px;
}

.preview-notes ul {
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.preview-notes li {
  padding: 10px 0;
  border-top: 1px solid rgba(217, 166, 91, .16);
  color: rgba(239, 222, 191, .68);
  font-size: 13px;
  line-height: 1.6;
}

.toast {
  position: fixed;
  right: 28px;
  bottom: 28px;
  z-index: 10;
  padding: 13px 18px;
  border: 1px solid rgba(255, 216, 135, .56);
  border-radius: 999px;
  color: #fff0cf;
  background: rgba(18, 16, 12, .9);
  box-shadow: 0 18px 46px rgba(0, 0, 0, .45);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 900px) {
  body {
    overflow-x: hidden;
  }

  .stage,
  .edit-stage {
    width: 100%;
    min-width: 0;
    height: auto;
    min-height: 100vh;
  }

  .nav-bar {
    grid-template-columns: 1fr auto;
    height: auto;
    padding: 14px 18px;
    gap: 12px;
  }

  .brand-sub,
  .main-nav,
  .search {
    display: none;
  }

  .brand-name {
    font-size: 23px;
  }

  .login {
    min-height: 44px;
    padding: 0 16px;
    text-decoration: none;
  }

  .edit-page {
    padding: 22px 16px 44px;
  }

  .dashboard {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    gap: 18px;
    padding: 18px 16px 42px;
  }

  .intro h1 {
    font-size: 42px;
  }

  .lead {
    font-size: 18px;
  }

  .segmented {
    display: grid;
    width: 100%;
    height: auto;
    grid-template-columns: 1fr;
    gap: 4px;
    border-radius: 16px;
  }

  .segmented button {
    min-height: 40px;
  }

  .id-area,
  .side,
  .overview,
  .flow {
    grid-column: auto;
  }

  .passport {
    width: 100%;
    height: auto;
    min-height: 310px;
    padding: 24px 22px;
  }

  .passport-top {
    align-items: center;
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }

  .passport-number {
    text-align: center;
  }

  .passport-content {
    grid-template-columns: 1fr;
    gap: 16px;
    justify-items: center;
    text-align: center;
  }

  .name-row,
  .tags {
    justify-content: center;
    flex-wrap: wrap;
  }

  .main-actions {
    grid-template-columns: 1fr;
  }

  .status-card,
  .todo-card,
  .info-card,
  .flow {
    height: auto;
  }

  .complete,
  .overview,
  .flow {
    grid-template-columns: 1fr;
  }

  .flow {
    gap: 16px;
    padding: 18px;
  }

  .arrow {
    display: none;
  }

  .edit-hero,
  .edit-shell,
  .field-grid {
    grid-template-columns: 1fr;
  }

  .edit-hero h1 {
    font-size: 36px;
  }

  .edit-rail,
  .preview-column {
    position: static;
  }

  .edit-rail {
    grid-template-columns: repeat(3, 1fr);
  }

  .edit-rail a {
    text-align: center;
    font-size: 13px;
  }

  .preview-passport {
    width: 100%;
  }

  .preview-passport .passport-content {
    grid-template-columns: 1fr;
    gap: 16px;
    justify-items: center;
    text-align: center;
  }

  .preview-passport .name-row,
  .preview-passport .tags {
    justify-content: center;
    align-items: center;
  }

  .work-row,
  .finish-actions {
    align-items: stretch;
    flex-direction: column;
  }
}

/* ============================================================
   V1 渲染卡面嵌入（真实数据版村民证）
   ============================================================ */

/* 原卡片按 310px 高的 DOM 卡设计；V1 渲染图为 4:3，放开高度自适应 */
.dashboard {
  grid-template-rows: auto auto;
}

.passport {
  height: auto;
  padding: 26px 32px 28px;
}

.card-img-wrap {
  position: relative;
  z-index: 3;
}

.passport {
  padding: 22px;
}

.card-img-loading {
  padding: 90px 0;
  margin: 0;
  color: rgba(232, 211, 177, .5);
  font-size: 14px;
  text-align: center;
  letter-spacing: 2px;
}

.card-img-wrap img {
  display: block;
  width: 100%;
  height: auto;
  /* 卡面自带金色描边，这里不再加边框，避免双重框 */
  border-radius: 10px;
  box-shadow: 0 18px 44px rgba(0, 0, 0, .55);
}

.main-actions button.enter {
  font: inherit;
  cursor: pointer;
}

.main-actions button.enter:disabled {
  opacity: .55;
  cursor: wait;
}

/* 右列两张卡原按 376px 行高写死；行变高后改为顶部紧凑堆叠，
   高度各自内容自适应，不再被拉开或拉空 */
.side {
  grid-template-rows: none;
  align-content: start;
}

.todo-card {
  height: auto;
  padding-bottom: 16px;
}

.status-card {
  height: auto;
  padding-bottom: 14px;
}

/* 概览卡自适应高度（「我的资料」现在有 5 行真实字段） */
.info-card {
  height: auto;
  min-height: 244px;
  padding-bottom: 20px;
}

/* ============================================================
   编辑页滚动性能：卡片背景本身接近实色，去掉逐帧重算的
   backdrop-filter（模糊/饱和度），消除滚动卡顿
   ============================================================ */
.edit-stage .card {
  backdrop-filter: none;
}

.edit-stage::after {
  backdrop-filter: none;
}

/* ============================================================
   档案编辑：经历编辑器 / 只读列表 / 保存提示
   ============================================================ */
.exp-list {
  display: grid;
  gap: 14px;
  margin-bottom: 14px;
}

.exp-row {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--xh-border);
  border-radius: 12px;
  background: rgba(255, 255, 255, .02);
}

.exp-row-top {
  display: grid;
  grid-template-columns: 130px 1fr 150px 34px;
  gap: 10px;
  align-items: center;
}

.exp-row select,
.exp-row input,
.exp-row textarea {
  min-height: 40px;
  padding: 8px 12px;
  color: var(--xh-text);
  font: inherit;
  font-size: 14px;
  background: rgba(10, 10, 8, .5);
  border: 1px solid var(--xh-border);
  border-radius: 9px;
}

.exp-row textarea {
  resize: vertical;
}

.exp-row select:focus,
.exp-row input:focus,
.exp-row textarea:focus {
  border-color: var(--xh-border-hot);
  outline: none;
}

.exp-del {
  width: 34px;
  height: 34px;
  padding: 0;
  color: rgba(247, 229, 195, .55);
  font-size: 18px;
  line-height: 1;
  background: rgba(255, 255, 255, .03);
  border: 1px solid var(--xh-border);
  border-radius: 9px;
}

.exp-del:hover {
  color: #ff8a3d;
  border-color: rgba(255, 138, 61, .5);
}

.readonly-list {
  display: grid;
  gap: 10px;
}

.readonly-empty {
  margin: 0;
  padding: 18px 0;
  color: var(--xh-faint);
  font-size: 13px;
  text-align: center;
}

.save-hint {
  margin: 12px 0 0;
  font-size: 13px;
  color: var(--xh-faint);
}

.save-hint.error {
  color: #ff8a3d;
}

.finish-card .finish-actions {
  margin-top: 0;
}
