:root {
  /* 高级深紫 + 香槟金配色 */
  --bg: #efeaf1;
  --bg-deep: #241d31;
  --purple: #2a2036;
  --purple-2: #3a2f4f;
  --gold: #b8892f;
  --gold-2: #d9ae55;
  --gold-soft: #f4ead2;
  --card: #fffdf8;
  --ink: #2a2532;
  --ink-2: #6f6879;
  --ink-3: #a49db0;
  --accent: #a97c1e;
  --accent-soft: #f6edd6;
  --line: #ece4d2;
  --radius: 18px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
img { max-width: 100%; height: auto; }
[hidden] { display: none !important; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", Arial, sans-serif;
}

body {
  padding-bottom: env(safe-area-inset-bottom);
  background-image: radial-gradient(circle at 12% 0%, rgba(185,137,47,.06) 0 1px, transparent 1px);
  background-size: 28px 28px;
}

.app {
  max-width: 640px; margin: 0 auto; min-height: 100vh;
  box-shadow: 0 0 60px rgba(42,32,54,.12);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: linear-gradient(135deg, #2a2036, #3a2f4f);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(217,174,85,.3);
}
.topbar::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(217,174,85,.6), transparent);
}

.brand { display: flex; align-items: center; gap: 9px; font-weight: 700; font-size: 17px; color: #fff; letter-spacing: .5px; }
.brand-mark {
  width: 30px; height: 30px; border-radius: 9px;
  background: linear-gradient(145deg, var(--gold-2), var(--gold)); color: var(--purple);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 800;
  box-shadow: 0 3px 10px rgba(0,0,0,.25);
}

.avatar-btn {
  width: 40px; height: 40px; border-radius: 50%;
  border: 2px solid var(--gold-2); background: var(--purple-2);
  box-shadow: 0 2px 10px rgba(0,0,0,.25);
  padding: 0; overflow: hidden; cursor: pointer;
}
.avatar-text { color: var(--gold-2); font-size: 14px; font-weight: 600; }
.avatar-img { width: 100%; height: 100%; object-fit: cover; display: block; }

.main { padding: 18px 16px 100px; }
.view { display: none; }
.view.active { display: block; animation: fade .18s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

.hero { padding: 6px 4px 18px; }
.hero h1 { margin: 0; font-size: 26px; letter-spacing: 1px; font-weight: 800; color: var(--purple); }
.hero p { margin: 6px 0 0; color: var(--ink-3); font-size: 13px; }
.hero-text { min-width: 0; }
.hero-weather-line { display: flex; align-items: baseline; gap: 8px; margin-top: 6px; flex-wrap: wrap; }
.hero-place { font-size: 13px; color: var(--ink-2); font-weight: 600; }
.hero-temp { font-size: 26px; font-weight: 800; color: var(--gold); line-height: 1; }
.hero-desc { font-size: 12px; color: var(--ink-3); }

/* 搭配页顶部金色渐变背景条 */
.hero-with-avatar {
  position: relative; margin: -18px -16px 16px; padding: 20px 20px 18px;
  background: linear-gradient(135deg, #2a2036, #3a2f4f 70%, #46385f);
  border-radius: 0 0 22px 22px;
  box-shadow: 0 8px 24px rgba(42,32,54,.28);
}
.hero-with-avatar::after {
  content: ''; position: absolute; left: 20px; right: 20px; bottom: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(217,174,85,.7), transparent);
}
.hero-with-avatar h1 { color: #fff; }
.hero-with-avatar .hero-place { color: rgba(255,255,255,.8); }
.hero-with-avatar .hero-temp { color: var(--gold-2); }
.hero-with-avatar .hero-desc { color: rgba(255,255,255,.55); }

.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: 0 6px 20px rgba(42,32,54,.09);
}

.preview-card { padding: 10px; }
.preview-canvas {
  width: 100%; height: 470px; display: block;
  border-radius: 14px; background: #fff;
}
.preview-meta { display: flex; gap: 10px; padding: 12px 4px 2px; }
.meta-pill {
  flex: 1; text-align: center; background: #f4eff4;
  color: var(--ink-2); font-size: 12px; padding: 8px 4px;
  border-radius: 999px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  padding: 22px 4px 10px;
}
.section-head h2 { margin: 0; font-size: 17px; }
.section-head span { font-size: 12px; color: var(--ink-3); }

.rail {
  display: flex; gap: 12px; overflow-x: auto;
  padding: 4px 4px 12px; scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
}
.rail::-webkit-scrollbar { height: 0; }

.cloth-card {
  flex: 0 0 132px; scroll-snap-align: start;
  background: #fff; border-radius: 16px; padding: 8px;
  border: 2px solid transparent; cursor: pointer;
  box-shadow: 0 4px 12px rgba(42,32,54,.05);
  transition: border-color .15s, transform .15s;
}
.cloth-card.active { border-color: var(--accent); transform: translateY(-3px); }
.cloth-img {
  width: 100%; height: 140px; object-fit: cover;
  border-radius: 10px; background: #faf7f2; display: block;
}
.cloth-name {
  font-size: 13px; font-weight: 600; margin-top: 8px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cloth-tags { display: flex; gap: 5px; margin-top: 5px; flex-wrap: wrap; }
.mini-tag {
  font-size: 10px; color: var(--accent); background: var(--accent-soft);
  padding: 2px 7px; border-radius: 999px;
}
.mini-tag.muted { color: var(--ink-2); background: #efeaf1; }

.rail-empty { color: var(--ink-3); font-size: 13px; padding: 22px 6px; }

.btn {
  border: none; border-radius: 999px; font-size: 14px; font-weight: 600;
  padding: 11px 18px; cursor: pointer; text-align: center;
  display: inline-flex; align-items: center; justify-content: center;
  background: #f1ecf2; color: var(--purple-2);
}
.btn.primary {
  background: linear-gradient(135deg, #3a2f4f, #2a2036); color: var(--gold-2);
  border: 1px solid rgba(217,174,85,.45);
  box-shadow: 0 4px 14px rgba(42,32,54,.22);
  letter-spacing: .5px;
}
.btn.primary:active { filter: brightness(1.15); }
.btn.primary:disabled { background: #cdc6d1; color: #fff; cursor: not-allowed; border-color: transparent; }
.btn.ghost { background: #fff; color: var(--purple-2); border: 1px solid var(--gold); }
.btn.ghost.muted { color: var(--ink-2); border-color: #d8cfc6; }
.btn.block { display: flex; width: 100%; margin-top: 22px; }
.add-entry { margin-top: 10px; }

.photo-card { padding: 14px; }
.photo-box {
  position: relative; width: 100%; height: 300px;
  border-radius: 14px; overflow: hidden; background: #faf7f2;
}
.process-canvas { width: 100%; height: 100%; display: block; }
.photo-placeholder {
  position: absolute; inset: 0; background: #faf7f2;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  cursor: pointer;
}
.cam-icon {
  width: 62px; height: 62px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent);
  font-size: 34px; line-height: 60px; text-align: center;
}
.ph-title { margin-top: 14px; font-size: 15px; font-weight: 600; color: var(--ink-2); }
.ph-sub { margin-top: 6px; font-size: 12px; color: var(--ink-3); }
.photo-mask {
  position: absolute; inset: 0; background: rgba(255,255,255,.72);
  display: flex; align-items: center; justify-content: center;
  color: var(--accent); font-size: 14px;
}
.photo-actions { display: flex; gap: 10px; margin-top: 14px; }
.photo-actions .btn { flex: 1; }

.result-bar { margin-top: 16px; }
.view-switch { display: flex; background: #efe9f1; border-radius: 999px; padding: 4px; }
.switch-item {
  flex: 1; text-align: center; font-size: 13px; color: var(--ink-2);
  padding: 7px 0; border-radius: 999px; cursor: pointer;
}
.switch-item.on { background: #fff; color: var(--accent); font-weight: 600; box-shadow: 0 2px 6px rgba(42,32,54,.08); }

.auto-badge { font-size: 11px; color: var(--accent); background: var(--accent-soft); padding: 5px 12px; border-radius: 999px; font-weight: 600; }
.result-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.original-preview {
  width: 100%; max-height: 260px; object-fit: contain;
  margin-top: 12px; border-radius: 12px; background: #f5f2ed;
}

.form-card { margin-top: 14px; padding: 16px 14px 4px; }
.form-title { font-size: 16px; font-weight: 600; margin-bottom: 4px; }
.field { padding: 14px 0; border-bottom: 1px solid var(--line); }
.field:last-child { border-bottom: none; }
.label { font-size: 13px; color: var(--ink-2); margin-bottom: 10px; }
.label-hint { font-size: 11px; color: var(--ink-3); margin-left: 4px; }
.option-row { display: flex; flex-wrap: wrap; gap: 8px; }
.option-pill {
  padding: 7px 16px; border-radius: 999px; background: #f1ecf2;
  color: var(--ink-2); font-size: 13px; cursor: pointer; border: 1px solid transparent;
}
.option-pill.active { background: var(--accent-soft); color: var(--accent); border-color: var(--accent); font-weight: 600; }
.color-row { display: flex; flex-wrap: wrap; gap: 8px; }
.color-item {
  width: 56px; padding: 6px 0; border-radius: 12px; text-align: center;
  border: 1px solid transparent; cursor: pointer;
}
.color-item.active { background: #faf6ec; border-color: var(--accent); }
.color-dot {
  width: 30px; height: 30px; border-radius: 50%; margin: 0 auto;
  border: 1px solid rgba(0,0,0,.08);
}
.color-name { font-size: 11px; color: var(--ink-2); margin-top: 4px; }
.input, .textarea {
  width: 100%; background: #faf7f3; border: none; border-radius: 12px;
  padding: 11px 14px; font-size: 14px; font-family: inherit; color: var(--ink);
  outline: none;
}
.input:focus, .textarea:focus { box-shadow: 0 0 0 2px var(--accent-soft); }
.textarea { min-height: 88px; resize: vertical; }
.input::placeholder, .textarea::placeholder { color: #b3aab9; }
.save-btn { margin-bottom: 20px; }

.avatar-card { padding: 22px 14px; text-align: center; }
.avatar-large {
  width: 96px; height: 96px; border-radius: 50%; border: 3px solid #fff;
  background: var(--accent-soft); color: var(--accent); font-size: 12px;
  box-shadow: 0 4px 14px rgba(42,32,54,.1); overflow: hidden;
  padding: 0; cursor: pointer;
}
.avatar-tip { font-size: 12px; color: var(--ink-3); margin-top: 10px; }
.stats-row { display: flex; gap: 10px; margin-top: 12px; }
.stat { flex: 1; padding: 14px 0; text-align: center; }
.stat strong { display: block; font-size: 22px; color: var(--accent); }
.stat span { font-size: 12px; color: var(--ink-3); }

.item-list { display: flex; flex-direction: column; gap: 8px; }
.item-row {
  display: flex; align-items: center; gap: 12px; background: #fff;
  border-radius: 14px; padding: 8px 12px 8px 8px;
  box-shadow: 0 3px 10px rgba(42,32,54,.04);
}
.item-img { width: 62px; height: 62px; border-radius: 10px; object-fit: cover; background: #faf7f2; }
.item-info { flex: 1; min-width: 0; }
.item-name { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item-attr { font-size: 11px; color: var(--ink-3); margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item-del {
  border: none; background: #f4e9e6; color: var(--accent); border-radius: 999px;
  padding: 7px 12px; font-size: 12px; cursor: pointer;
}
.list-empty { color: var(--ink-3); font-size: 13px; padding: 18px 6px; text-align: center; }

.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  max-width: 640px; margin: 0 auto;
  display: flex; background: rgba(42,32,54,.97);
  backdrop-filter: blur(10px); border-top: 1px solid rgba(217,174,85,.3);
  padding-bottom: env(safe-area-inset-bottom);
}
.tab {
  flex: 1; border: none; background: none; padding: 10px 0 12px;
  color: rgba(255,255,255,.5); font-size: 11px; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
}
.tab span { font-size: 18px; line-height: 1; }
.tab.active { color: var(--gold-2); font-weight: 600; }

.toast {
  position: fixed; left: 50%; top: 50%; transform: translate(-50%,-50%);
  background: rgba(47,42,38,.9); color: #fff; padding: 10px 18px;
  border-radius: 10px; font-size: 13px; z-index: 100;
  opacity: 0; pointer-events: none; transition: opacity .2s;
}
.toast.show { opacity: 1; }

/* 搭配页：大头像 */
.hero-with-avatar { display: flex; align-items: center; justify-content: space-between; }
.hero-avatar {
  width: 68px; height: 68px; border-radius: 50%;
  border: 3px solid var(--gold-2); background: var(--purple-2);
  color: var(--gold-2); font-size: 15px; font-weight: 600;
  box-shadow: 0 4px 14px rgba(0,0,0,.3);
  overflow: hidden; padding: 0; cursor: pointer;
}
.section-head h2 small { font-size: 11px; color: var(--accent); font-weight: 400; margin-left: 4px; }

/* 天气与推荐 */
.weather-card { padding: 14px 16px; margin-bottom: 14px; }
.weather-main { display: flex; align-items: center; gap: 14px; }
.weather-temp { font-size: 34px; font-weight: 700; color: var(--accent); min-width: 76px; }
.weather-info { flex: 1; min-width: 0; }
.weather-desc { font-size: 13px; color: var(--ink-2); }
.weather-advice { font-size: 12px; color: var(--ink-3); margin-top: 4px; line-height: 1.5; }
.weather-actions { display: flex; gap: 8px; margin-top: 12px; }
.btn.small { padding: 7px 14px; font-size: 12px; flex: 1; }
.manual-temp { display: flex; gap: 8px; margin-top: 10px; }
.manual-temp input {
  flex: 1; min-width: 0; border: none; background: #faf7f3;
  border-radius: 10px; padding: 9px 12px; font-size: 13px; outline: none;
}

/* 穿搭记录 */
.record-row {
  display: flex; align-items: center; gap: 10px; background: #fff;
  border-radius: 14px; padding: 12px;
  box-shadow: 0 3px 10px rgba(42,32,54,.04);
}
.record-date { font-size: 12px; color: var(--accent); font-weight: 600; white-space: nowrap; }
.item-use {
  border: none; background: var(--accent-soft); color: var(--accent);
  border-radius: 999px; padding: 7px 12px; font-size: 12px; cursor: pointer;
}

/* 我的衣柜：全部衣物网格 */
.wardrobe-card { padding: 14px; }
.wardrobe-head { padding-top: 4px; }
.filter-step { margin-bottom: 6px; }
.filter-step.sub { margin-top: 10px; padding-left: 12px; border-left: 2px solid var(--accent-soft); }
.filter-step-label { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--ink-2); font-weight: 600; padding: 0 4px 8px; }
.step-num { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; }
.wardrobe-filters { display: flex; gap: 8px; padding: 0 4px 6px; flex-wrap: wrap; }
.wardrobe-filter {
  padding: 6px 18px; border-radius: 999px; background: #efe9f1;
  color: var(--ink-2); font-size: 12px; cursor: pointer; border: 1px solid transparent;
}
.wardrobe-filter.active {
  background: var(--accent-soft); color: var(--accent);
  border-color: var(--accent); font-weight: 600;
}
.wardrobe-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.wardrobe-grid .list-empty { grid-column: 1 / -1; }
.wardrobe-item {
  position: relative;
  background: #fff; border-radius: 14px; padding: 8px;
  box-shadow: 0 3px 10px rgba(42,32,54,.04);
}
.wardrobe-del {
  position: absolute; top: 5px; right: 5px; z-index: 2;
  width: 24px; height: 24px; border: none; border-radius: 50%;
  background: rgba(47,42,38,.5); color: #fff; font-size: 17px; line-height: 1;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  padding: 0;
}
.wardrobe-del:active { background: var(--accent); }
.wardrobe-img {
  width: 100%; height: 110px; object-fit: cover; border-radius: 10px;
  background: #faf7f2; display: block; cursor: zoom-in;
}
.wardrobe-name {
  font-size: 12px; font-weight: 600; margin-top: 8px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.wardrobe-tags { display: flex; gap: 4px; margin-top: 5px; flex-wrap: wrap; }
.wardrobe-type, .wardrobe-color {
  font-size: 10px; padding: 2px 7px; border-radius: 999px;
}
.wardrobe-type { color: var(--accent); background: var(--accent-soft); }
.wardrobe-color { color: var(--ink-2); background: #efeaf1; }

/* 添加页：季节与适穿温度粗判 */
.auto-card { margin-top: 14px; padding: 14px 16px; }
.auto-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.auto-title { font-size: 15px; font-weight: 600; color: var(--accent); }
.auto-hint { font-size: 11px; color: var(--ink-3); }
.auto-result { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 10px; }
.auto-tag, .auto-temp {
  font-size: 12px; padding: 5px 12px; border-radius: 999px;
}
.auto-tag { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.auto-temp { background: #efeaf1; color: var(--ink-2); }
.auto-reason { flex-basis: 100%; font-size: 11px; color: var(--ink-3); margin-top: 2px; }

.season-filters { margin-top: 4px; }
.wardrobe-temp { font-size: 10px; color: #2f7d5b; background: #e7f3ec; padding: 2px 7px; border-radius: 999px; }

/* 历史穿搭页 */
.link-btn { border: none; background: none; color: var(--accent); font-size: 12px; cursor: pointer; padding: 4px 0; }
.history-toolbar { display: flex; align-items: center; justify-content: space-between; padding: 2px 4px 12px; }
.history-toolbar > span { font-size: 12px; color: var(--ink-3); }
.history-toolbar .btn { flex: 0 0 auto; padding: 6px 14px; }
.history-card {
  background: #fff; border-radius: 16px; padding: 14px; margin-bottom: 12px;
  box-shadow: 0 3px 12px rgba(42,32,54,.05);
}
.history-card-head { display: flex; align-items: center; justify-content: space-between; }
.history-date-block { display: flex; align-items: baseline; gap: 10px; }
.history-date { font-size: 15px; font-weight: 700; color: var(--ink-1); }
.history-temp { font-size: 12px; color: var(--accent); background: var(--accent-soft); padding: 3px 10px; border-radius: 999px; }
.history-count { font-size: 11px; color: var(--ink-3); }
.history-strip { display: flex; gap: 8px; margin-top: 12px; overflow-x: auto; padding-bottom: 4px; }
.history-thumb-cell { flex: 0 0 auto; width: 68px; text-align: center; }
.history-thumb {
  width: 68px; height: 68px; object-fit: cover; border-radius: 10px;
  background: #faf7f2; display: block; cursor: zoom-in;
}
.history-thumb-fallback {
  width: 68px; height: 68px; border-radius: 10px; background: #faf7f2;
  display: flex; align-items: center; justify-content: center; font-size: 24px; color: var(--ink-3);
}
.history-thumb-name {
  font-size: 10px; color: var(--ink-2); margin-top: 4px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.history-names { font-size: 12px; color: var(--ink-3); margin-top: 10px; line-height: 1.5; }
.history-actions { display: flex; gap: 8px; margin-top: 12px; }
.history-empty { text-align: center; padding: 60px 20px; color: var(--ink-3); }
.history-empty-icon { font-size: 44px; color: var(--accent-soft); line-height: 1; }
.history-empty-title { font-size: 15px; color: var(--ink-2); font-weight: 600; margin-top: 14px; }
.history-empty-sub { font-size: 12px; margin-top: 8px; line-height: 1.6; }

/* ===== 数据钥匙登录层（高级深紫 + 香槟金） ===== */
.login-overlay {
  position: fixed; inset: 0; z-index: 100;
  background:
    radial-gradient(circle at 18% 8%, rgba(217,174,85,.10) 0 1px, transparent 1px),
    radial-gradient(circle at 82% 32%, rgba(217,174,85,.07) 0 1px, transparent 1px),
    linear-gradient(165deg, #332748 0%, #1b1529 55%, #241d31 100%);
  background-size: 26px 26px, 38px 38px, 100% 100%;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
}
.login-shell { width: 100%; max-width: 400px; }
.login-brand { display: flex; align-items: center; gap: 10px; justify-content: center; margin-bottom: 26px; }
.login-brand-mark {
  width: 40px; height: 40px; border-radius: 11px;
  background: linear-gradient(145deg, var(--gold-2), var(--gold)); color: var(--purple);
  display: flex; align-items: center; justify-content: center;
  font-size: 21px; font-weight: 800;
  box-shadow: 0 6px 18px rgba(0,0,0,.3);
}
.login-brand-name { color: #fff; font-size: 15px; font-weight: 700; letter-spacing: 3px; }
.login-card {
  width: 100%; text-align: center;
  background: var(--card); border-radius: 22px; padding: 30px 26px 26px;
  border: 1px solid rgba(217,174,85,.25);
  box-shadow: 0 24px 60px rgba(0,0,0,.42);
  position: relative; overflow: hidden;
}
.login-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, transparent, var(--gold-2), transparent);
}
.login-badge {
  display: inline-block; font-size: 10px; font-weight: 800; letter-spacing: 1.5px;
  color: var(--gold); background: var(--gold-soft);
  padding: 5px 12px; border-radius: 20px; margin-bottom: 18px;
}
.login-hero-icon {
  width: 58px; height: 58px; margin: 0 auto 12px;
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: var(--purple); color: var(--gold-2); font-size: 28px;
  box-shadow: 0 8px 20px rgba(42,32,54,.25), inset 0 0 0 1px rgba(217,174,85,.4);
}
.login-title { margin: 0 0 10px; font-size: 23px; font-weight: 800; color: var(--purple); letter-spacing: 1px; }
.login-sub { margin: 0 0 24px; color: var(--ink-2); font-size: 13px; line-height: 1.7; }
.login-label { display: block; text-align: left; font-size: 12px; font-weight: 700; color: var(--ink-2); margin-bottom: 8px; }
.login-input {
  width: 100%; height: 52px; padding: 0 16px;
  border: 1.5px solid var(--line); border-radius: 13px;
  font-size: 15px; letter-spacing: 1.5px; font-weight: 600;
  background: #fbf9f4; color: var(--purple); outline: none;
  text-transform: uppercase; font-variant-numeric: tabular-nums;
}
.login-input::placeholder { color: var(--ink-3); letter-spacing: 0; font-weight: 400; text-transform: none; }
.login-input:focus { border-color: var(--gold); background: #fff; box-shadow: 0 0 0 3px rgba(185,137,47,.12); }
.login-err { min-height: 18px; color: #b5342a; font-size: 12px; text-align: left; margin: 6px 2px 0; }
.login-btn {
  margin-top: 6px; height: 50px; font-size: 15px;
  background: linear-gradient(135deg, #3a2f4f, #241d31) !important;
  color: var(--gold-2) !important; border: 1px solid rgba(217,174,85,.5) !important;
}
.login-foot { margin-top: 20px; font-size: 11px; color: var(--ink-3); }
.login-copyright { text-align: center; color: rgba(255,255,255,.35); font-size: 11px; margin-top: 22px; letter-spacing: 1px; }

/* ===== 我的 K 值卡片 ===== */
.k-card {
  margin-top: 16px; padding: 18px;
  background: linear-gradient(145deg, #2a2036, #3a2f4f);
  border: 1px solid rgba(217,174,85,.25);
}
.k-card-head { display: flex; align-items: center; justify-content: space-between; }
.k-card-title { font-size: 15px; font-weight: 700; color: #fff; }
.k-card-badge { font-size: 11px; color: var(--gold-2); background: rgba(217,174,85,.14); padding: 3px 9px; border-radius: 999px; }
.k-value {
  margin: 12px 0 8px; font-size: 22px; font-weight: 800;
  letter-spacing: 2px; color: var(--gold-2);
  word-break: break-all; font-variant-numeric: tabular-nums;
}
.k-card-tip { font-size: 12px; color: rgba(255,255,255,.55); line-height: 1.6; }
.k-card-actions { display: flex; gap: 10px; margin-top: 14px; }
.k-card-actions .btn {
  flex: 1; background: rgba(255,255,255,.08) !important;
  color: var(--gold-2) !important; border: 1px solid rgba(217,174,85,.35) !important;
}

@media (min-width: 641px) {
  .preview-canvas { height: 560px; }
  .photo-box { height: 360px; }
}
