/* ============================================================
   Chengfa · 账户首页
   沿用 style.css 的设计变量：正红、近黑、米白、硬边框、硬投影
   整页以纸色为主，深色只用于操作栏与页脚
   ============================================================ */

#app[hidden] { display: none; }

/* ---------- 导航：铺满整屏 ---------- */

.nav__in,
.dock__in {
  width: 100%;
  max-width: none;
  padding-inline: clamp(16px, 2.2vw, 40px);
}

.nav__in {
  height: 62px;
  gap: 22px;
}

.nav .brand { font-size: 24px; }

.hm-nav {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
  min-width: 0;
}

.hm-nav__bal {
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-family: var(--black);
  font-weight: 800;
  font-size: 23px;
  line-height: 1;
  letter-spacing: 0;
}

.hm-nav__bal i {
  font-family: var(--mono);
  font-style: normal;
  font-size: 11px;
  letter-spacing: .14em;
  color: #6A6154;
}

.hm-nav__sep {
  width: 2px;
  height: 18px;
  background: var(--hair);
}

.hm-nav__name {
  font-size: 14px;
  font-weight: 700;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hm-nav__exit {
  border: 2px solid var(--ink);
  background: transparent;
  color: var(--ink);
  padding: 5px 13px;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .06em;
  transition: background .14s, color .14s;
}

.hm-nav__exit:hover {
  background: var(--ink);
  color: var(--paper);
}

/* 语言切换：贴在退出左边，跟退出按钮一个形状，但更轻 */
.hm-nav__lang {
  border: 2px solid var(--hair);
  color: var(--gray);
  padding: 4px 10px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .08em;
  line-height: 1.4;
  text-decoration: none;
  transition: border-color .14s, color .14s;
}

.hm-nav__lang:hover {
  border-color: var(--ink);
  color: var(--ink);
}

/* ---------- 操作栏：常驻目录 ---------- */

.dock {
  background: var(--ink);
  color: var(--paper);
  border-bottom: 3px solid var(--ink);
}

.dock__in {
  display: flex;
  flex-wrap: wrap;
}

.dock__i {
  flex: 1 1 auto;
  display: flex;
  align-items: baseline;
  gap: 7px;
  padding: 13px 15px;
  border: 0;
  border-right: 1px solid rgba(var(--paper-rgb), .14);
  background: transparent;
  color: inherit;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .02em;
  text-align: left;
  white-space: nowrap;
  transition: background .14s ease;
}

.dock__i:last-child { border-right: 0; }
.dock__i:hover { background: var(--red); }

.dock__n {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: .1em;
  color: var(--red);
}

.dock__i:hover .dock__n { color: rgba(var(--paper-rgb), .8); }

/* ---------- 门面 ---------- */

.face { padding: 36px 0 0; }

.face__in {
  display: grid;
  grid-template-columns: 1.12fr .88fr;
  border: var(--edge);
  background: var(--paper);
}

.face__id {
  padding: clamp(24px, 3.2vw, 44px);
  border-right: var(--edge);
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.face__meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.face__uid {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .16em;
  color: var(--gray);
}

.face__uid b {
  color: var(--ink);
  font-size: 13px;
  letter-spacing: .02em;
}

.face__role {
  display: inline-block;
  padding: 3px 10px 3px 9px;
  background: var(--role-bg, var(--gray));
  color: var(--paper);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .14em;
  transform: rotate(-2deg);
}

.face__name {
  margin: 20px 0 10px;
  font-size: clamp(34px, 4.4vw, 62px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -.045em;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.face__sub {
  margin: 0;
  font-size: 12px;
  letter-spacing: .06em;
  color: var(--gray);
}

.face__dot {
  margin: 0 8px;
  color: var(--hair);
}

.face__foot {
  margin-top: auto;
  padding-top: 26px;
}

/* 简介：点击即改 */

.face__motto {
  margin: 0;
  max-width: 52ch;
  min-height: 2em;
  padding: 10px 14px;
  border-left: 4px solid var(--red);
  font-size: 15px;
  line-height: 1.75;
  color: var(--ink);
  outline: none;
  cursor: text;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  transition: background .14s ease, box-shadow .14s ease;
}

.face__motto:hover { background: var(--paper-2); }

.face__motto.is-empty::before {
  content: "点击填写个人简介";
  color: var(--gray);
}

.face__motto.is-editing {
  background: var(--paper);
  box-shadow: 4px 4px 0 var(--red);
  cursor: text;
}

.face__motto.is-editing::before { content: none; }

.face__hint {
  display: block;
  margin-top: 8px;
  padding-left: 18px;
  font-size: 11px;
  letter-spacing: .08em;
  color: var(--gray);
  opacity: 0;
  transition: opacity .16s ease;
}

.face__foot:hover .face__hint,
.face__motto:focus + .face__hint { opacity: 1; }

/* 余额：改用纸色，靠边框与红杠分层 */

.face__bal {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: clamp(24px, 3.2vw, 44px);
  padding-left: clamp(20px, 2.6vw, 36px);
  background: var(--paper-2);
  color: var(--ink);
  min-width: 0;
  overflow: hidden;
}

.face__bal-k {
  font-size: 11px;
  letter-spacing: .2em;
  color: var(--gray);
}

.face__bal-n {
  margin: 14px 0 0;
  font-family: var(--black);
  font-weight: 800;
  font-size: clamp(46px, 6vw, 96px);
  line-height: .92;
  letter-spacing: .005em;
  color: var(--ink);
  word-break: break-all;
}

/* 位数多时收一号字，避免大额余额撑破右列 */
.face__bal-n.is-long { font-size: clamp(34px, 4.4vw, 70px); }

.face__bal-n::after {
  content: "";
  display: block;
  width: 76px;
  height: 8px;
  margin-top: 12px;
  background: var(--red);
}

.face__bal-f {
  margin-top: 14px;
  font-size: 14px;
  letter-spacing: .04em;
  color: var(--gray);
}

.face__bal-tag {
  margin-left: 8px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .14em;
  color: #6A6154;
}

.face__acts {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: auto;
  padding-top: 28px;
}

.face__acts .btn {
  padding: 12px 24px;
  font-size: 14px;
  box-shadow: 5px 5px 0 var(--ink);
}

.face__acts .btn:hover { box-shadow: 8px 8px 0 var(--ink); }
.face__acts .btn:active { box-shadow: 1px 1px 0 var(--ink); }

.face__acts .btn--ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
  box-shadow: 5px 5px 0 var(--ink);
}

/* 数据条 */

.face__strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: var(--edge);
  border-top: 0;
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 20px clamp(12px, 1.8vw, 26px);
  border-right: 1px solid var(--hair);
  min-width: 0;
}

.stat:last-child { border-right: 0; }

.stat__n {
  font-family: var(--black);
  font-weight: 800;
  font-size: clamp(25px, 2.7vw, 36px);
  line-height: 1.05;
  letter-spacing: .01em;
  white-space: nowrap;
}

.stat__t {
  font-size: 11px;
  letter-spacing: .1em;
  color: var(--gray);
}

.stat--level .stat__n {
  display: flex;
  align-items: baseline;
  gap: 5px;
}

.stat__lv {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: .1em;
  color: var(--gray);
}

.stat__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.stat__exp {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 9px;
}

.stat__bar {
  display: block;
  height: 15px;
  margin-top: 9px;
  border: 2px solid var(--ink);
  background: var(--paper);
}

.stat__bar i {
  display: block;
  height: 100%;
  width: 0;
  background: var(--red);
  transition: width .55s cubic-bezier(.2, .8, .3, 1);
}

.stat__x {
  font-family: var(--num);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: .02em;
  color: #4A453A;
  white-space: nowrap;
}

/* ---------- 公告 ---------- */

.prog { padding: 28px 0 0; }

.prog__note {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  border: 3px solid var(--ink);
  background: var(--paper-2);
}

.prog__note .stamp { flex-shrink: 0; }

.prog__note p {
  margin: 0;
  font-size: 13px;
  line-height: 1.75;
}

/* ---------- 问卷大厅 ---------- */

.hall {
  margin-top: 56px;
  padding: 52px 0 64px;
  background: var(--paper-2);
  color: var(--ink);
  border-top: var(--edge);
}

.hall__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 24px;
  border-bottom: 3px solid var(--ink);
}

.hall__k {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .24em;
  color: var(--red-deep);
}

.hall__t {
  margin: 8px 0 0;
  font-size: clamp(30px, 4vw, 52px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -.04em;
}

.hall__count { text-align: right; }

.hall__count b {
  display: block;
  font-family: var(--black);
  font-weight: 800;
  font-size: clamp(42px, 4.8vw, 68px);
  line-height: 1;
  letter-spacing: -.01em;
  color: var(--red);
}

.hall__count span {
  font-size: 11px;
  letter-spacing: .12em;
  color: var(--gray);
}

.hall__body {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  border: 3px solid var(--ink);
  border-top: 0;
  background: var(--paper);
}

.hall__empty {
  padding: clamp(24px, 3.4vw, 48px);
  border-right: 3px solid var(--ink);
  min-width: 0;
}

.hall__empty-t {
  margin: 0 0 12px;
  font-size: clamp(20px, 2.2vw, 28px);
  font-weight: 700;
  letter-spacing: -.02em;
  line-height: 1.3;
}

.hall__empty-d {
  margin: 0 0 28px;
  max-width: 48ch;
  font-size: 14px;
  line-height: 1.85;
  color: #5C564A;
}

.hall .btn--red { box-shadow: 6px 6px 0 var(--ink); }
.hall .btn--red:hover { box-shadow: 9px 9px 0 var(--ink); }
.hall .btn--red:active { box-shadow: 1px 1px 0 var(--ink); }

.hall__steps {
  margin: 0;
  padding: 0;
  list-style: none;
  background: var(--paper-2);
}

.hall__steps li {
  display: grid;
  grid-template-columns: 42px 1fr;
  grid-template-areas:
    "n t"
    ". d";
  gap: 4px 12px;
  padding: 20px clamp(18px, 2.4vw, 28px);
  border-bottom: 1px solid rgba(var(--ink-rgb), .16);
}

.hall__steps li:last-child { border-bottom: 0; }

.hall__steps-n {
  grid-area: n;
  font-family: var(--black);
  font-size: 20px;
  line-height: 1.35;
  color: var(--red);
}

.hall__steps-t {
  grid-area: t;
  font-size: 14px;
  font-weight: 700;
}

.hall__steps-d {
  grid-area: d;
  font-size: 12.5px;
  line-height: 1.7;
  color: #5C564A;
}

.hall__tail {
  margin: 22px 0 0;
  font-size: 13px;
  color: #5C564A;
}

.hall__tail a {
  color: var(--ink);
  padding-bottom: 2px;
  border-bottom: 2px solid var(--red);
}

/* ---------- 载入与提示 ---------- */

.hm-load {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: var(--paper);
  font-size: 12px;
  letter-spacing: .16em;
  color: var(--gray);
}

.hm-load[hidden] { display: none; }

.hm-load__mark {
  width: 13px;
  height: 13px;
  background: var(--red);
  animation: hm-spin 1.2s linear infinite;
}

@keyframes hm-spin {
  from { transform: rotate(0); }
  to   { transform: rotate(360deg); }
}

.hm-toast {
  position: fixed;
  left: 50%;
  bottom: 32px;
  z-index: 210;
  max-width: calc(100vw - 40px);
  padding: 12px 22px;
  border: 3px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  box-shadow: 6px 6px 0 var(--red);
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  opacity: 0;
  transform: translate(-50%, 16px);
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
}

.hm-toast.is-on {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ---------- 页脚 ---------- */

.foot {
  border-top: 3px solid rgba(var(--paper-rgb), .16);
  padding-top: 28px;
}

.foot__bar--single { padding-top: 0; }

/* ---------- 响应式 ---------- */

@media (max-width: 900px) {
  .face__in { grid-template-columns: 1fr; }
  .face__id { border-right: 0; }
  .face__bal { border-top: var(--edge); }
  .face__foot { padding-top: 22px; }
}

@media (max-width: 860px) {
  .nav__in { height: 64px; gap: 16px; }
  .nav .brand { font-size: 22px; }
  .hm-nav__bal { font-size: 22px; }
  .dock__i { flex: 1 1 33.333%; padding: 15px 16px; font-size: 14px; }
  .face__strip { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(even) { border-right: 0; }
  .stat:nth-child(1),
  .stat:nth-child(2) { border-bottom: 1px solid var(--hair); }
  .hall__head { flex-direction: column; align-items: flex-start; gap: 14px; }
  .hall__count { text-align: left; }
  .hall__count b { font-size: 40px; }
}

@media (max-width: 760px) {
  .hall__body { grid-template-columns: 1fr; }
  .hall__empty { border-right: 0; border-bottom: 3px solid var(--ink); }
}

@media (max-width: 620px) {
  .face { padding-top: 22px; }
  .nav__in { height: 58px; }
  .nav .brand { font-size: 20px; }
  .nav .brand__en { display: none; }
  .hm-nav { gap: 10px; }
  .hm-nav__sep { display: none; }
  .hm-nav__bal { font-size: 19px; }
  .hm-nav__name { display: none; }
  .hm-nav__exit { padding: 5px 10px; font-size: 11px; }

  .dock__i { flex: 1 1 50%; padding: 13px 14px; font-size: 13px; }
  .dock__i:nth-child(even) { border-right: 0; }
  .dock__i:last-child:nth-child(odd) { flex-basis: 100%; }

  .face__acts .btn { flex: 1 1 auto; justify-content: center; }

  .hall { margin-top: 36px; padding: 36px 0 48px; }
  .hall__steps li { padding: 16px 18px; }

  .prog__note { flex-direction: column; align-items: flex-start; gap: 12px; }

}


/* 导航栏币种开关：点一下在乘法币 / 乘法刀之间切换 */
.hm-nav__cur {
  display: inline-flex;
  align-items: center;
  align-self: center;
  padding: 4px 9px;
  border: 1px solid currentColor;
  background: transparent;
  color: inherit;
  opacity: .72;
  font-family: var(--sans);
  font-size: 11.5px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: .06em;
  cursor: pointer;
  transition: opacity .14s ease, color .14s ease, border-color .14s ease;
}

.hm-nav__cur:hover {
  opacity: 1;
  color: var(--red);
  border-color: var(--red);
}

.hm-nav__cur:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 2px;
}

/* 当前所在分区：账户子页面靠这一条知道自己站在哪
   （home 上的目录都是「去别处」，没有当前项，不加 is-on） */
.dock__i.is-on {
  background: var(--red);
  cursor: default;
}

.dock__i.is-on .dock__n { color: rgba(var(--paper-rgb), .82); }

/* 八个入口在窄屏排成三行：3 + 3 + 2，比让 flex 自己挤更整齐 */
@media (max-width: 640px) {
  .dock__i {
    flex: 1 1 33.33%;
    padding: 10px 12px;
    font-size: 13px;
  }
  .dock__n { font-size: 10px; }
}
