/* 员工端：手机宽度优先，桌面上用手机外框展示 */
body.portal { background: var(--sand); }
.stage { min-height: calc(100vh - var(--bar)); min-height: calc(100dvh - var(--bar)); display: flex; align-items: center; justify-content: center; gap: 72px; padding: 24px; }

.intro { max-width: 330px; }
.intro__k { font-size: 13px; font-weight: 600; letter-spacing: .14em; color: var(--forest-2); }
.intro h1 { margin: 8px 0 16px; font-size: 42px; line-height: 1.2; font-weight: 700; }
.intro p { color: var(--muted); }
.intro h2 { margin: 32px 0 12px; font-size: 15px; }
.intro ol { display: grid; gap: 12px; counter-reset: s; }
.intro li { counter-increment: s; position: relative; padding-left: 36px; font-size: 15px; }
.intro li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 3px; background: var(--forest); color: #fff; font-family: var(--num); font-size: 13px; font-weight: 700; }
.intro a { color: var(--forest-2); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

.phone { position: relative; flex: none; width: 392px; height: min(820px, calc(100vh - var(--bar) - 48px)); display: flex; flex-direction: column; border: 6px solid var(--ink); border-radius: 1.75rem; background: var(--cream); overflow: hidden; box-shadow: 0 30px 60px rgba(20, 32, 43, .25); }
.view { flex: 1; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none; }
.view::-webkit-scrollbar { display: none; }
.pg { padding: 20px 18px 28px; }

.tabbar { flex: none; display: grid; grid-template-columns: repeat(4, 1fr); background: var(--paper); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
.tabbar a { display: grid; justify-items: center; gap: 2px; padding: 9px 0 10px; font-size: 11px; color: var(--muted); }
.tabbar a.is-on { color: var(--forest); font-weight: 700; }

/* 手机框内的提示放在顶部，避免挡住底部弹层的按钮 */
.phone .toast { position: absolute; top: 14px; bottom: auto; z-index: 30; transform: translate(-50%, -12px); }
.phone .toast.is-on { transform: translate(-50%, 0); }

/* 标题行 */
.h { display: flex; align-items: baseline; justify-content: space-between; margin: 28px 0 12px; font-size: 18px; font-weight: 700; }
.h a { display: inline-flex; align-items: center; font-size: 13px; font-weight: 400; color: var(--muted); }
.sub { position: sticky; top: 0; z-index: 5; display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; height: 52px; padding: 0 6px; background: rgba(255, 255, 255, .94); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.sub a { width: 44px; height: 44px; display: grid; place-items: center; }
.sub h1 { text-align: center; font-size: 17px; }

/* 首页 */
.hello { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.hello__t { font-size: 22px; font-weight: 700; line-height: 1.3; }
.hello__d { font-size: 13px; color: var(--muted); }
.avatar { flex: none; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; background: var(--amber-soft); color: #6E4A0E; font-weight: 700; }
.avatar--lg { width: 60px; height: 60px; font-size: 22px; }

.wallet { padding: 22px 20px 18px; border-radius: 6px; color: #fff; background: var(--forest); }
.wallet__k { font-size: 13px; color: #A9BDB5; }
.wallet__v { display: block; margin: 2px 0 14px; font-size: 52px; line-height: 1.1; font-weight: 700; }
.wallet__lv { display: flex; justify-content: space-between; margin-bottom: 8px; font-size: 12px; color: #C3D0CB; }
.wallet .bar { height: 6px; background: rgba(255, 255, 255, .18); }
.wallet .bar > i { background: #C9A45C; }
.wallet__act { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 18px; }
.wallet__act > * { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 42px; border-radius: 6px; background: rgba(255, 255, 255, .12); font-size: 13px; font-weight: 600; color: var(--cream); }
.wallet__act > *:hover { background: rgba(255, 255, 255, .2); }
.wallet__act > .is-done { color: #A9BDB5; background: transparent; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .2); cursor: default; }

.impact { margin-top: 14px; padding: 16px 18px; border-radius: 6px; background: var(--paper); border: 1px solid var(--line); }
.impact ul { display: grid; grid-template-columns: repeat(3, 1fr); }
.impact li + li { padding-left: 14px; border-left: 1px solid var(--line); }
.impact b { display: block; font-family: var(--num); font-size: 24px; line-height: 1.2; color: var(--forest); }
.impact span { font-size: 12px; color: var(--muted); }
.impact p { display: flex; gap: 6px; align-items: center; margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--line); font-size: 12px; color: var(--forest-2); }

.hscroll { display: flex; gap: 12px; margin: 0 -18px; padding: 0 18px 4px; overflow-x: auto; scrollbar-width: none; scroll-snap-type: x mandatory; }
.hscroll::-webkit-scrollbar { display: none; }
.mini { flex: none; width: 230px; scroll-snap-align: start; border-radius: 6px; overflow: hidden; background: var(--paper); border: 1px solid var(--line); text-align: left; }
.mini__img { height: 96px; }
.mini__b { padding: 12px 14px 14px; }
.mini h3 { font-size: 15px; line-height: 1.4; }
.mini p { display: flex; justify-content: space-between; margin-top: 6px; font-size: 12px; color: var(--muted); }

.rank { border-radius: 6px; background: var(--paper); border: 1px solid var(--line); overflow: hidden; }
.rank li { display: grid; grid-template-columns: 30px 1fr auto; align-items: center; gap: 10px; padding: 12px 16px; }
.rank li + li { border-top: 1px solid var(--line); }
.rank li.is-me { background: var(--amber-soft); }
.rank__n { font-family: var(--num); font-weight: 700; color: var(--muted); text-align: center; }
.rank li:nth-child(-n+3) .rank__n { color: var(--amber); font-size: 18px; }
.rank__who b { display: block; font-size: 15px; line-height: 1.35; }
.rank__who span { font-size: 12px; color: var(--muted); }

.notice li { display: grid; grid-template-columns: auto 1fr; gap: 12px; padding: 12px 0; font-size: 14px; border-top: 1px solid var(--line); }
.notice time { font-family: var(--num); color: var(--muted); }

/* 活动 */
.pg-title { font-size: 26px; font-weight: 700; margin-bottom: 14px; }
.list { display: grid; gap: 14px; margin-top: 16px; }
.act { border-radius: 6px; overflow: hidden; background: var(--paper); border: 1px solid var(--line); }
.act__open { display: block; width: 100%; text-align: left; }
.act__img { height: 112px; position: relative; }
.act__img .tag { position: absolute; left: 12px; top: 12px; background: rgba(255, 255, 255, .92); }
.act__b { padding: 14px 16px 4px; }
.act h3 { font-size: 17px; line-height: 1.4; }
.meta { display: grid; gap: 4px; margin-top: 8px; font-size: 13px; color: var(--muted); }
.meta li { display: flex; align-items: center; gap: 6px; }
.act__f { display: flex; align-items: center; gap: 10px; padding: 12px 16px 14px; }
.act__f .pts { font-size: 20px; }
.act__f small { font-size: 12px; color: var(--muted); }
.act__f .sp { flex: 1; }

/* 福利 */
.balance { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; padding: 12px 16px; border-radius: 6px; background: var(--amber-soft); font-size: 14px; color: #6E4A0E; }
.balance b { font-family: var(--num); font-size: 22px; }
.goods { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 16px; }
.good { border-radius: 6px; overflow: hidden; background: var(--paper); border: 1px solid var(--line); text-align: left; }
.tile { height: 104px; display: grid; place-items: center; color: var(--forest); background: #ECEFED; border-bottom: 1px solid var(--line); }
.good__b { padding: 12px 14px 14px; }
.good h3 { font-size: 15px; line-height: 1.4; min-height: 2.8em; }
.good p { display: flex; align-items: baseline; justify-content: space-between; margin-top: 6px; font-size: 12px; color: var(--muted); }
.good .pts { font-size: 18px; }

/* 我的 */
.me { display: flex; align-items: center; gap: 14px; }
.me h1 { font-size: 22px; }
.me p { font-size: 13px; color: var(--muted); }
.trio { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 18px; padding: 16px 0; border-radius: 6px; background: var(--paper); border: 1px solid var(--line); text-align: center; }
.trio li + li { border-left: 1px solid var(--line); }
.trio b { display: block; font-family: var(--num); font-size: 24px; line-height: 1.25; }
.trio span { font-size: 12px; color: var(--muted); }
.menu { margin-top: 16px; border-radius: 6px; background: var(--paper); border: 1px solid var(--line); overflow: hidden; }
.menu a { display: flex; align-items: center; gap: 12px; min-height: 54px; padding: 0 16px; font-size: 15px; }
.menu a + a { border-top: 1px solid var(--line); }
.menu a > span { flex: 1; }
.menu a > em { font-style: normal; font-size: 13px; color: var(--muted); }
.menu .ic:first-child { color: var(--forest-2); }
.menu .ic:last-child { color: var(--muted); }

.rows { border-radius: 6px; background: var(--paper); border: 1px solid var(--line); overflow: hidden; }
.row { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 14px 16px; }
.row + .row { border-top: 1px solid var(--line); }
.row h3 { font-size: 15px; font-weight: 600; line-height: 1.45; }
.row time, .row small { font-size: 12px; color: var(--muted); }
.row .d { grid-row: span 2; align-self: center; font-family: var(--num); font-size: 18px; font-weight: 700; }
.row .d.plus { color: var(--forest-2); }
.row .d.minus { color: var(--coral); }
.row .tag { align-self: start; }
.row p { grid-column: 1 / -1; font-size: 13px; color: var(--muted); }
.code { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; margin-top: 6px; padding: 10px 14px; border-radius: 6px; background: var(--cream); font-size: 13px; color: var(--muted); }
.code b { font-family: var(--num); font-size: 20px; letter-spacing: .12em; color: var(--ink); }
.none { padding: 48px 20px; text-align: center; color: var(--muted); font-size: 14px; }
.none .btn { margin-top: 16px; }

.seg { display: grid; grid-template-columns: 1fr 1fr; padding: 4px; border-radius: 6px; background: var(--sand); margin-bottom: 14px; }
.seg button { min-height: 36px; border-radius: 9px; font-size: 14px; color: var(--muted); }
.seg button.is-on { background: var(--paper); color: var(--ink); font-weight: 600; box-shadow: 0 1px 2px rgba(20, 32, 43, .1); }

/* 表单 */
.form { display: grid; gap: 18px; }
.form label { display: grid; gap: 6px; font-size: 14px; font-weight: 600; }
.form select, .form textarea { width: 100%; padding: 12px 14px; border-radius: 6px; border: 1px solid var(--line); background: var(--paper); font-size: 16px; font-weight: 400; }
.form input { width: 100%; padding: 12px 14px; border-radius: 6px; border: 1px solid var(--line); background: var(--paper); font-size: 16px; }
.quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.quick a { display: grid; justify-items: center; gap: 6px; padding: 13px 4px; background: var(--paper); border: 1px solid var(--line); border-radius: 6px; color: var(--forest); font-size: 13px; }
.feature-card { display: block; width: 100%; padding: 16px; text-align: left; background: var(--paper); border: 1px solid var(--line); border-radius: 6px; }
.feature-card h3 { margin: 5px 0; font-size: 16px; }
.feature-card p, .feature-card small { color: var(--muted); font-size: 13px; }
.feature-card strong { display: block; margin-top: 8px; color: var(--forest); }
.feature-note { margin: 0 0 14px; padding: 12px; background: var(--amber-soft); color: #6E4A0E; font-size: 13px; border-radius: 6px; }
.share-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.family-act { margin-top: 20px; border-top: 1px solid var(--line); padding-top: 14px; }
.family-act .note { text-align: left; }
.family-act__row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 8px; }
.course-content { white-space: pre-wrap; margin: 12px 0; }
.sheet-close { margin-top: 18px; }
.message-list { max-height: 240px; overflow-y: auto; margin: 10px 0; }
.message-list article { padding: 10px 0; border-top: 1px solid var(--line); font-size: 13px; }
.message-list time { float: right; color: var(--muted); font-size: 12px; }
.message-list p { margin-top: 4px; white-space: pre-wrap; overflow-wrap: anywhere; }
.family-act .form textarea { min-height: 80px; }
.form textarea { min-height: 120px; resize: vertical; }
.form select:focus, .form textarea:focus { outline: 2px solid var(--leaf); outline-offset: 0; border-color: transparent; }
.form .hint { font-size: 13px; font-weight: 400; color: var(--muted); }
.form .err { font-size: 13px; font-weight: 400; color: var(--coral); }
.upload { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 64px; border-radius: 6px; border: 1px dashed rgba(20, 32, 43, .3); color: var(--muted); font-size: 14px; font-weight: 400; }
.gain { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-radius: 6px; background: var(--amber-soft); font-size: 14px; color: #6E4A0E; }
.gain b { font-family: var(--num); font-size: 20px; }

/* 底部弹层 */
.mask { position: absolute; inset: 0; z-index: 20; display: flex; align-items: flex-end; background: rgba(20, 32, 43, .5); animation: fade .2s; }
.mask[hidden] { display: none; }
.sheet::-webkit-scrollbar { display: none; }
.sheet { width: 100%; max-height: 88%; overflow-y: auto; scrollbar-width: none; border-radius: 8px 8px 0 0; background: var(--paper); animation: up .28s cubic-bezier(.2, .8, .2, 1); }
@keyframes fade { from { opacity: 0; } }
@keyframes up { from { transform: translateY(40px); opacity: 0; } }
.sheet__img { height: 150px; }
.sheet__b { padding: 20px 20px 24px; }
.sheet h2 { font-size: 21px; line-height: 1.35; margin: 8px 0 4px; }
.sheet .desc { margin: 14px 0; font-size: 15px; color: var(--muted); }
.sheet .note { margin-top: 10px; font-size: 12px; color: var(--muted); text-align: center; }
.sheet .acts { display: grid; gap: 10px; margin-top: 18px; }
.kv { display: grid; gap: 8px; padding: 14px 16px; border-radius: 6px; background: var(--cream); font-size: 14px; }
.kv div { display: flex; justify-content: space-between; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-family: var(--num); font-weight: 700; }
.ok { text-align: center; padding-top: 8px; }
.ok__i { width: 60px; height: 60px; margin: 0 auto 12px; display: grid; place-items: center; border-radius: 50%; background: var(--mint); color: var(--forest); }
.ok__c { margin: 18px 0 6px; font-family: var(--num); font-size: 38px; font-weight: 700; letter-spacing: .14em; }

@media (max-width: 900px) { .intro { display: none; } }
@media (max-width: 520px) {
  .stage { padding: 0; }
  .phone { width: 100%; height: calc(100vh - var(--bar)); height: calc(100dvh - var(--bar)); border: 0; border-radius: 0; box-shadow: none; }
}
