/* ==========================================================================
   氢日记 Web · 我的（个人资料 / 数据 / 关键词星图 / 日记密码锁）
   依赖 app.css 中的设计变量与通用组件
   ========================================================================== */

.grid-mine { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 900px) {
  .grid-mine { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 20px; }
}

/* ---------- 多端登录表单：手机堆叠、桌面横排 ---------- */
.login-row { display: grid; gap: 10px; grid-template-columns: 1fr; }
@media (min-width: 900px) {
  .login-row { display: flex; align-items: center; gap: 12px; }
  .login-row .field { flex: 1; min-width: 0; }
  .login-row .btn { flex: none; }
}

/* ---------- 身份卡 ---------- */
.hero-mine {
  position: relative;
  overflow: hidden;
  border: none;
  color: #FFFBF3;
  background: linear-gradient(140deg, #166558 0%, #0F4C42 62%, #14574C 100%);
  box-shadow: 0 14px 40px rgba(15, 76, 66, .26);
  padding: 22px 20px 16px;
}
.hero-glow {
  position: absolute; width: 320px; height: 320px; border-radius: 50%;
  top: -190px; right: -110px;
  background: radial-gradient(circle, rgba(213, 228, 218, .34) 0%, rgba(213, 228, 218, 0) 70%);
}
.hero-mine .hero-top { position: relative; display: flex; align-items: center; gap: 16px; }
.ava-btn {
  position: relative; width: 66px; height: 66px; flex: none;
  border: none; padding: 0; background: transparent; border-radius: 50%;
}
.ava-btn img, .ava-btn .ava-ph {
  width: 66px; height: 66px; border-radius: 50%;
  border: 2px solid rgba(255, 251, 243, .34);
  display: grid; place-items: center;
  font-size: 26px; color: #FFFBF3;
  background: rgba(213, 228, 218, .2);
  object-fit: cover;
}
.ava-btn i {
  position: absolute; right: -2px; bottom: -2px;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--sage); color: var(--ink);
  font-size: 11px; font-style: normal; line-height: 22px; text-align: center;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .2);
}
.hero-mine .hero-info { flex: 1; min-width: 0; }
.nick-input {
  width: 100%; border: none; outline: none; background: transparent;
  color: #FFFBF3; font-family: inherit; font-size: 21px; font-weight: 600;
  padding: 2px 0; border-bottom: 1px dashed rgba(255, 251, 243, .22);
}
.nick-input::placeholder { color: rgba(255, 251, 243, .45); font-weight: 400; }
.hero-hint { font-size: 12px; color: rgba(255, 251, 243, .62); margin-top: 7px; }

