/* =====================================================================
 * GoPower · Web PC 版 我的页（mine）样式 (web/css/mine.css)
 * ---------------------------------------------------------------------
 * 独立于 web.css / study.css；沿用 :root 设计变量（--brand/--card/--line…）
 * 与 .card/.btn-primary/.progress/.empty-state/.ach-grid 可复用类。
 * 覆盖：mine 页容器、用户卡 + 消息入口红点（>99→99）、资产行（4 列等宽）、
 * 今日任务列表（复用 .progress 进度条）、成就墙（auto-fill 换行网格）、
 * 游客空态、加载骨架，以及 1280/1440/1920 三视口响应式微调。
 * ===================================================================== */

/* ---------- 页面容器 ---------- */
.mine-page{display:flex;flex-direction:column;gap:20px;max-width:1120px;margin:0 auto}
.mine-card{padding:20px 24px}
.mine-section-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:14px}
.mine-section-title{display:flex;align-items:center;gap:8px;font-size:15px;font-weight:900;color:var(--ink)}
.mine-section-title .ui-icon{width:1.2rem;height:1.2rem;color:var(--brand)}
.mine-section-head small{font-size:12px;color:var(--ink-2);white-space:nowrap}

/* ---------- ① 用户卡 ---------- */
.mine-user-card{
  display:flex;align-items:center;gap:16px;flex-wrap:wrap;
  background:linear-gradient(120deg,#ffffff 60%,var(--brand-soft));
}
.mine-avatar{
  width:56px;height:56px;border-radius:50%;display:grid;place-items:center;flex:0 0 auto;overflow:hidden;
  background:linear-gradient(135deg,#8e6bff,#b79bff);color:#fff;font-weight:800;font-size:22px;
}
.mine-avatar img{width:100%;height:100%;object-fit:cover}
.mine-user-copy{display:flex;flex-direction:column;gap:3px;min-width:0;flex:1 1 auto}
.mine-user-copy b{font-size:18px;line-height:1.3;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.mine-user-copy small{font-size:12px;color:var(--ink-2);line-height:1.5;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.mine-guest-actions{margin-left:auto;flex:0 0 auto}
.mine-guest-login{margin-left:0}

/* 消息入口 */
.mine-msg-entry{
  display:flex;align-items:center;gap:8px;margin-left:auto;flex:0 0 auto;position:relative;
  padding:9px 14px;border-radius:999px;background:var(--card);
  border:1px solid var(--line);box-shadow:var(--shadow-sm);
  color:var(--ink-2);font-size:13px;font-weight:800;transition:.15s;
}
.mine-msg-entry:hover{background:var(--brand-soft);color:var(--brand);border-color:var(--brand-soft)}
.mine-msg-entry .ui-icon{width:1.15rem;height:1.15rem}
.mine-msg-arrow{width:.9rem !important;height:.9rem !important;color:var(--ink-2)}
.mine-msg-badge{
  display:inline-flex;align-items:center;justify-content:center;
  min-width:18px;height:18px;padding:0 5px;border-radius:999px;
  background:#e0533d;color:#fff;font-size:11px;font-weight:900;line-height:1;
}
.mine-msg-badge[hidden]{display:none}

/* ---------- ② 资产行（4 列等宽一行，1280 下不换行） ---------- */
.mine-assets{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
.mine-asset{
  display:flex;align-items:center;gap:10px;min-width:0;
  padding:14px 16px;border-radius:16px;background:var(--bg);border:1px solid var(--line);
}
.mine-asset img.asset-nec{width:24px;height:24px;flex:0 0 auto}
.mine-asset img.mine-shield{width:24px;height:24px;flex:0 0 auto;object-fit:contain}
.mine-asset .mine-shield-fallback{width:24px;height:24px;flex:0 0 auto;display:grid;place-items:center;color:var(--brand)}
.mine-asset .mine-shield-fallback .ui-icon{width:18px;height:18px}
.mine-asset-copy{display:flex;flex-direction:column;gap:1px;min-width:0}
.mine-asset-copy b{font-size:16px;line-height:1.2;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.mine-asset-copy small{font-size:11px;color:var(--ink-2);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

/* ---------- ③ 今日任务（复用 .progress 进度条） ---------- */
.mine-task-list{display:flex;flex-direction:column;gap:10px}
.mine-task-item{
  display:flex;align-items:center;gap:14px;min-width:0;
  padding:13px 16px;border-radius:14px;background:var(--bg);border:1px solid transparent;
}
.mine-task-item.done{background:#f0f9f3;border-color:#dcefe3}
.mine-task-check{
  width:26px;height:26px;border-radius:50%;display:grid;place-items:center;flex:0 0 auto;
  background:var(--card);color:var(--ink-2);border:1.5px solid var(--line);font-size:12px;font-weight:900;
}
.mine-task-check .ui-icon{width:14px;height:14px}
.mine-task-item.done .mine-task-check{background:var(--good);border-color:var(--good);color:#fff}
.mine-task-main{flex:1;min-width:0;display:flex;flex-direction:column;gap:6px}
.mine-task-row{display:flex;align-items:center;justify-content:space-between;gap:10px;min-width:0}
.mine-task-row b{font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.mine-task-row small{font-size:12px;color:var(--ink-2);white-space:nowrap;flex:0 0 auto}
.mine-task-item .progress{width:100%}
.mine-task-badge{
  flex:0 0 auto;padding:3px 10px;border-radius:999px;background:#e8f7ed;color:#2f7d4c;
  font-size:11px;font-weight:800;white-space:nowrap;
}

/* ---------- ④ 成就墙（auto-fill 换行网格） ---------- */
.mine-ach-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(92px,1fr));gap:14px}
.mine-ach-item{display:flex;flex-direction:column;align-items:center;gap:6px;text-align:center;min-width:0}
.mine-ach-badge{
  position:relative;width:58px;height:58px;border-radius:16px;display:grid;place-items:center;flex:0 0 auto;
  background:var(--bg);border:1px solid var(--line);overflow:hidden;
}
.mine-ach-badge img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.mine-ach-fallback{display:grid;place-items:center;color:var(--brand)}
.mine-ach-fallback .ui-icon{width:28px;height:28px}
.mine-ach-item small{font-size:11px;color:var(--ink-2);line-height:1.25;max-width:92px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.mine-ach-item.locked .mine-ach-badge{filter:grayscale(1);opacity:.55}
.mine-ach-item.unlocked .mine-ach-badge{border-color:var(--brand-soft);background:var(--brand-soft)}

/* ---------- 加载骨架 / 空态 ---------- */
.mine-loading{
  display:flex;align-items:center;justify-content:center;gap:8px;padding:24px;
  color:var(--ink-2);font-size:13px;
}
.mine-loading .spinner{width:18px;height:18px;border-width:2px}

/* ---------- 响应式：三视口 ---------- */
@media (max-width:1280px){
  .mine-card{padding:16px 18px}
  .mine-asset{padding:12px 12px;gap:8px}
  .mine-asset img.asset-nec,.mine-asset img.mine-shield,.mine-asset .mine-shield-fallback{width:20px;height:20px}
  .mine-asset-copy b{font-size:14px}
  .mine-task-item{padding:11px 13px;gap:10px}
}
@media (min-width:1920px){
  /* 1920 不拉伸：内容保持 1120 居中，仅加大间距 */
  .mine-page{max-width:1280px}
  .mine-assets{gap:16px}
  .mine-ach-grid{gap:16px}
}
