/* ============================================================
   神仙渡 · 许愿司 — 访客账号样式
   ============================================================ */

/* ==================== 顶栏访客入口 ==================== */
.user-btn {
  display: flex; align-items: center; gap: 7px; cursor: pointer;
  background: var(--panel-2); border: 1px solid var(--line);
  color: var(--paper-dim); font-family: var(--font-body); font-size: 12.5px;
  letter-spacing: 1px; padding: 7px 13px; white-space: nowrap;
  transition: .25s var(--ease); position: relative;
}
.user-btn i, .user-btn svg { color: var(--gold); font-size: 12px; }
.user-btn:hover { color: var(--gold-hi); border-color: var(--gold-dim); }
.user-btn.on { border-color: var(--gold); color: var(--gold-hi); background: rgba(228,185,95,.1); }
/* ---- 触控目标 ----
   「游客」按钮原 35×28，触屏下高度与宽度均不足手指点击；
   .user-btn 定义在本文件，main.css 的断点改不到宽度，故在此补足。
   断点取 900：iPad 竖屏 768 同样是触屏设备。 */
@media (max-width: 900px) {
  .user-btn { min-height: 44px; min-width: 64px; padding: 8px 14px;
    -webkit-tap-highlight-color: rgba(228,185,95,.16); }
}
.user-btn.on i, .user-btn.on svg { color: var(--cinnabar-hi); }
.user-btn .dot {
  position: absolute; top: -4px; right: -4px; min-width: 15px; height: 15px; padding: 0 4px;
  display: grid; place-items: center; border-radius: 8px;
  background: var(--cinnabar); color: #fff; font-family: var(--font-num); font-size: 9.5px;
}

