/* PHP 子页面样式（在 style.css 基础上） */
body.sub { background: #f6f3ee; }
.page { padding-top: 20px; padding-bottom: 30px; min-height: 60vh; }
.topbar .hi { color: #fff; font-weight: 600; }
.topbar form.inline { display: inline; }
.topbar form.inline button { color: #bbb; font-size: 12px; background: none; border: 0; cursor: pointer; padding: 0; }
.topbar form.inline button:hover { color: #fff; }

.alert { margin: 0 0 16px; padding: 12px 16px; border-radius: 8px; border: 1px solid; font-size: 14px; }
.alert.ok { background: #f0faf2; border-color: #b9e3c3; color: #1f7a37; }
.alert.err { background: #fff3f0; border-color: #f5c1b5; color: #b3261e; }
.alert.info { background: #fff8ec; border-color: #f3d6a8; color: #8a5300; }

.two { display: grid; grid-template-columns: 220px 1fr; gap: 20px; align-items: start; }
.side ul { display: grid; gap: 2px; }
.side a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 6px; color: #555; font-size: 14px; }
.side a .ic { color: #bbb; }
.side a:hover, .side a.on { background: #fcf0e3; color: #a9410d; }
.side a.on .ic, .side a:hover .ic { color: #f5761f; }

.panel { padding: 22px 28px 28px; }
.panel .lead { color: #777; font-size: 14px; margin: -4px 0 18px; line-height: 1.7; }
.fm { max-width: 520px; }
.fm-row { display: grid; grid-template-columns: 110px 1fr; align-items: center; gap: 12px; margin-bottom: 14px; font-size: 14px; color: #555; }
.fm-row > span:first-child { text-align: right; }
.fm-row input, .fm-row select, .fm-row textarea { width: 100%; height: 40px; padding: 0 12px; border: 1px solid #ddd; border-radius: 6px; font: inherit; color: #333; background: #fff; }
.fm-row textarea { height: auto; min-height: 120px; padding: 10px 12px; resize: vertical; }
.fm-row input:focus, .fm-row select:focus, .fm-row textarea:focus { outline: 0; border-color: #f5761f; box-shadow: 0 0 0 3px rgba(245,118,31,.12); }
.fm-row.top { align-items: start; }
.fm-row.top > span:first-child { padding-top: 10px; }
.fm-cap { display: flex; gap: 10px; align-items: center; }
.fm-cap input { flex: 1; min-width: 0; text-transform: uppercase; }
.fm-cap img { flex: none; border-radius: 6px; border: 1px solid #eee; cursor: pointer; }
.fm-hint { padding-left: 122px; margin: -8px 0 14px; font-size: 12px; color: #999; }
.fm-sec { margin: 22px 0 14px; padding-top: 16px; border-top: 1px dashed #e8e0d4; font-size: 15px; font-weight: 600; color: #333; }
.fm-act { padding-left: 122px; display: flex; gap: 16px; align-items: center; font-size: 13px; }
.fm-act .btn-main { width: 180px; }
.fm-radio { display: flex; gap: 18px; }
.fm-radio label { display: flex; gap: 6px; align-items: center; }
.fm-radio input { width: auto; height: auto; }

.auth { max-width: 460px; margin: 10px auto 0; }
.auth .fm-row { grid-template-columns: 80px 1fr; }
.auth .fm-act, .auth .fm-hint { padding-left: 92px; }
/* 登录框比较窄：按钮占满一行，「注册帐号」「找回密码」放在按钮下面一行，不折行 */
.fm-act a { white-space: nowrap; }
.auth .fm-act { flex-wrap: wrap; gap: 10px 18px; }
.auth .fm-act .btn-main { width: 100%; }

.kv { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; margin-bottom: 20px; }
.kv div { padding: 14px 16px; background: #fbf8f3; border: 1px solid #efe7dc; border-radius: 8px; }
.kv em { display: block; font-style: normal; font-size: 12px; color: #999; margin-bottom: 4px; }
.kv b { font-size: 18px; color: #333; }
.quick { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.quick a { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border: 1px solid #eee; border-radius: 8px; color: #555; }
.quick a:hover { border-color: #f5761f; color: #a9410d; }
.quick .ic { color: #f5761f; }

.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th, .tbl td { padding: 10px 12px; border-bottom: 1px solid #f0ebe3; text-align: left; }
.tbl th { background: #fbf6ef; color: #8a5a2b; font-weight: 600; }
.tbl td.num, .tbl th.num { text-align: right; font-variant-numeric: tabular-nums; }
.tbl tr:nth-child(-n+4) td.rk b { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: #f5761f; color: #fff; font-size: 12px; }

.tabs-line { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.tabs-line a { padding: 5px 14px; border: 1px solid #e5ddd1; border-radius: 16px; font-size: 13px; color: #666; background: #fff; }
.tabs-line a.on, .tabs-line a:hover { border-color: #f5761f; background: #f5761f; color: #fff; }

.nlist li { display: flex; align-items: center; gap: 14px; padding: 10px 4px; border-bottom: 1px dashed #eee; font-size: 15px; }
.nlist li a { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nlist li a:hover { color: #f5761f; }
.nlist li a { flex: 0 1 auto; }
/* 日历式日期：大号日 + 小号年月，7 天内用红色 */
.nlist time.cal { flex: none; order: -1; width: 64px; border-radius: 6px; overflow: hidden; text-align: center; background: #fff; border: 1px solid #f3c9a6; font-variant-numeric: tabular-nums; }
.nlist time.cal b { display: block; font-size: 22px; line-height: 30px; color: #c4500c; }
.nlist time.cal em { display: block; font-style: normal; font-size: 11px; line-height: 18px; color: #fff; background: #f5761f; }
.nlist time.cal.recent { border-color: #f0a29d; }
.nlist time.cal.recent b { color: #e8382f; }
.nlist time.cal.recent em { background: #e8382f; }
.article h1 { font-size: 22px; margin-bottom: 8px; color: #222; }
.article .meta { color: #999; font-size: 13px; margin-bottom: 18px; padding-bottom: 14px; border-bottom: 1px solid #f0ebe3; }
.article .meta time.nd { font-size: 13px; padding: 3px 10px; }
.article .body { line-height: 1.9; font-size: 15px; color: #333; overflow-wrap: anywhere; }
.article .body img { max-width: 100%; height: auto; }
.article .body p { margin-bottom: 1em; }

.pg { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; justify-content: center; margin-top: 18px; font-size: 13px; }
.pg a, .pg span, .pg b { min-width: 34px; padding: 6px 10px; border: 1px solid #e5ddd1; border-radius: 6px; text-align: center; background: #fff; }
.pg span { color: #ccc; }
.pg b { background: #f5761f; border-color: #f5761f; color: #fff; }
.pg em { font-style: normal; color: #999; margin-left: 6px; }

.faces { display: grid; grid-template-columns: repeat(auto-fill, minmax(52px, 1fr)); gap: 6px; max-height: 330px; overflow: auto; padding: 8px; border: 1px solid #eee; border-radius: 8px; }
.faces label { position: relative; display: grid; place-items: center; padding: 4px; border: 2px solid transparent; border-radius: 6px; cursor: pointer; }
.faces input { position: absolute; opacity: 0; }
.faces img { width: 40px; height: 40px; image-rendering: pixelated; }
.faces input:checked + img { outline: 2px solid #f5761f; outline-offset: 3px; border-radius: 4px; }
.faces input:focus-visible + img { outline: 2px dashed #f5761f; }

.qa { padding: 14px 0; border-bottom: 1px dashed #eee; font-size: 14px; line-height: 1.8; }
.qa p b { color: #a9410d; margin-right: 6px; }
.qa .re { margin-top: 6px; padding: 8px 12px; background: #fbf8f3; border-radius: 6px; color: #555; }

.rules { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.rule { padding: 18px 20px; }
.rule header { display: flex; gap: 12px; align-items: center; margin-bottom: 10px; }
.rule header img { width: 48px; height: 48px; object-fit: contain; }
.rule h2 { font-size: 17px; }
.rule header em { font-style: normal; font-size: 12px; color: #999; }
.rule p { font-size: 14px; color: #666; line-height: 1.7; margin-bottom: 8px; }
.rule ol { padding-left: 20px; list-style: decimal; font-size: 13px; color: #555; line-height: 1.8; }
.rule .basis { margin-top: 8px; font-size: 12px; color: #aaa; }
.dl-list li { display: flex; align-items: center; gap: 12px; padding: 10px 4px; border-bottom: 1px solid #f3eee6; }
.dl-list li img { width: 40px; height: 40px; object-fit: contain; }
.dl-list li div { flex: 1; min-width: 0; }
.dl-list li em { display: block; font-style: normal; font-size: 12px; color: #999; }
.code-big { display: inline-block; margin: 6px 0 10px; padding: 8px 18px; font-size: 26px; letter-spacing: 6px; font-weight: 700; color: #e8382f; background: #fff3f0; border: 1px dashed #f5c1b5; border-radius: 8px; }

@media (max-width: 900px) {
  .two { grid-template-columns: 1fr; }
  .side ul { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
}
@media (max-width: 560px) {
  .panel { padding: 16px; }
  .fm-row, .auth .fm-row { grid-template-columns: 1fr; gap: 6px; }
  .fm-row > span:first-child { text-align: left; }
  .fm-row.top > span:first-child { padding-top: 0; }
  .fm-hint, .auth .fm-hint { padding-left: 0; margin-top: -6px; }
  .fm-act, .auth .fm-act { padding-left: 0; flex-wrap: wrap; }
  .fm-act .btn-main { width: 100%; }
  .tbl { font-size: 13px; }
  .tbl th, .tbl td { padding: 8px 6px; }
}

/* 首页登录框验证码 */
.login .field.cap { padding-right: 4px; }
.login .field.cap input { text-transform: uppercase; }
.login .field.cap img { flex: none; height: 32px; border-radius: 4px; cursor: pointer; }
.topbar-r .hi { color: #fff; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* 首页：已登录时的用户信息卡（替换登录框） */
.ucard .uc-head { display: flex; gap: 14px; align-items: center; padding-bottom: 16px; margin-bottom: 14px; border-bottom: 1px solid #f0ebe3; }
.ucard .uc-head img { width: 56px; height: 56px; border-radius: 50%; border: 2px solid #fcd9b8; background: #fff8ef; object-fit: cover; }
.ucard .uc-head div { min-width: 0; }
.ucard .uc-head b { display: block; font-size: 17px; color: #333; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ucard .uc-head em { display: block; font-style: normal; font-size: 12px; color: #999; margin-top: 2px; }
.ucard .uc-links { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 16px; }
.ucard .uc-links a { display: flex; align-items: center; gap: 6px; padding: 8px 10px; border: 1px solid #eee; border-radius: 6px; font-size: 13px; color: #555; }
.ucard .uc-links a:hover { border-color: #f5761f; color: #a9410d; }
.ucard .uc-links .ic { color: #f5761f; }
.ucard .btn-main { display: grid; place-items: center; }
.ucard .uc-out { text-align: center; margin-top: 10px; }
.ucard .uc-out button { background: none; border: 0; font-size: 13px; color: #999; cursor: pointer; }
.ucard .uc-out button:hover { color: #f5761f; }

/* 充值中心（仅展示） */
.pay { max-width: 760px; margin: 10px auto 0; }
.pay-note { display: flex; align-items: center; gap: 8px; margin: 0 0 20px; padding: 10px 14px; border-radius: 8px; background: #fff8ec; border: 1px solid #f3d6a8; color: #8a5300; font-size: 14px; }
.pay-fm { max-width: none; }
.pay-amounts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.pay-methods { display: flex; flex-wrap: wrap; gap: 10px; }
.pay-amt, .pay-way { position: relative; cursor: pointer; }
.pay-amt input, .pay-way input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.pay-amt span, .pay-way span { display: flex; align-items: center; justify-content: center; gap: 6px; height: 52px; padding: 0 18px; border: 1px solid #ddd; border-radius: 8px; background: #fff; color: #555; font-size: 14px; transition: border-color .15s, background .15s; }
.pay-amt b { font-size: 22px; color: #333; font-family: Arial, sans-serif; }
.pay-way span { height: 44px; min-width: 128px; }
.pay-way .ic { font-size: 18px; color: #f5761f; }
.pay-amt:hover span, .pay-way:hover span { border-color: #f3b98a; }
.pay-amt input:checked + span, .pay-way input:checked + span { border-color: #f5761f; background: #fff3ea; box-shadow: 0 0 0 1px #f5761f inset; }
.pay-amt input:checked + span b { color: #e35d0a; }
.pay-amt input:focus-visible + span, .pay-way input:focus-visible + span { outline: 2px solid #f5761f; outline-offset: 2px; }
.pay .fm-act .btn-main { width: 220px; }
.pay-tips { margin-top: 26px; padding-top: 18px; border-top: 1px dashed #eee; color: #777; font-size: 13px; line-height: 1.9; }
.pay-tips h2 { font-size: 15px; color: #444; margin-bottom: 6px; }
.pay-tips ol { padding-left: 20px; }
.pay-tips a { color: #f5761f; }
@media (max-width: 560px) { .pay-amounts { grid-template-columns: repeat(2, 1fr); } .pay-way span { min-width: 0; } }
