:root {
  --ink: #2c2640;
  --muted: #8b8496;
  --faint: #b0aab8;
  --accent: #9a1860;
  --pill: #f8e7f2;
  --van-primary-color: #9a1860;
  --van-background: transparent;
  --van-background-2: #ffffff;
  --van-button-primary-background: #9a1860;
  --van-button-primary-border-color: #9a1860;
  --van-radio-checked-icon-color: #9a1860;
  --van-dialog-confirm-button-text-color: #9a1860;
  --van-picker-confirm-action-color: #9a1860;
  --van-cell-group-title-color: var(--ink);
  --van-cell-group-inset-padding: 0;
  --van-cell-group-inset-radius: 16px;
  --van-cell-group-title-padding: 4px 4px 8px;
  --van-cell-group-title-font-size: 16px;
  --van-cell-group-title-line-height: 22px;
}

[v-cloak] { display: none !important; }

.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

html, body {
  margin: 0;
  min-height: 100%;
  background: linear-gradient(180deg, #fff 0%, #fbf8fb 46%, #f7f2f6 100%);
  color: var(--ink);
  font-family: "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.bg-art {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 0;
  height: 200px;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 28%);
  mask-image: linear-gradient(to bottom, transparent, #000 28%);
}

.bg-art svg {
  display: block;
  width: 100%;
  height: 100%;
}

#app { position: relative; z-index: 1; min-height: 100vh; }

.app-header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: calc(78px + env(safe-area-inset-top));
  padding-top: env(safe-area-inset-top);
  color: #fff;
  overflow: hidden;
}