/* ==================== 账号弹层 ==================== */
.auth-card {
  /* 原width: min(430px, 100%) —— 在 .modal（padding:22px 的 flex 容器）里
     100% 参照的是父content 宽，min() 会取到 430px 固定值，
     430 + 22*2 = 474 > 视口 430，横向溢出 44px（实测 l=8 r=470 ovX=40）。
     改用 width:100% + max-width:430px：既封顶 430，又受父框约束不再溢出。 */
  width: 100%; max-width: 430px; max-height: 90vh; overflow-y: auto;
  padding: 34px clamp(24px, 5vw, 40px) 30px;
  background: linear-gradient(170deg, #221a13, #120d09 62%);
  border: 1px solid var(--gold-dim); position: relative;
  box-shadow: 0 0 70px rgba(228,185,95,.16), inset 0 0 46px rgba(0,0,0,.6);
  animation: pop .45s var(--ease) both;
}
.auth-close {
  position: absolute; top: 14px; right: 16px;
  width: 32px; height: 32px; border-radius: 50%; cursor: pointer;
  background: none; border: 1px solid var(--line); color: var(--ash);
  display: grid; place-items: center; font-size: 14px; transition: .25s;
}
.auth-close:hover { color: var(--gold-hi); border-color: var(--gold-dim); transform: rotate(90deg); }
.auth-head { text-align: center; margin-bottom: 22px; }
.auth-head .seal {
  width: 54px; height: 54px; margin: 0 auto 14px; display: grid; place-items: center;
  font-family: var(--font-cn); font-size: 28px; color: var(--gold-hi);
  border: 1px solid var(--line);
  background: radial-gradient(circle at 36% 28%, rgba(228,185,95,.24), rgba(13,10,8,.9) 68%);
}
.auth-head h3 {
  font-family: var(--font-cn); font-weight: 400; font-size: 26px;
  letter-spacing: 5px; color: var(--gold-hi); margin-bottom: 6px;
}
.auth-head p { font-size: 12px; color: var(--ash); line-height: 1.9; }

.auth-tabs { display: flex; gap: 2px; margin-bottom: 22px; }
.auth-tabs button {
  flex: 1; cursor: pointer; border: 1px solid var(--line-soft); background: transparent;
  color: var(--ash); font-family: var(--font-body); font-size: 13px; letter-spacing: 2px;
  padding: 10px; transition: .25s;
}
.auth-tabs button.on { background: rgba(228,185,95,.14); color: var(--gold-hi); border-color: var(--gold); }

.auth-form label {
  display: block; font-size: 11.5px; letter-spacing: 2px; color: var(--paper-dim); margin: 14px 0 6px;
}
.auth-form input {
  width: 100%; background: rgba(7,5,4,.7); border: 1px solid var(--line);
  color: var(--paper); font-family: var(--font-body); font-size: 14px;
  padding: 11px 13px; outline: none; transition: .25s;
}
.auth-form input:focus { border-color: var(--gold-dim); box-shadow: 0 0 0 3px rgba(228,185,95,.06); }
.auth-form .hint { font-size: 10.5px; color: var(--ash); margin-top: 5px; line-height: 1.7; }
.auth-form .hint.bad { color: #e0a49c; }
.auth-form .btn { width: 100%; margin-top: 22px; }

/* 密码强度条：三格，lv0 太短 / lv1 偏弱 / lv2 尚可 / lv3 结实 */
.pw-meter { display: flex; gap: 4px; margin-top: 7px; }
.pw-meter i {
  flex: 1; height: 3px; background: rgba(228,185,95,.12); transition: background .25s;
}
.pw-meter.lv1 i:nth-child(1) { background: var(--cinnabar); }
.pw-meter.lv2 i:nth-child(-n+2) { background: var(--gold-dim); }
.pw-meter.lv3 i { background: var(--gold); }

.auth-err {
  margin-top: 14px; padding: 9px 13px; font-size: 12px; color: #f0b3ac;
  background: rgba(179,39,30,.12); border-left: 2px solid var(--cinnabar); letter-spacing: 1px;
}
.auth-note {
  margin-top: 20px; padding-top: 16px; border-top: 1px dashed var(--line);
  font-size: 11px; color: var(--ash); line-height: 2; text-align: center;
}

/* 号牌签条：仅在「账号留空、由寺中发号」时回显一次 */
.ticket {
  margin: 6px 0 4px; padding: 6px 20px;
  background: linear-gradient(168deg, rgba(228,185,95,.1), rgba(13,10,8,.6));
  border: 1px solid var(--gold-dim);
  box-shadow: inset 0 0 34px rgba(228,185,95,.05);
}
.ticket .tk-row {
  display: flex; align-items: baseline; gap: 14px;
  padding: 13px 0; border-bottom: 1px dashed rgba(228,185,95,.22);
}
.ticket .tk-row:last-child { border-bottom: none; }
.ticket .tk-row span { font-size: 11px; letter-spacing: 3px; color: var(--ash); flex: none; }
.ticket .tk-v {
  flex: 1; text-align: right; font-family: var(--font-num);
  font-size: 24px; letter-spacing: 5px; font-weight: 400; color: var(--gold-hi);
  text-shadow: 0 0 18px rgba(228,185,95,.35);
}
.auth-head p b { color: var(--gold-dim); font-weight: 400; }

/* ==================== 我的（个人中心） ==================== */
.prof-top {
  display: flex; align-items: center; gap: 22px; flex-wrap: wrap;
  padding: 26px 28px; margin-top: 30px; position: relative; overflow: hidden;
}
.prof-top::after {          /* 破格：右侧大印 */
  content: '愿'; position: absolute; right: -14px; bottom: -34px;
  font-family: var(--font-cn); font-size: 150px; color: var(--gold);
  opacity: .05; pointer-events: none; line-height: 1;
}
.prof-av {
  width: 76px; height: 76px; flex: none; display: grid; place-items: center;
  font-family: var(--font-cn); font-size: 38px; color: var(--gold-hi);
  border: 1px solid var(--line);
  background: radial-gradient(circle at 36% 28%, rgba(228,185,95,.24), rgba(13,10,8,.9) 70%);
}
.prof-id { flex: 1; min-width: 180px; position: relative; z-index: 2; }
.prof-id h3 { font-family: var(--font-cn); font-weight: 400; font-size: 30px; letter-spacing: 4px; color: var(--gold-hi); margin-bottom: 6px; }
.prof-id .meta { font-size: 12px; color: var(--ash); letter-spacing: 1px; line-height: 1.9; }
.prof-id .meta span { color: var(--paper-dim); }
.prof-id .note {
  margin-top: 8px; padding: 6px 11px; display: inline-block; max-width: 100%;
  font-size: 11.5px; color: var(--paper-dim); letter-spacing: 1px; line-height: 1.7;
  background: rgba(228,185,95,.06); border-left: 2px solid var(--gold-dim);
}
.prof-acts { display: flex; gap: 9px; flex-wrap: wrap; position: relative; z-index: 2; }

.prof-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 14px; margin-top: 18px; }

.prof-guest {
  max-width: 560px; margin: 70px auto; padding: 40px 34px; text-align: center;
}
.prof-guest .seal {
  width: 66px; height: 66px; margin: 0 auto 16px; display: grid; place-items: center;
  font-family: var(--font-cn); font-size: 32px; color: var(--gold-dim);
  border: 1px dashed var(--line);
}
.prof-guest h3 { font-family: var(--font-cn); font-weight: 400; font-size: 26px; letter-spacing: 5px; color: var(--gold); margin-bottom: 10px; }
.prof-guest p { font-size: 13px; color: var(--ash); line-height: 2.1; margin-bottom: 24px; }
.prof-guest .acts { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* 我的许愿卡片 */
.my-wish {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 16px 18px; margin-bottom: 12px;
  background: var(--panel); border: 1px solid var(--line-soft); transition: .3s var(--ease);
}
.my-wish:hover { border-color: var(--gold-dim); transform: translateX(4px); }
.my-wish .g {
  width: 44px; height: 44px; flex: none; display: grid; place-items: center;
  font-family: var(--font-cn); font-size: 24px; color: var(--gold);
  border: 1px solid var(--line); background: rgba(228,185,95,.06);
}
.my-wish .body { flex: 1; }
.my-wish .body .tx { font-size: 14px; line-height: 1.9; color: var(--paper); margin-bottom: 7px; }
.my-wish .body .mt { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; font-size: 11px; color: var(--ash); }

/* 许愿墙「我的愿望」条目下的元信息行（神名/日期/供奉/签品，原 11px）——
   只在登录后有内容，游客态审计测不到。断点取 900，与全站触控标准一致。 */
@media (max-width: 900px) {
  .my-wish .body .mt { font-size: 12px; }
  .my-wish .body .mt .tagg { font-size: 12px; }
  .my-wish .body .mt .status-pill { font-size: 12px; }
  /* 功德年表的字号基础规则已取 12px，无需在此重复补写 */
}

/* ==================== 功德年表 ==================== */
.merit-log { margin-top: 16px; position: relative; }
.ml-month { position: relative; padding-left: 22px; }
/* 月与月之间的竖线：用 ::before 画在月块左侧，最后一个月不画到底 */
.ml-month::before {
  content: ''; position: absolute; left: 5px; top: 22px; bottom: -6px; width: 1px;
  background: var(--line-soft);
}
.ml-month:last-child::before { display: none; }
.ml-month.hid { display: none; }
.ml-mhead {
  display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap;
  padding: 4px 0 10px; position: relative;
}
/* 月节点：竖线上的小菱形 */
.ml-mhead::before {
  content: ''; position: absolute; left: -20px; top: 11px;
  width: 7px; height: 7px; background: var(--gold-dim); transform: rotate(45deg);
}
.ml-mname { font-family: var(--font-cn); font-size: 15px; letter-spacing: 2px; color: var(--gold-hi); }
.ml-msum { font-family: var(--font-num); font-size: 12px; color: var(--ash); letter-spacing: 1px; }
.ml-msum b { font-weight: 400; margin-left: 7px; }
.ml-list { list-style: none; padding-bottom: 14px; }
.ml-item {
  display: flex; align-items: center; gap: 11px;
  padding: 8px 0; border-bottom: 1px solid var(--line-soft);
  font-size: 12.5px; color: var(--paper-dim);
}
.ml-item:last-child { border-bottom: none; }
.ml-day { font-family: var(--font-num); font-size: 12px; color: var(--ash); flex: none; min-width: 34px; }
.ml-ic { flex: none; width: 22px; text-align: center; font-size: 12px; color: var(--gold-dim); }
.ml-reason { flex: 1; min-width: 0; line-height: 1.7; }
.ml-delta { font-family: var(--font-num); font-size: 12px; flex: none; }
.ml-delta.up { color: #6fb592; }
.ml-delta.down { color: #d8453a; }
.ml-delta.zero { color: var(--ash); }
#mlMore { margin-top: 4px; }
.ml-note { margin-top: 14px; font-size: 12px; color: var(--ash); line-height: 2; }

@media (max-width: 640px) {
  .user-btn span { display: none; }
  .user-btn { padding: 7px 11px; }
  .prof-top { padding: 20px 18px; gap: 16px; }
  .prof-av { width: 60px; height: 60px; font-size: 30px; }
  .prof-id h3 { font-size: 24px; letter-spacing: 2px; }
  /* 年表在窄屏改为两列网格：日期与图标占一行，事由与加减数换行，
     否则长事由（如「购 沉水贡香、许愿红牌」）会把加减数挤出屏外 */
  .ml-item { display: grid; grid-template-columns: 38px 22px minmax(0, 1fr) auto; gap: 8px; }
  .ml-reason { font-size: 12px; }
}

/* ==================== 后台访客管理 ==================== */
.vis-head {
  display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
  padding: 20px 24px; margin-bottom: 18px;
}
.vis-head h4 { font-family: var(--font-cn); font-weight: 400; font-size: 22px; letter-spacing: 4px; color: var(--gold-hi); margin-bottom: 5px; }
.vis-head p { font-size: 12.5px; color: var(--ash); line-height: 1.9; }
.vis-kpis { margin-left: auto; display: flex; gap: 26px; text-align: right; }
.vis-kpis b { display: block; font-family: var(--font-num); font-size: 26px; color: var(--gold); font-weight: 400; }
.vis-kpis span { font-size: 11px; color: var(--ash); }

.vis-uid {
  font-family: var(--font-num); font-size: 11px; color: var(--gold-dim);
}
.vis-row-guest td { background: rgba(228,185,95,.035); }

.bar-mini {
  display: inline-flex; align-items: center; gap: 7px; justify-content: flex-end;
}
.bar-mini .b { width: 54px; height: 5px; background: rgba(228,185,95,.12); position: relative; }
.bar-mini .b i { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, var(--gold-dim), var(--gold)); }

.detail-row {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px; margin-bottom: 18px;
}
.tag-ua {
  display: inline-block; font-size: 10.5px; padding: 2px 8px; letter-spacing: 1px;
  border: 1px solid var(--line); color: var(--paper-dim);
}
.tag-ua.gold { border-color: var(--gold-dim); color: var(--gold); }

@media (max-width: 640px) {
  .vis-kpis { margin-left: 0; gap: 18px; }
}