* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body {
  min-height: 100%;
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  background: #FDF8F2; color: #4a3728;
  -webkit-text-size-adjust: 100%;
}
body { display: flex; flex-direction: column; }
button { font-family: inherit; border: 0; background: none; cursor: pointer; color: inherit; }
.hidden { display: none !important; }

/* ===== 品牌栏（站点统一） ===== */
.brandbar { width: 100%; background: #FDF8F2; border-bottom: 1px solid #EDE8DF; flex: none; }
.brandbar-in { max-width: 620px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; padding: 8px 16px; }
.brandlink { display: flex; align-items: center; gap: 8px; text-decoration: none; color: #4a3728; }
.brandlogo { width: 28px; height: 28px; border-radius: 8px; background: #F26430; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 600; flex: none; }
.brandtxt { display: flex; flex-direction: column; line-height: 1.15; }
.brandtxt b { font-size: 13px; font-weight: 700; }
.brandtxt i { font-size: 10px; color: #A8988A; font-style: normal; }
.backhome { font-size: 12px; color: #F26430; background: #FDEDE4; border-radius: 14px; padding: 5px 12px; text-decoration: none; font-weight: 500; flex: none; }
.childbtn { height: 30px; border-radius: 15px; font-size: 12px; padding: 0 12px; background: #FDEDE4; color: #F26430; font-weight: 600; white-space: nowrap; display: inline-flex; align-items: center; }

/* ===== 屏幕容器 ===== */
#app { flex: 1; display: flex; flex-direction: column; }
.screen {
  flex: 1; width: 100%; display: flex; flex-direction: column; align-items: center;
  padding: 14px 14px 32px; overflow-y: auto; -webkit-overflow-scrolling: touch;
}
.screen > * { width: min(620px, 100%); }

/* ===== 一、地图 ===== */
.hero {
  background: #fff; border: 1px solid #EDE8DF; border-radius: 22px;
  padding: 18px 18px 16px; box-shadow: 0 6px 18px rgba(60,40,28,.06);
}
.hero .k { font-size: 12px; color: #A8988A; font-weight: 600; letter-spacing: .5px; }
.hero h2 { font-size: 22px; font-weight: 800; margin: 6px 0 4px; line-height: 1.3; }
.hero .sub { font-size: 13px; color: #73726E; line-height: 1.7; }
.hero .meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.hero .meta span { font-size: 12px; background: #FBF6EF; color: #8A7A6A; border-radius: 9px; padding: 4px 9px; }
.hero .go {
  margin-top: 14px; width: 100%; height: 56px; border-radius: 16px;
  background: #F26430; color: #fff; font-size: 18px; font-weight: 800;
  box-shadow: 0 8px 20px rgba(242,100,48,.28);
}
.hero .go:active { transform: scale(.98); }
.hero .go.ghost { background: #FFF3EC; color: #D4552A; box-shadow: none; border: 1.5px solid #F8C9B0; }
.hero .hint { margin-top: 10px; font-size: 12px; color: #A8988A; text-align: center; line-height: 1.6; }

.map-progress { margin: 14px 2px 6px; display: flex; align-items: center; gap: 10px; font-size: 12px; color: #8A7A6A; }
.map-progress .bar { flex: 1; height: 8px; border-radius: 4px; background: #EFE7DB; overflow: hidden; }
.map-progress .bar i { display: block; height: 100%; background: #6FBF8A; border-radius: 4px; transition: width .4s; }

.groups { margin-top: 6px; }
.grp { background: #fff; border: 1px solid #EDE8DF; border-radius: 18px; padding: 14px; margin-bottom: 10px; }
.grp-head { display: flex; align-items: baseline; gap: 8px; }
.grp-head b { font-size: 15px; font-weight: 800; }
.grp-head em { font-style: normal; font-size: 11px; color: #A8988A; }
.grp-head .cnt { margin-left: auto; font-size: 11px; color: #8A7A6A; }
.grp-nodes { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.node {
  width: 44px; height: 44px; border-radius: 14px; font-size: 15px; font-weight: 800;
  background: #F7F2EA; color: #9A8B7A; display: flex; align-items: center; justify-content: center;
  position: relative; border: 1.5px solid transparent;
}
.node.done { background: #EAF7EE; color: #3E9B63; border-color: #CBE9D6; }
.node.done::after {
  content: ""; position: absolute; right: -2px; top: -2px; width: 12px; height: 12px;
  border-radius: 50%; background: #6FBF8A; border: 2px solid #fff;
}
.node.cur { background: #F26430; color: #fff; box-shadow: 0 6px 14px rgba(242,100,48,.32); animation: pulse 1.8s infinite; }
.node.lock { background: #F7F4EF; color: #D6CCC0; }
@keyframes pulse { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-2px); } }
.map-foot { font-size: 11px; color: #B3A79A; text-align: center; line-height: 1.8; margin-top: 6px; }

/* ===== 二、答题 ===== */
#scr-quiz { padding: 10px 14px 18px; }
.qz-top { display: flex; align-items: center; gap: 10px; }
.qz-exit { width: 36px; height: 36px; border-radius: 12px; background: #F6F0E8; font-size: 15px; color: #8A7A6A; flex: none; }
.qz-prog { font-size: 14px; color: #8A7A6A; font-weight: 600; }
.qz-prog b { font-size: 18px; color: #4a3728; }
.qz-timer { margin-left: auto; font-size: 14px; font-weight: 800; color: #3E9B63; background: #EAF7EE; border-radius: 10px; padding: 5px 10px; }
.qz-timer.warn { color: #C7401E; background: #FDEDE4; }
.qz-speak { margin-left: auto; width: 42px; height: 42px; border-radius: 14px; background: #FFF3EC; font-size: 19px; flex: none; }
.qz-timer + .qz-speak { margin-left: 0; }
.qz-bar { height: 6px; border-radius: 3px; background: #EFE7DB; margin: 10px 0 4px; overflow: hidden; }
.qz-bar i { display: block; height: 100%; width: 0; background: #F26430; border-radius: 3px; transition: width .25s; }

.qz-body { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; padding-top: 10px; }
.qz-stem {
  font-size: clamp(40px, 13vw, 68px); font-weight: 800; letter-spacing: 2px;
  text-align: center; line-height: 1.25; min-height: 84px;
  display: flex; align-items: center; justify-content: center;
  font-variant-numeric: tabular-nums;
}
.qz-stem.shake { animation: shake .32s; }
@keyframes shake { 0%,100%{transform:translateX(0)} 25%{transform:translateX(-7px)} 75%{transform:translateX(7px)} }
.qz-ans {
  min-height: 62px; min-width: 140px; padding: 6px 22px; margin: 4px 0 10px;
  border-bottom: 4px solid #F26430; font-size: clamp(34px, 11vw, 54px); font-weight: 800;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  color: #F26430; font-variant-numeric: tabular-nums;
}
.qz-ans.empty { color: #D9CFC3; }
.qz-ans .box { min-width: 64px; text-align: center; border-bottom: 3px dashed #E8DCCC; }
.qz-ans .box.on { border-bottom-color: #F26430; }
.qz-ans .lbl { font-size: 12px; color: #A8988A; font-weight: 600; align-self: flex-end; padding-bottom: 9px; }
.qz-ans.ok { color: #3E9B63; border-bottom-color: #6FBF8A; }

.qz-pad { width: 100%; display: grid; gap: 9px; }
.qz-pad.choice { grid-template-columns: 1fr 1fr; }
.qz-pad.cmp { grid-template-columns: 1fr 1fr 1fr; }
.qz-pad.keys { grid-template-columns: repeat(3, 1fr); }
.qz-pad .k {
  height: 62px; border-radius: 16px; background: #fff; border: 1.5px solid #EDE8DF;
  font-size: 24px; font-weight: 800; color: #4a3728;
  box-shadow: 0 3px 10px rgba(60,40,28,.05);
}
.qz-pad .k:active { transform: scale(.96); background: #FBF6EF; }
.qz-pad .k.opt { font-size: 30px; height: 88px; }
.qz-pad .k.cmpk { height: 92px; font-size: 32px; }
.qz-pad .k.enter { grid-column: 1 / -1; height: 56px; background: #F26430; color: #fff; font-size: 18px; box-shadow: 0 6px 16px rgba(242,100,48,.26); }
.qz-pad .k.enter:disabled { background: #F1DDD2; color: #FFF; box-shadow: none; }
.qz-pad .k.del { background: #F7F2EA; font-size: 20px; }
.qz-tip { margin-top: 12px; font-size: 15px; font-weight: 700; min-height: 24px; text-align: center; }
.qz-tip.good { color: #3E9B63; }
.qz-tip.bad { color: #C7401E; }

/* ===== 三、结算 ===== */
#scr-done { justify-content: center; }
.done-card { text-align: center; }
.done-ring {
  width: 150px; height: 150px; border-radius: 50%; margin: 6px auto 14px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: #fff; border: 8px solid #EAF7EE;
}
.done-ring b { font-size: 42px; font-weight: 800; color: #3E9B63; line-height: 1; }
.done-ring span { font-size: 12px; color: #8A7A6A; margin-top: 6px; }
.done-ring.mid { border-color: #FFF3E2; } .done-ring.mid b { color: #E08A2E; }
.done-ring.low { border-color: #FDEDE4; } .done-ring.low b { color: #C7401E; }
.done-title { font-size: 22px; font-weight: 800; margin-bottom: 6px; }
.done-desc { font-size: 14px; color: #73726E; line-height: 1.85; }
.done-wrong { margin-top: 18px; text-align: left; background: #fff; border: 1px solid #EDE8DF; border-radius: 16px; padding: 12px 14px; }
.done-wrong h4 { font-size: 13px; color: #8A7A6A; font-weight: 700; margin-bottom: 8px; }
.done-wrong .row { display: flex; align-items: center; gap: 10px; font-size: 15px; padding: 7px 0; border-top: 1px solid #F3EDE5; }
.done-wrong .row:first-of-type { border-top: 0; }
.done-wrong .row .st { font-weight: 700; }
.done-wrong .row .mine { color: #C7401E; text-decoration: line-through; }
.done-wrong .row .right { color: #3E9B63; font-weight: 800; margin-left: auto; }
.done-btns { margin-top: 20px; display: flex; flex-direction: column; gap: 10px; }
.done-btns button, .done-btns a {
  height: 52px; border-radius: 16px; font-size: 16px; font-weight: 800;
  display: flex; align-items: center; justify-content: center; text-decoration: none;
}
.done-btns .primary { background: #F26430; color: #fff; box-shadow: 0 8px 20px rgba(242,100,48,.26); }
.done-btns .secondary { background: #fff; color: #4a3728; border: 1.5px solid #EDE8DF; }

/* ===== 提示 / 登录门 ===== */
.toast {
  position: fixed; left: 50%; bottom: 42px; transform: translateX(-50%);
  background: rgba(58,46,40,.92); color: #fff; font-size: 13px; font-weight: 600;
  padding: 10px 18px; border-radius: 14px; z-index: 90; max-width: 82vw; text-align: center; line-height: 1.5;
}
.gate { position: fixed; left: 0; top: 0; right: 0; bottom: 0; background: rgba(253,248,242,.96); z-index: 99; display: flex; align-items: center; justify-content: center; padding: 24px; }
.gate-card { background: #fff; border-radius: 22px; padding: 26px 22px; text-align: center; max-width: 340px; box-shadow: 0 12px 40px rgba(60,40,28,.12); }
.gate-emo { font-size: 34px; }
.gate-card h2 { font-size: 18px; margin: 10px 0 8px; }
.gate-card p { font-size: 14px; color: #73726E; line-height: 1.8; }
.gate-btn { display: inline-flex; align-items: center; justify-content: center; margin-top: 16px; height: 46px; padding: 0 26px; border-radius: 999px; background: #F26430; color: #fff; font-weight: 800; font-size: 15px; text-decoration: none; }

/* ===== 平板放大 ===== */
@media (min-width: 700px) {
  .node { width: 52px; height: 52px; font-size: 16px; }
  .qz-pad .k { height: 74px; font-size: 26px; }
  .qz-pad .k.opt { height: 96px; }
}