.hero-mine .hero-meta {
  position: relative; display: flex; margin-top: 20px; padding-top: 15px;
  border-top: 1px solid rgba(255, 251, 243, .14);
}
.hero-mine .hm { flex: 1; text-align: center; }
.hero-mine .hm b { display: block; font-size: 19px; font-weight: 600; color: #FFFBF3; }
.hero-mine .hm span { display: block; font-size: 11px; color: rgba(255, 251, 243, .58); margin-top: 2px; }

/* ---------- 资料 ---------- */
.date-input {
  border: 1px solid var(--line); background: rgba(255, 255, 255, .7);
  border-radius: var(--r-sm); padding: 8px 12px;
  font-family: inherit; font-size: 13.5px; color: var(--text);
  outline: none;
}
.date-input:focus { border-color: rgba(22, 101, 88, .34); }
.sig-wrap { margin-top: 14px; }
.sig-count { text-align: right; font-size: 11.5px; color: var(--faint); margin-top: 6px; }
/* 确认保存 */
.save-row { margin-top: 16px; }
.save-row .btn { background: var(--ink); color: var(--paper); border-radius: 999px; font-weight: 600; }
.lock-hint {
  margin-top: 12px; font-size: 12px; color: var(--leaf);
  background: rgba(213, 228, 218, .55); border-radius: 12px;
  padding: 10px 12px; line-height: 1.7;
}

/* ---------- 数据格 ---------- */
.tiles { display: flex; flex-wrap: wrap; }
.tile { width: 25%; text-align: center; padding: 10px 0; }
.tile-v { font-size: 21px; font-weight: 700; color: var(--ink); line-height: 1.2; }
.tile-v i { font-size: 11px; font-style: normal; font-weight: 400; color: var(--muted); margin-left: 3px; }
.tile-l { font-size: 11px; color: var(--muted); margin-top: 4px; }

/* ---------- 小情报 ---------- */
.insights { display: flex; flex-direction: column; }
.ins {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 10px 0; border-bottom: 1px dashed var(--line-2);
}
.ins:last-child { border-bottom: none; }
.ins-k { font-size: 13px; color: var(--muted); flex: none; }
.ins-v { font-size: 13px; color: var(--ink); text-align: right; }

/* ---------- 情绪条 ---------- */
.emo-bar {
  display: flex; height: 10px; border-radius: 999px; overflow: hidden;
  background: var(--sage-2);
}
.emo-bar i { display: block; height: 100%; }
.emo-bar .pos { background: var(--pos); }
.emo-bar .neu { background: #B7C6BF; }
.emo-bar .neg { background: var(--neg); }
.emo-legend { display: flex; justify-content: space-between; margin-top: 10px; font-size: 12.5px; }

/* ---------- 成就 ---------- */
.badges { display: flex; gap: 10px; overflow-x: auto; padding: 4px 2px 8px; }
.badge {
  flex: none; width: 92px; text-align: center; padding: 14px 6px;
  border: 1px dashed rgba(22, 101, 88, .18); border-radius: 14px;
  opacity: .6; transition: transform .16s, opacity .16s;
}
.badge:hover { transform: translateY(-2px); }
.badge.done {
  opacity: 1; border: 1px solid rgba(22, 101, 88, .22);
  background: linear-gradient(160deg, #fff 0%, #F0F7F1 100%);
  box-shadow: 0 3px 12px rgba(22, 101, 88, .07);
}
.badge-icon { font-size: 22px; color: var(--faint); line-height: 1; }
.badge.done .badge-icon { color: var(--leaf); }
.badge-name { font-size: 12px; font-weight: 600; color: var(--ink); margin-top: 8px; }
.badge-desc { font-size: 10.5px; color: var(--muted); margin-top: 4px; line-height: 1.45; }

/* ---------- 关键词星图 ---------- */
.tree {
  position: relative; width: 100%;
  aspect-ratio: 8 / 5;
  height: 240px;
  border-radius: 14px; overflow: hidden;
  background: #F4F9F4;
}
@supports (aspect-ratio: 8 / 5) { .tree { height: auto; } }
.tcell {
  position: absolute; overflow: hidden;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  border: 1.5px solid rgba(255, 251, 243, .6);
  box-sizing: border-box; cursor: pointer;
  transition: opacity .16s;
}
.tcell:hover { opacity: .84; }
.tcell-w { font-weight: 600; line-height: 1.1; max-width: 92%; overflow: hidden; white-space: nowrap; }
.tcell-c { opacity: .7; line-height: 1.2; }
.tree-legend { display: flex; justify-content: space-between; margin-top: 10px; }

/* ---------- 入口 ---------- */
.link-row {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 14.5px; color: var(--ink);
  transition: border-color .16s, background .16s;
}
.link-row:hover { border-color: rgba(22, 101, 88, .28); background: rgba(213, 228, 218, .22); }
.link-row .arrow { color: var(--faint); font-size: 17px; }

/* ---------- 日记密码锁 ---------- */
.lock-mask {
  position: fixed; inset: 0; z-index: 200;
  display: none;
  align-items: center; justify-content: center;
  background: var(--paper);
  overflow: hidden;
}
.lock-mask.on { display: flex; }
.lock-orb {
  position: absolute; width: 560px; height: 560px; border-radius: 50%;
  top: -260px; right: -180px;
  background: radial-gradient(circle, rgba(213, 228, 218, .9) 0%, rgba(213, 228, 218, 0) 68%);
}
.lock-card { position: relative; width: 300px; text-align: center; }
.lock-card.shake { animation: lock-shake .4s ease; }
@keyframes lock-shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-9px); }
  40% { transform: translateX(8px); }
  60% { transform: translateX(-5px); }
  80% { transform: translateX(3px); }
}
.lock-brand { font-size: 12px; letter-spacing: 4px; color: var(--leaf); }
.lock-title { font-size: 22px; font-weight: 600; color: var(--ink); margin: 8px 0 0; }
.lock-sub { font-size: 12.5px; color: var(--muted); margin: 4px 0 0; }
.lock-dots { display: flex; justify-content: center; gap: 12px; margin: 26px 0 6px; }
.lock-dots i {
  width: 11px; height: 11px; border-radius: 50%;
  border: 1.5px solid rgba(22, 101, 88, .35);
  transition: all .18s ease;
}
.lock-dots i.on { background: var(--ink); border-color: var(--ink); transform: scale(1.12); }
.lock-input {
  width: 100%; height: 44px; margin-top: 10px;
  border: 1px solid var(--line); border-radius: 12px;
  background: #fff; outline: none; text-align: center;
  font-size: 22px; letter-spacing: 10px; color: var(--ink);
  font-family: inherit;
}
.lock-input:focus { border-color: rgba(22, 101, 88, .4); }
.lock-msg { min-height: 20px; font-size: 12.5px; color: var(--neg); margin-top: 8px; }
.lock-tip { font-size: 11px; color: var(--faint); line-height: 1.7; margin-top: 18px; }
