/* ==========================================================
   五育积分兑换机 · 交互Demo
   机柜按 560 x 1560 固定画布设计，JS 整体缩放适配视口
   屏幕内容画布：470 x 858
   ========================================================== */

* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --green: #12A15D;
  --green-deep: #0B7A45;
  --green-ink: #123B26;
  --ink: #2E3A32;
  --muted: #7d8b81;
  --shadow-card: 0 8px 24px rgba(23, 84, 53, .12);
  --font: "PingFang SC", "Microsoft YaHei UI", "Microsoft YaHei", "Source Han Sans SC", sans-serif;
}

html, body { height: 100%; }

body {
  font-family: var(--font);
  overflow: hidden;
  -webkit-user-select: none;
  user-select: none;
}

/* ---------- 大厅环境 ---------- */
.hall {
  position: fixed; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background:
    radial-gradient(60% 42% at 12% 8%, rgba(255, 252, 235, .85), transparent 60%),
    radial-gradient(52% 40% at 88% 12%, rgba(224, 244, 255, .9), transparent 60%),
    linear-gradient(180deg, #cfe7da 0%, #e9f1e8 54%, #d9cfbe 54.3%, #c9bda9 100%);
}
.hall::before {
  content: ""; position: absolute; left: 6%; top: 10%;
  width: 15vw; height: 34vh; border-radius: 14px;
  background: linear-gradient(160deg, rgba(255,255,255,.55), rgba(255,255,255,.12));
  transform: skewY(6deg); filter: blur(2px);
}
.hall::after {
  content: ""; position: absolute; right: 7%; top: 14%;
  width: 12vw; height: 30vh; border-radius: 14px;
  background: linear-gradient(200deg, rgba(255,255,255,.5), rgba(255,255,255,.1));
  transform: skewY(-6deg); filter: blur(2px);
}

/* ---------- 机柜缩放容器（主柜 560 + 间距 500 + 组合机 1180 = 2240） ---------- */
.machine-scale {
  width: 2240px; height: 1560px; flex: none;
  transform-origin: center center;
  position: relative; z-index: 2;
}

.machine {
  position: absolute; left: 0; top: 0; width: 560px; height: 1560px;
  filter: drop-shadow(0 30px 40px rgba(40, 45, 35, .35));
}

/* 柜身 */
.cab {
  position: absolute; inset: 0;
  border-radius: 30px;
  background: linear-gradient(115deg, #ffffff 0%, #fbfcf9 55%, #e9ede6 100%);
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.8), inset -10px 0 24px rgba(90, 105, 90, .10);
}
.cab::after { /* 上下分缝 */
  content: ""; position: absolute; left: 10px; right: 10px; top: 928px; height: 2px;
  background: linear-gradient(90deg, transparent, #d8ded4 18%, #d8ded4 82%, transparent);
}

/* ---------- 触摸屏 ---------- */
.bezel {
  position: absolute; left: 30px; top: 34px;
  width: 500px; height: 888px;
  background: linear-gradient(160deg, #23262a, #101214);
  border-radius: 26px;
  padding: 15px;
  box-shadow: 0 8px 20px rgba(20, 30, 24, .35), inset 0 1px 2px rgba(255,255,255,.25);
}
.cam {
  position: absolute; top: 4px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 7px; align-items: center;
}
.cam i { width: 5px; height: 5px; border-radius: 50%; background: #3a3f45; }
.cam .lens { width: 9px; height: 9px; background: radial-gradient(circle at 35% 35%, #4a6fa5, #10141c 70%); }

.screen {
  position: relative; width: 470px; height: 858px;
  border-radius: 12px; overflow: hidden;
  background: linear-gradient(180deg, #bfe7fb 0%, #e2f4fe 46%, #eef9ff 100%);
  cursor: default;
}

/* 屏幕共用背景插画 */
.screen-bg { position: absolute; inset: 0; pointer-events: none; }
.screen-bg img {
  position: absolute; bottom: 0; left: 0; width: 100%; display: block;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 26%);
  mask-image: linear-gradient(to bottom, transparent 0, #000 26%);
}

/* ---------- 屏幕页面通用 ---------- */
.page {
  position: absolute; inset: 0; overflow-y: auto; overflow-x: hidden;
  display: none; z-index: 2;
}
.page.active { display: block; animation: pageIn .38s ease both; }
@keyframes pageIn {
  from { opacity: 0; transform: translateX(26px); }
  to   { opacity: 1; transform: none; }
}
.page::-webkit-scrollbar { display: none; }

.page-inner { padding: 18px 20px 26px; display: flex; flex-direction: column; gap: 14px; position: relative; z-index: 2; }

/* ---------- 待机屏 ---------- */
.idle {
  position: absolute; inset: 0; z-index: 2;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 18px; text-align: center; cursor: pointer; padding-bottom: 120px;
}
.idle-logo { width: 120px; height: 120px; border-radius: 50%; overflow: hidden; box-shadow: var(--shadow-card); animation: float 3.2s ease-in-out infinite; }
.idle-logo img { width: 100%; height: 100%; }
.idle h1 {
  font-size: 52px; font-weight: 900; letter-spacing: 4px;
  background: linear-gradient(180deg, #2fb673, var(--green-deep));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  text-shadow: 0 2px 0 rgba(255,255,255,.4);
}
.idle-slogan {
  font-size: 20px; color: #35624a; background: rgba(255,255,255,.72);
  padding: 8px 22px; border-radius: 999px; transition: opacity .4s;
}
.idle-hint {
  margin-top: 14px; font-size: 22px; font-weight: 800; color: #fff;
  background: linear-gradient(180deg, #23b06b, var(--green-deep));
  padding: 12px 34px; border-radius: 999px; box-shadow: 0 8px 20px rgba(14, 122, 69, .35);
  animation: breath 1.8s ease-in-out infinite;
}
.idle-foot { margin-top: 6px; font-size: 14px; color: #5f7d6c; }
@keyframes breath { 0%,100% { transform: scale(1); box-shadow: 0 8px 20px rgba(14,122,69,.35); } 50% { transform: scale(1.05); box-shadow: 0 10px 26px rgba(14,122,69,.5); } }
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

/* ---------- 登录屏 ---------- */
.login { position: absolute; inset: 0; z-index: 2; display: grid; place-items: center; padding-bottom: 100px; }
.login-card {
  width: 360px; background: rgba(255,255,255,.92); border-radius: 26px;
  box-shadow: var(--shadow-card); padding: 30px 26px 24px; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
}
.reader { position: relative; width: 150px; height: 150px; display: grid; place-items: center; }
.face-box {
  position: relative; width: 150px; height: 150px; border-radius: 18px;
  background: linear-gradient(180deg, #eef9f2, #d9efe3);
  display: grid; place-items: center; overflow: hidden;
  box-shadow: inset 0 0 0 2px rgba(18,161,93,.14);
}
.face-sil { width: 92px; opacity: .92; }
.corner { position: absolute; width: 24px; height: 24px; border: 4px solid var(--green); }
.corner.tl { left: 7px; top: 7px; border-right: none; border-bottom: none; border-radius: 10px 0 0 0; }
.corner.tr { right: 7px; top: 7px; border-left: none; border-bottom: none; border-radius: 0 10px 0 0; }
.corner.bl { left: 7px; bottom: 7px; border-right: none; border-top: none; border-radius: 0 0 0 10px; }
.corner.br { right: 7px; bottom: 7px; border-left: none; border-top: none; border-radius: 0 0 10px 0; }
.scanline {
  position: absolute; left: 10px; right: 10px; top: 20px; height: 5px; border-radius: 3px;
  background: linear-gradient(90deg, transparent, #35e08a 30%, #35e08a 70%, transparent);
  box-shadow: 0 0 12px rgba(53, 224, 138, .85);
  animation: scan 2.6s ease-in-out infinite;
}
@keyframes scan { 0%, 100% { top: 16px; } 50% { top: 128px; } }
.reader-state { position: absolute; inset: 0; display: none; place-items: center; z-index: 3; }
.reader-state.show { display: grid; }
.reader-state .spin {
  width: 74px; height: 74px; border-radius: 50%;
  border: 6px solid rgba(18,161,93,.18); border-top-color: var(--green);
  animation: spin .8s linear infinite; background: rgba(255,255,255,.9);
}
.reader-state .ok {
  width: 74px; height: 74px; border-radius: 50%; background: #2fb673; color: #fff;
  display: grid; place-items: center; font-size: 42px; font-weight: 900;
  animation: pop .35s ease both;
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pop { from { transform: scale(.4); opacity: 0; } 70% { transform: scale(1.12); } to { transform: scale(1); opacity: 1; } }
.login-card h2 { font-size: 24px; color: var(--ink); }
.login-card p { font-size: 15px; color: var(--muted); }
.btn-pill {
  border: none; cursor: pointer; font-family: inherit;
  background: linear-gradient(180deg, #23b06b, var(--green-deep));
  color: #fff; font-size: 20px; font-weight: 800; letter-spacing: 2px;
  padding: 12px 42px; border-radius: 999px;
  box-shadow: 0 8px 18px rgba(14,122,69,.35);
  transition: transform .12s;
}
.btn-pill:active { transform: scale(.95); }
.reset-link { font-size: 13px; color: #9ab0a3; text-decoration: underline; cursor: pointer; }

/* ---------- 主页 ---------- */
.home-inner { gap: 16px; padding-top: 22px; }
.home-head { text-align: center; position: relative; }
.home-title-chip {
  display: inline-block; background: rgba(255,255,255,.78);
  border-radius: 18px; padding: 10px 30px 12px; box-shadow: 0 6px 18px rgba(23,84,53,.10);
}
.home-title-chip h1 {
  font-size: 42px; font-weight: 900; letter-spacing: 3px;
  background: linear-gradient(180deg, #2fb673, var(--green-deep));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.home-sub { margin-top: 9px; display: inline-flex; }
.home-sub span {
  background: linear-gradient(180deg, #23b06b, var(--green-deep));
  color: #fff; font-size: 16px; letter-spacing: 3px;
  padding: 5px 22px 6px; border-radius: 999px;
  box-shadow: 0 5px 14px rgba(14,122,69,.3);
}
.leaf { position: absolute; opacity: .9; }
.leaf svg { width: 32px; height: 32px; display: block; }
.leaf.l1 { left: 2px; top: -6px; transform: rotate(-18deg); }
.leaf.l2 { right: 2px; top: 26px; transform: rotate(16deg); }

/* 学生信息卡 */
.student-card {
  background: #fff; border-radius: 22px; box-shadow: var(--shadow-card);
  padding: 14px 16px; display: flex; align-items: center; gap: 11px;
}
.student-card.small { padding: 11px 14px; }
.avatar { width: 64px; height: 66px; border-radius: 50%; object-fit: cover; background: #eef6ff; }
.student-card.small .avatar { width: 54px; height: 56px; }
.stu-info { display: flex; flex-direction: column; gap: 3px; }
.stu-info b { font-size: 22px; color: var(--ink); letter-spacing: 1px; }
.stu-info span { font-size: 13px; color: #93a39a; }
.stu-div { width: 2px; height: 44px; background: #edf1ec; border-radius: 2px; }
.stu-coin { width: 50px; height: 50px; }
.stu-pts { display: flex; flex-direction: column; gap: 1px; }
.stu-pts span { font-size: 13px; color: #51604f; }
.stu-pts b { font-size: 32px; line-height: 1.05; color: var(--green-deep); font-weight: 900; }
.stu-pts b i { font-style: normal; }
.stu-pts b em, .stu-pts .fen { font-style: normal; font-size: 15px; font-weight: 700; margin-left: 2px; }
.exit-btn {
  margin-left: auto; border: none; background: transparent; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  color: var(--green); font-family: inherit; font-size: 14px; font-weight: 700;
}
.exit-btn .exit-ico { display: grid; place-items: center; height: 19px; }
.exit-btn:active { transform: scale(.92); }

/* 三个功能入口 */
.entries { display: flex; gap: 14px; }
.entry {
  flex: 1; border-radius: 22px; padding: 13px 8px 14px; text-align: center;
  cursor: pointer; box-shadow: var(--shadow-card);
  transition: transform .15s ease; position: relative;
}
.entry:hover { transform: translateY(-4px); }
.entry:active { transform: scale(.96); }
.e-yellow { background: linear-gradient(180deg, #fff6d2, #ffefa9); }
.e-green  { background: linear-gradient(180deg, #e3f4e5, #d3eeda); }
.e-blue   { background: linear-gradient(180deg, #e0eff9, #d2e9f7); }
.entry-img { height: 104px; display: grid; place-items: center; }
.entry-img img { max-height: 104px; max-width: 92%; object-fit: contain; }
.entry h3 { font-size: 21px; color: #333f36; margin: 7px 0 5px; letter-spacing: 1px; }
.entry p { font-size: 13px; color: #7d8578; line-height: 1.45; }
.entry-arrow {
  margin-top: 9px; width: 38px; height: 38px; border-radius: 50%;
  display: inline-grid; place-items: center;
  color: #fff; font-size: 24px; font-weight: 900; line-height: 1;
  box-shadow: 0 4px 10px rgba(30,60,40,.22);
}
.a-yellow { background: linear-gradient(180deg, #ffc94f, #f0a52c); }
.a-green  { background: linear-gradient(180deg, #34b478, #128a54); }
.a-blue   { background: linear-gradient(180deg, #58a5e6, #3584cf); }

/* ---------- 二级页通用头 ---------- */
.sub-head {
  display: grid; grid-template-columns: 86px 1fr 86px; align-items: center;
  background: rgba(255,255,255,.82); border-radius: 20px; padding: 8px 10px;
  box-shadow: 0 5px 16px rgba(23,84,53,.08);
}
.back-btn {
  border: none; cursor: pointer; font-family: inherit;
  background: #fff; color: #435b4c; font-size: 16px; font-weight: 700;
  border-radius: 999px; padding: 8px 0; box-shadow: 0 3px 8px rgba(30,60,40,.10);
}
.back-btn:active { transform: scale(.94); }
.sub-title { display: flex; align-items: center; justify-content: center; gap: 10px; }
.sub-title img { width: 40px; height: 40px; object-fit: contain; }
.sub-title b {
  font-size: 30px; font-weight: 900; letter-spacing: 4px;
  background: linear-gradient(180deg, #2fb673, var(--green-deep));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.head-space { display: block; }

/* ---------- 面板 ---------- */
.panel {
  background: rgba(255,255,255,.94); border-radius: 22px;
  box-shadow: var(--shadow-card); padding: 16px;
}
.panel-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 12px; }
.panel-head b { font-size: 21px; color: var(--ink); letter-spacing: 1px; }
.panel-head span { font-size: 12px; color: #9aa89e; }
.panel-head span i { font-style: normal; }
.panel-title { font-size: 21px; font-weight: 800; color: var(--ink); margin-bottom: 14px; display: flex; align-items: center; gap: 8px; }
.panel-title::before { content: ""; width: 5px; height: 20px; border-radius: 3px; background: var(--green); }

/* 五育分布 */
.dist { display: flex; gap: 9px; }
.d-col { flex: 1; text-align: center; }
.d-card { border-radius: 14px; overflow: hidden; background: var(--bg); box-shadow: 0 3px 10px rgba(30,60,40,.08); }
.d-top { background: var(--c); padding: 9px 2px 7px; display: flex; flex-direction: column; align-items: center; gap: 3px; }
.d-top svg { width: 25px; height: 25px; display: block; }
.d-top span { color: #fff; font-size: 13px; font-weight: 700; letter-spacing: 1px; white-space: nowrap; }
.d-num { padding: 7px 0 8px; }
.d-num b { font-size: 26px; font-weight: 900; color: var(--c); line-height: 1; }
.d-num span { font-size: 12px; color: #8a988e; margin-left: 2px; }
.d-card.bump { animation: bump .55s ease; }
@keyframes bump { 30% { transform: translateY(-7px) scale(1.06); } 60% { transform: translateY(2px); } }

/* 使用指引三步 */
.steps3 { display: flex; align-items: stretch; gap: 7px; padding-top: 8px; }
.step {
  flex: 1; position: relative; text-align: center;
  background: #fbfdf9; border: 1.5px solid #eaf2ec; border-radius: 16px;
  padding: 24px 4px 12px;
}
.badge {
  position: absolute; top: -13px; left: 50%; transform: translateX(-50%);
  width: 26px; height: 26px; border-radius: 50%;
  background: linear-gradient(180deg, #2fb673, var(--green-deep));
  color: #fff; font-size: 15px; font-weight: 800;
  display: grid; place-items: center; box-shadow: 0 3px 8px rgba(14,122,69,.35);
}
.step-img { height: 62px; display: grid; place-items: center; margin-bottom: 6px; }
.step-img img { max-height: 60px; max-width: 74px; object-fit: contain; }
.step p { font-size: 13px; color: #5b6a5e; line-height: 1.4; font-weight: 600; }
.arr { align-self: center; flex: none; }
.arr svg { width: 22px; height: 22px; display: block; }

.slot-mini {
  width: 34px; height: 54px; border-radius: 8px; display: block; position: relative;
  background: linear-gradient(160deg, #7b8288, #4c5257);
  box-shadow: inset 0 0 6px rgba(0,0,0,.5);
}
.slot-mini i {
  position: absolute; left: 50%; top: 8px; bottom: 8px; width: 8px;
  transform: translateX(-50%); border-radius: 4px; background: #17191b;
  box-shadow: inset 0 2px 4px rgba(0,0,0,.9);
}
.mini-btn-demo {
  display: inline-block; background: linear-gradient(180deg, #2fb673, var(--green-deep));
  color: #fff; font-size: 13px; font-weight: 800; padding: 8px 14px; border-radius: 999px;
  box-shadow: 0 4px 10px rgba(14,122,69,.35);
}

/* 底部大按钮 */
.cta {
  border: none; cursor: pointer; font-family: inherit;
  width: 100%; height: 72px; border-radius: 999px;
  background: linear-gradient(180deg, #23b06b, var(--green-deep));
  color: #fff; font-size: 26px; font-weight: 800; letter-spacing: 4px;
  display: flex; align-items: center; justify-content: center; gap: 12px;
  box-shadow: 0 10px 22px rgba(14,122,69,.38), inset 0 2px 2px rgba(255,255,255,.35);
  transition: transform .12s;
}
.cta img { width: 34px; height: 34px; }
.cta:active { transform: scale(.97); }
.cta.shake { animation: shake .45s ease; }
@keyframes shake { 20%,60% { transform: translateX(-7px); } 40%,80% { transform: translateX(7px); } }
.cta-note { text-align: center; font-size: 14px; color: #5f7d6c; margin-top: -4px; }

/* ---------- 卡片兑换页 ---------- */
.card-info-panel { position: relative; }
.ci-top { display: flex; gap: 12px; align-items: center; }
.ci-photo { width: 158px; border-radius: 14px; box-shadow: 0 4px 12px rgba(30,60,40,.15); }
.ci-right { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.ci-cost {
  background: #fdeeee; border-radius: 12px; padding: 8px 12px;
  font-size: 20px; color: #d9534f; font-weight: 700;
}
.ci-cost b { font-size: 40px; font-weight: 900; margin: 0 4px; }
.ci-line {
  background: #fdeeee; border-radius: 12px; padding: 10px 12px;
  font-size: 19px; color: #4c3a3a; font-weight: 700;
  display: flex; align-items: center; justify-content: space-between; gap: 6px;
}
.ci-line img { width: 42px; height: 36px; object-fit: contain; }
.ci-note { display: flex; gap: 9px; align-items: center; margin-top: 13px; }
.ci-note i {
  flex: none; width: 24px; height: 24px; border-radius: 50%; background: var(--green);
  color: #fff; font-style: normal; font-weight: 900; display: grid; place-items: center; font-size: 15px;
}
.ci-note p { font-size: 14px; color: #6b7a6e; line-height: 1.5; }
.ci-note b { color: var(--ink); }
.mini-link {
  position: absolute; top: 14px; right: 14px;
  border: none; cursor: pointer; font-family: inherit;
  background: rgba(18,161,93,.1); color: var(--green-deep);
  font-size: 13px; font-weight: 700; padding: 6px 12px; border-radius: 999px;
}
.mini-link:active { transform: scale(.94); }

/* ---------- 礼品商城 ---------- */
.tabs { display: flex; gap: 7px; }
.tab {
  flex: 1; border: none; cursor: pointer; font-family: inherit;
  background: rgba(255,255,255,.9); color: #5c6e62;
  font-size: 15px; font-weight: 700; padding: 9px 0; border-radius: 999px;
  box-shadow: 0 3px 8px rgba(30,60,40,.08);
  text-align: center; white-space: nowrap;
}
.tab.on {
  background: linear-gradient(180deg, #23b06b, var(--green-deep));
  color: #fff; box-shadow: 0 5px 12px rgba(14,122,69,.32);
}
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding-bottom: 8px; }
.product {
  background: #fff; border-radius: 16px; overflow: hidden; cursor: pointer;
  box-shadow: 0 4px 14px rgba(23,84,53,.12); transition: transform .14s;
}
.product:hover { transform: translateY(-3px); }
.product:active { transform: scale(.96); }
.product img { width: 100%; height: 92px; object-fit: cover; display: block; }
.product h4 { font-size: 15px; color: var(--ink); text-align: center; margin: 7px 0 5px; padding: 0 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.price { display: flex; align-items: center; justify-content: center; gap: 4px; padding-bottom: 9px; }
.price img { width: 17px; height: 17px; }
.price b { font-size: 18px; color: var(--green-deep); font-weight: 900; }
.price span { font-size: 12px; color: #93a39a; }

/* ---------- 屏幕内浮层 ---------- */
.toast {
  position: absolute; left: 50%; bottom: 96px; transform: translateX(-50%) translateY(14px);
  background: rgba(15, 34, 24, .88); color: #fff; font-size: 15px; font-weight: 600;
  padding: 10px 20px; border-radius: 999px; opacity: 0; pointer-events: none;
  transition: opacity .25s, transform .25s; z-index: 60; white-space: nowrap;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.overlay {
  position: absolute; inset: 0; z-index: 55;
  background: rgba(8, 24, 16, .48); backdrop-filter: blur(2px);
  display: grid; place-items: center; padding: 24px;
}
.overlay.hidden { display: none; }
.dialog {
  width: 330px; background: #fff; border-radius: 24px; padding: 22px 20px;
  text-align: center; box-shadow: 0 18px 44px rgba(10,30,20,.35);
  animation: pop .3s ease both; display: flex; flex-direction: column; gap: 12px; align-items: center;
}
.dialog h3 { font-size: 23px; color: var(--ink); }
.dialog .d-img { width: 110px; height: 78px; object-fit: cover; border-radius: 12px; }
.dialog .d-price { font-size: 17px; color: #5b6a5e; display: flex; align-items: center; gap: 6px; }
.dialog .d-price img { width: 20px; height: 20px; }
.dialog .d-price b { color: var(--green-deep); font-size: 24px; }
.dialog .d-balance { font-size: 14px; color: #93a39a; }
.dialog .d-row { display: flex; gap: 12px; width: 100%; margin-top: 4px; }
.dialog .d-row button {
  flex: 1; border: none; cursor: pointer; font-family: inherit;
  font-size: 18px; font-weight: 800; padding: 12px 0; border-radius: 999px;
}
.d-cancel { background: #eef2ee; color: #5c6e62; }
.d-ok { background: linear-gradient(180deg, #23b06b, var(--green-deep)); color: #fff; box-shadow: 0 6px 14px rgba(14,122,69,.35); }
.d-ok:disabled { background: #c4cdc6; box-shadow: none; cursor: not-allowed; }
.d-close { background: linear-gradient(180deg, #23b06b, var(--green-deep)); color: #fff; font-size: 18px; font-weight: 800; border: none; cursor: pointer; font-family: inherit; padding: 12px 44px; border-radius: 999px; box-shadow: 0 6px 14px rgba(14,122,69,.35); }

/* 卡片卡面 */
.cardface { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; }
.cardface .big svg { width: 64px; height: 64px; filter: drop-shadow(0 4px 6px rgba(0,0,0,.22)); }
.cardface .nm {
  font-size: 16px; font-weight: 800; color: #fff; background: rgba(0,0,0,.22);
  padding: 4px 12px; border-radius: 999px; letter-spacing: 1px;
}
.cardface .deco { position: absolute; opacity: .95; }
.cardface .deco svg { display: block; }
.cardface .deco.d1 { left: 9px; top: 9px; }
.cardface .deco.d2 { right: 9px; top: 11px; }
.cardface .deco.d3 { left: 11px; bottom: 34px; }
.cardface .deco.d4 { right: 10px; bottom: 36px; }

/* 我的卡片（收集册） */
.col-grid { display: grid; grid-template-columns: repeat(3, 104px); gap: 12px; justify-content: center; }
.col-card { width: 104px; height: 146px; border-radius: 12px; position: relative; overflow: hidden; border: 3px solid #fff; box-shadow: 0 6px 14px rgba(10,30,20,.25); }
.col-card .cardface .big svg { width: 44px; height: 44px; }
.col-card .cardface .nm { font-size: 12px; padding: 3px 8px; }
.col-card .cardface .deco { display: none; }
.col-card.miss { border: 2.5px dashed #b9c6bd; background: #f2f5f1; display: grid; place-items: center; box-shadow: none; }
.col-card.miss b { font-size: 38px; color: #c2cec5; font-weight: 800; }
.col-new { position: absolute; right: -3px; top: -3px; z-index: 2; background: #ff9d3c; color: #fff; font-size: 11px; font-weight: 800; padding: 3px 9px; border-radius: 0 10px 0 10px; }

/* 兑换成功 */
.success-gift { animation: pop .45s ease both; }
.success-gift svg { width: 86px; height: 86px; filter: drop-shadow(0 8px 14px rgba(0,0,0,.2)); }

/* ---------- 机身下部硬件 ---------- */
.mbody { position: absolute; left: 0; right: 0; top: 942px; bottom: 0; }

.brand-vertical {
  position: absolute; left: 14px; top: 20px;
  writing-mode: vertical-rl; font-size: 25px; font-weight: 900;
  letter-spacing: 7px; color: var(--green-deep);
}
.brand-slogan {
  position: absolute; left: 44px; top: 24px;
  writing-mode: vertical-rl; font-size: 11px; letter-spacing: 4px; color: #9cc5ac;
}

.slot-label { position: absolute; font-size: 20px; font-weight: 800; color: #3a443c; letter-spacing: 2px; }
.coin-label { left: 66px; top: 12px; }

.coin-slot {
  position: absolute; left: 128px; top: 50px; width: 32px; height: 140px;
  border-radius: 10px; cursor: pointer;
  background: linear-gradient(160deg, #82898f, #4e5459);
  box-shadow: 0 3px 8px rgba(20,30,24,.4), inset 0 1px 2px rgba(255,255,255,.4);
  transition: transform .1s;
}
.coin-slot:active { transform: scale(.94); }
.coin-slot i {
  position: absolute; left: 50%; transform: translateX(-50%);
  top: 9px; bottom: 9px; width: 9px; border-radius: 5px;
  background: #17191b; box-shadow: inset 0 2px 5px rgba(0,0,0,.95);
}
.coin-slot::after {
  content: "投币"; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  font-size: 12px; color: #aab2b8; letter-spacing: 2px; pointer-events: none;
}
.coin-slot.glow { animation: slotGlow .6s ease; }
@keyframes slotGlow { 40% { box-shadow: 0 0 22px 4px rgba(255, 205, 66, .85), inset 0 0 10px rgba(255,205,66,.7); } }

.speaker {
  position: absolute; right: 50px; top: 22px; width: 112px; height: 76px;
  background-image: radial-gradient(circle, #454b50 2.6px, transparent 3.2px);
  background-size: 14px 12.5px; background-position: center;
  opacity: .85; border-radius: 8px;
}

.outlet-label { right: 64px; top: 292px; }
.card-outlet {
  position: absolute; right: 54px; top: 330px; width: 200px; height: 98px;
  border-radius: 14px; background: linear-gradient(160deg, #3a3f44, #23272b);
  box-shadow: 0 4px 10px rgba(20,30,24,.4), inset 0 2px 3px rgba(255,255,255,.25);
}
.outlet-inner {
  position: absolute; inset: 10px 14px 12px; border-radius: 8px;
  background: linear-gradient(180deg, #101214, #1c2024);
  box-shadow: inset 0 4px 10px rgba(0,0,0,.9);
}
.lamp {
  position: absolute; top: -13px; right: -13px; width: 20px; height: 20px;
  border-radius: 50%; background: #798086; border: 3px solid #d8dcd9;
  transition: background .2s;
}
.lamp.on { background: #35e08a; box-shadow: 0 0 16px 3px rgba(53, 224, 138, .8); animation: blink .5s ease-in-out 3; }
@keyframes blink { 50% { opacity: .45; } }

.dispensed {
  position: absolute; left: 50%; bottom: 10px; z-index: 3;
  width: 112px; height: 157px; border-radius: 10px;
  transform: translate(-50%, 100%) scale(.9); opacity: 0;
  transition: transform .7s cubic-bezier(.34, 1.4, .5, 1), opacity .3s;
  cursor: pointer; display: none; overflow: hidden;
  box-shadow: 0 8px 18px rgba(10,20,14,.5);
}
.dispensed.show { display: block; opacity: 1; transform: translate(-50%, 36%) scale(1); }
.dispensed .take-tip {
  position: absolute; left: 0; right: 0; bottom: 0; text-align: center;
  background: rgba(10,25,16,.72); color: #fff; font-size: 12px; padding: 3px 0;
}
.dispensed .cardface .big svg { width: 44px; height: 44px; }
.dispensed .cardface .nm { font-size: 12px; padding: 3px 8px; }
.dispensed .cardface .deco { display: none; }
.dispensed.parcel {
  width: 96px; height: 96px; bottom: 8px;
  background: linear-gradient(140deg, #ffe49a, #ffc247);
  display: none; place-items: center;
}
.dispensed.parcel.show { display: grid; }
.dispensed.parcel svg { width: 58px; height: 58px; }

/* 物理飞行动画层 */
.fly-layer { position: absolute; inset: 0; pointer-events: none; z-index: 45; overflow: hidden; }
.fly-coin {
  position: absolute; width: 58px; height: 58px; border-radius: 50%;
  box-shadow: 0 6px 14px rgba(120, 90, 10, .45);
  will-change: transform, opacity;
}
.fly-coin img { width: 100%; height: 100%; border-radius: 50%; }

/* 机身右下：返回登录页硬件按钮 */
.hw-back {
  position: absolute; right: 24px; bottom: 20px;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 15px; border: 1px solid #D8DEE6; border-radius: 999px;
  background: #fff; color: #8A97A8;
  font-size: 12px; font-weight: 600; letter-spacing: 1px;
  font-family: inherit; cursor: pointer;
  box-shadow: 0 2px 8px rgba(40, 55, 45, .10);
  transition: color .15s ease, border-color .15s ease, transform .12s ease;
}
.hw-back:hover { color: var(--green-deep); border-color: var(--green-deep); }
.hw-back:active { transform: scale(.94); }

/* ==========================================================
   礼品兑换柜（缤纷奖励柜）· 纯样式展示
   位置：主柜右侧，等高 1560，宽 620
   ========================================================== */
.combo2 {
  position: absolute; left: 1060px; top: 0; width: 1180px; height: 1560px;
  filter: drop-shadow(0 30px 40px rgba(40, 45, 35, .35));
}
.cb2-body {
  position: absolute; inset: 0;
  border-radius: 30px;
  background: linear-gradient(115deg, #ffffff 0%, #fbfcf9 55%, #e9ede6 100%);
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.8), inset -10px 0 24px rgba(90, 105, 90, .10);
}
/* 兑换柜与配件柜的拼缝线 */
.cb2-seam {
  position: absolute; left: 560px; top: 34px; bottom: 26px; width: 2px;
  background: linear-gradient(180deg, #dfe5dc, #edf1ea);
  border-radius: 2px;
}
/* 复制兑换柜：屏幕（静态主页画面） */
.cb2-bezel {
  position: absolute; left: 30px; top: 34px; width: 500px; height: 888px;
  background: linear-gradient(160deg, #23262a, #101214);
  border-radius: 26px; padding: 15px;
  box-shadow: 0 8px 20px rgba(20, 30, 24, .35), inset 0 1px 2px rgba(255,255,255,.25);
}
.cb2-ui {
  position: absolute; inset: 15px;
  border-radius: 12px; overflow: hidden;
  background: linear-gradient(180deg, #bfe7fb 0%, #e2f4fe 46%, #eef9ff 100%);
  padding: 14px 20px; display: flex; flex-direction: column; gap: 13px;
}
.cb2-bg {
  position: absolute; left: 0; bottom: 0; width: 100%;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 26%);
  mask-image: linear-gradient(to bottom, transparent 0, #000 26%);
}
/* 复制兑换柜：硬件细节坐标 */
.cb2-coin-label { left: 66px; top: 954px; }
.cb2-coin-slot { left: 128px; top: 992px; }
.cb2-speaker { left: 398px; top: 964px; }
.cb2-outlet-label { left: 386px; top: 1164px; }
.cb2-outlet { left: 306px; top: 1202px; }

/* 品牌竖字（与主柜一致） */
.cb2-brand { top: 962px; }
.cb2-slogan { top: 966px; }

/* 礼品格子区：5 列 × 5 行 */
.gc-grid {
  position: absolute; left: 586px; right: 26px; top: 34px; bottom: 26px;
  display: grid; grid-template-columns: repeat(5, 1fr); grid-template-rows: repeat(5, 1fr);
  gap: 10px;
}
.gc-cell {
  position: relative; border-radius: 12px; overflow: hidden;
  background: #fffdf6;
  border: 3px solid #e7ece4;
  box-shadow:
    inset 0 14px 22px rgba(255, 241, 189, .85),
    inset 0 -8px 14px rgba(214, 178, 110, .18),
    0 2px 6px rgba(30, 60, 40, .07);
}
.gc-cell img {
  position: absolute; inset: 8px 6px 30px; width: calc(100% - 12px); height: calc(100% - 38px);
  object-fit: contain; filter: drop-shadow(0 5px 6px rgba(90, 70, 20, .22));
}
.gc-cell::before { /* 顶部灯带 */
  content: ""; position: absolute; left: 10px; right: 10px; top: 0; height: 5px;
  border-radius: 0 0 4px 4px;
  background: linear-gradient(90deg, transparent, #ffe9a8 25%, #fff6d8 50%, #ffe9a8 75%, transparent);
  box-shadow: 0 3px 10px rgba(255, 224, 130, .9);
  animation: gcLamp 3.6s ease-in-out infinite;
}
.gc-cell:nth-child(5n+2)::before { animation-delay: .5s; }
.gc-cell:nth-child(5n+3)::before { animation-delay: 1.1s; }
.gc-cell:nth-child(5n+4)::before { animation-delay: 1.7s; }
.gc-cell:nth-child(5n+5)::before { animation-delay: 2.3s; }
@keyframes gcLamp { 0%, 100% { opacity: .75; } 50% { opacity: 1; } }

.gc-cell::after { /* 暖光氛围叠加 */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 246, 214, .30), rgba(255, 246, 214, 0) 42%, rgba(240, 200, 120, .12));
}
.gc-tag {
  position: absolute; left: 50%; bottom: 6px; transform: translateX(-50%);
  background: linear-gradient(180deg, #2fb673, var(--green-deep));
  color: #fff; font-size: 13px; font-weight: 800; letter-spacing: 1px;
  padding: 2px 11px 3px; border-radius: 999px; white-space: nowrap;
  box-shadow: 0 2px 6px rgba(14, 122, 69, .35);
}