.header-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.app-header h1 {
  position: relative;
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.header-back,
.header-mark {
  position: absolute;
  z-index: 1;
  top: calc(env(safe-area-inset-top) + 50%);
  transform: translateY(-50%);
}

.header-back {
  left: 6px;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #fff;
}

.header-back svg { width: 22px; height: 22px; }

.header-mark {
  right: 14px;
  width: 34px;
  height: 34px;
  color: rgba(255, 236, 246, 0.92);
}

.page,
.page .van-form,
.result {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.page { padding: 14px 16px 28px; }

.page-dock { padding-bottom: calc(108px + env(safe-area-inset-bottom)); }

.page .van-cell-group--inset,
.hero,
.submit,
.update-box,
.formula,
.copy-row,
.result {
  margin: 0;
}

.page .van-cell-group {
  overflow: hidden;
  border-radius: 16px;
  box-shadow: 0 8px 22px rgba(140, 50, 100, 0.06);
}

.van-cell::after { border-color: #f3e7ee; }

.hint,
.formula,
.muted,
.kicker,
.stage-label {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.hint { padding: 0 4px; }

.submit {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.van-button--primary {
  background: linear-gradient(180deg, #b02a78, #8e145c);
  border: 0;
  box-shadow: 0 8px 18px rgba(144, 20, 80, 0.18);
}

.van-button--primary.van-button--plain {
  background: #fff;
  border: 1px solid #e7c3d6;
  box-shadow: none;
  color: var(--accent);
}

.record-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.accent-card {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(140, 50, 100, 0.06);
}

.accent-card::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 5px;
  background: linear-gradient(180deg, #d14a8c 0%, #f0b6d4 100%);
}

.record-card {
  display: block;
  width: 100%;
  padding: 14px 14px 13px 18px;
  border: 0;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.record-card:active { background: #fdf9fb; }

.card-top {
  display: flex;
  align-items: center;
  gap: 10px;
}

.avatar {
  display: grid;
  flex: none;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #efeaf3;
  color: #746d86;
}

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

.card-name {
  flex: 1;
  min-width: 0;
  color: var(--ink);
  font-size: 16px;
  font-weight: 650;
}

.card-id {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
  gap: 1px;
}

.stage-pill {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 1px;
  padding: 3px 7px 3px 10px;
  border-radius: 999px;
  background: var(--pill);
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  line-height: 18px;
}

.stage-pill svg { width: 12px; height: 12px; }

.card-meta {
  display: grid;
  grid-template-columns: 32px 1fr;
  align-items: start;
  gap: 10px;
  margin-top: 10px;
}

.flask {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 19px;
  color: #c4a8c4;
}

.flask svg { width: 16px; height: 16px; }

.cr-line,
.cuts {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.egfr-line {
  margin-top: 2px;
  color: #6e687c;
  font-size: 15px;
  line-height: 1.35;
}

.egfr-line b {
  color: var(--accent);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.cuts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-top: 3px;
  color: var(--faint);
  font-size: 12px;
}

.hero { padding: 16px 16px 16px 20px; }

.kicker { margin-top: 14px; }

.range-num {
  margin: 2px 0 4px;
  color: var(--accent);
  font-size: 32px;
  font-weight: 760;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.result .van-cell-group__title {
  padding: 4px 4px 8px;
  color: var(--ink);
  font-size: 16px;
  font-weight: 700;
  line-height: 22px;
}

.formula,
.copy-row { padding: 0 4px; }

.dock {
  position: fixed;
  right: 14px;
  bottom: calc(10px + env(safe-area-inset-bottom));
  left: 14px;
  z-index: 20;
  display: flex;
  height: 68px;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(120, 40, 80, 0.12);
}

.dock button {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #8d8796;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.dock button svg { width: 24px; height: 24px; }

.dock button i {
  width: 18px;
  height: 3px;
  margin-top: 3px;
  border-radius: 2px;
  background: transparent;
}

.dock button.on { color: var(--accent); font-weight: 650; }

.dock button.on i { background: currentColor; }

.van-empty { padding-top: 48px; }

.empty-add {
  height: 46px;
  padding: 0 28px;
  font-size: 16px;
}

.add-hint {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin: 0;
  padding: 0 4px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.add-hint-mark {
  flex: none;
  width: 16px;
  height: 16px;
  margin-top: 1px;
  color: #b0a8b6;
}

.add-card {
  overflow: hidden;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(140, 50, 100, 0.06);
}

.add-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 60px;
  margin: 0;
  padding: 8px 14px;
  box-sizing: border-box;
}

.add-row + .add-row { border-top: 1px solid #f3e7ee; }

.add-row-btn {
  width: 100%;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.add-badge {
  display: grid;
  flex: none;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--pill);
  color: var(--accent);
}

.add-badge svg { width: 18px; height: 18px; }

.add-label {
  flex: none;
  width: 3.2em;
  color: var(--ink);
  font-size: 15px;
}

.add-choices {
  display: flex;
  flex: 1;
  flex-wrap: wrap;
  gap: 8px 14px;
  min-width: 0;
}

.add-form .van-radio--horizontal { margin-right: 0; }

.add-form .van-radio__icon { font-size: 20px; }

.add-form .van-radio__label {
  margin-left: 6px;
  color: var(--ink);
  line-height: 22px;
}

.add-input,
.add-value {
  flex: 1;
  min-width: 0;
  color: var(--ink);
  font-size: 15px;
  line-height: 22px;
}

.add-input {
  width: 100%;
  padding: 0;
  border: 0;
  outline: none;
  background: transparent;
  font-family: inherit;
}

.add-input::placeholder { color: #c8c4ce; }

.add-arrow {
  flex: none;
  width: 16px;
  height: 16px;
  margin-left: 8px;
  color: #c8c4ce;
}

.add-save { height: 48px; font-size: 16px; }

.query-form .van-cell,
.query-form .van-field__label,
.query-form .van-field__control {
  font-size: 15px;
}

.query-form .van-radio__label { font-size: 16px; }

.query-form .van-button {
  height: 48px;
  font-size: 16px;
}

.add-save .van-button__text {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.add-save-icon { width: 18px; height: 18px; }

.avatar svg,
.flask svg,
.stage-pill svg,
.header-back svg,
.header-mark,
.dock button svg,
.add-badge svg,
.add-hint-mark,
.add-save-icon,
.add-arrow {
  fill: none;
  stroke: currentColor;
}
