/* ============================================================
   abc.css —— 字母乐园（zm-，tabs/abc.js）＋「今天」页的蓝色横条（hm-abc）
   孩子看到的字不小于14px；字母本身要大（认字形），用无衬线粗体，a/g 是课本上的单层写法
   ============================================================ */
.zm { --zb: #5B8DEF; --zbd: #3F6FD1; --zsoft: #EAF1FD; }
.zm .zl, .zm-bub, .zm-card .fc, .zm-fall, .zm-train .car, .zm-o, .zm-cell b, .zm-want b, .zm-aa, .zm-ph b {
  font-family: "Andika", "Century Gothic", "Avenir Next", "Helvetica Neue", Arial, sans-serif; font-weight: 800;
}

/* ---------- 「今天」页横条：样式跟读书横条一样，换成蓝色 ---------- */
.hm-read.hm-abc { background: #EAF1FD; border-color: #5B8DEF; box-shadow: 0 3px 0 #A9C3F2; }
.hm-read.hm-abc:active { box-shadow: 0 1px 0 #A9C3F2; }
.hm-read.hm-abc.ok { background: #F6F1E6; border-color: #E6DCCB; box-shadow: none; }
.hm-abc .abi {
  width: 46px; height: 46px; border-radius: 10px; flex: none; background: #fff; color: #3F6FD1;
  display: grid; place-items: center; font-weight: 900; font-size: 15px; letter-spacing: -.5px;
}
.hm-abc .go { color: #3F6FD1; }

/* ---------- 图鉴首页 ---------- */
.zm-head { display: flex; justify-content: space-between; align-items: baseline; margin: 4px 2px 8px; }
.zm-head b { font-size: 18px; }
.zm-head span { font-size: 15px; color: #3F6FD1; font-weight: 900; }
.zm-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; margin-bottom: 16px; }
.zm-cell {
  position: relative; aspect-ratio: 1; border-radius: 12px; border: 2px solid #E6DCCB; background: #F4EBDD;
  display: grid; place-items: center; padding: 0; cursor: pointer; overflow: hidden;
}
.zm-cell b { font-size: 24px; color: #C9B9A3; }
.zm-cell.half { background: #EAF1FD; border-color: #A9C3F2; }
.zm-cell.half b { color: #3F6FD1; }
.zm-cell.on { background: #fff; border-color: #5B8DEF; }
.zm-cell em {
  position: absolute; top: 2px; right: 3px; font-style: normal; font-weight: 900; font-size: 13px; color: #fff;
  background: #E85D4A; border-radius: 50%; width: 17px; height: 17px; display: grid; place-items: center;
}
.zm-games { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.zm-g {
  font: inherit; font-weight: 800; font-size: 16px; color: #4A3728; background: #fff; border: 2px solid #E6DCCB;
  border-radius: 14px; padding: 10px 6px; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 6px;
}
.zm-g i { font-style: normal; font-size: 20px; }
.zm-tip { text-align: center; font-size: 15px; color: #8B7A63; margin: 10px 0; min-height: 22px; font-weight: 700; text-wrap: balance; }

/* 未知图腾：画好的图，或占位（深色圆＋大字母＋一只眼） */
.zm-un { width: 86%; height: 86%; object-fit: contain; display: block; }
.zm-ph { position: relative; display: grid; place-items: center; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #5d6b82, #2c3442); }
.zm-ph b { color: #fff !important; font-size: 26px; line-height: 1; }
.zm-ph i { position: absolute; width: 22%; height: 22%; border-radius: 50%; background: #fff; border: 2px solid #2c3442; bottom: 10%; right: 10%; box-shadow: inset 2px 2px 0 #2c3442; }
.zm-un.big { width: 140px; height: 140px; margin: 0 auto 10px; }
/* 画好的图腾是一整张收藏卡（金边、遗迹背景）：铺满格子，不留白 */
img.zm-un { object-fit: cover; border-radius: 10px; }
.zm-cell img.zm-un { width: 100%; height: 100%; border-radius: 0; }
img.zm-un.big { width: 180px; height: 180px; border-radius: 16px; box-shadow: 0 6px 16px rgba(0, 0, 0, .25); }
.zm-lits img.zm-un { border-radius: 8px; }
.zm-ph.big b { font-size: 70px; }
.zm-mod { text-align: center; }
.zm-mod b { display: block; font-size: 18px; margin-bottom: 12px; text-wrap: balance; }
.zm-mod b.zm-aa { font-size: 40px; margin-bottom: 6px; }
.zm-mod p { font-size: 15px; color: #B5602A; margin: 0 0 12px; }

/* ---------- 一局 ---------- */
.zm-play { text-align: center; }
.zm-ear {
  display: block; margin: 8px auto 4px; width: 76px; height: 76px; border-radius: 50%; border: 3px solid #4A3728;
  background: #FFF1D6; font-size: 34px; cursor: pointer; box-shadow: 0 4px 0 rgba(74, 55, 40, .3);
}
.zm-ear.sm { display: inline-grid; place-items: center; width: 42px; height: 42px; font-size: 20px; margin: 0 8px 0 0; vertical-align: middle; border-width: 2px; }
.zm-ear:active { transform: translateY(2px); }
.zm.frozen .zm-bubs, .zm.frozen .zm-opts, .zm.frozen .zm-sky { opacity: .45; pointer-events: none; }

/* 泡泡 */
.zm-bubs { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 22px; max-width: 320px; margin: 18px auto 6px; }
.zm-bub {
  aspect-ratio: 1; border-radius: 50%; font-size: 56px; color: #3F6FD1; cursor: pointer;
  border: 3px solid #A9C3F2; background: radial-gradient(circle at 32% 28%, #fff 0 18%, #EAF4FF 40%, #CFE3FB);
  box-shadow: inset -6px -8px 0 rgba(91, 141, 239, .15); animation: zmfloat 2.6s ease-in-out infinite; animation-delay: var(--d);
  touch-action: manipulation;
}
@keyframes zmfloat { 50% { transform: translateY(-8px) } }
.zm-bub.pop { animation: zmpop .45s forwards; }
@keyframes zmpop { 40% { transform: scale(1.25); opacity: 1 } 100% { transform: scale(.2); opacity: 0 } }
.zm-bub.no, .zm-o.no { animation: zmno .4s; border-color: #E9A79F; }
@keyframes zmno { 25% { transform: translateX(-7px) } 75% { transform: translateX(7px) } }
.zm-bub.hint, .zm-o.hint { border-color: #7BC96F; box-shadow: 0 0 0 5px rgba(123, 201, 111, .45); animation: none; }

/* 翻牌 */
.zm-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; max-width: 360px; margin: 14px auto; }
.zm-card { position: relative; aspect-ratio: 3 / 4; border: 0; padding: 0; background: none; cursor: pointer; perspective: 600px; }
.zm-card span {
  position: absolute; inset: 0; border-radius: 12px; display: grid; place-items: center; border: 2.5px solid #4A3728;
  backface-visibility: hidden; -webkit-backface-visibility: hidden; transition: transform .35s;
}
.zm-card .bk { background: linear-gradient(#E85D4A 0 48%, #4A3728 48% 52%, #fff 52%); color: transparent; }
.zm-card .bk::after { content: ""; width: 26%; aspect-ratio: 1; border-radius: 50%; background: #fff; border: 3px solid #4A3728; }
.zm-card .fc { background: #fff; font-size: 44px; color: #3F6FD1; transform: rotateY(180deg); }
.zm-card.up .bk { transform: rotateY(-180deg); }
.zm-card.up .fc { transform: rotateY(0); }
.zm-card.ok .fc { background: #EAF6E4; border-color: #3c8a33; color: #3c8a33; }

/* b和d：字母往下掉 */
.zm-want { font-size: 18px; font-weight: 800; margin: 6px 0; display: flex; align-items: center; justify-content: center; gap: 4px; }
.zm-want b { font-size: 40px; color: #E85D4A; margin: 0 6px; }
.zm-want span { margin-left: 10px; color: #8B7A63; font-size: 16px; }
.zm-sky {
  position: relative; height: calc(100dvh - 210px - env(safe-area-inset-top) - env(safe-area-inset-bottom)); min-height: 340px;
  border-radius: 18px; border: 2px solid #4A3728; overflow: hidden; background: linear-gradient(#CFE8FB, #FFF8EF);
}
.zm-sky { touch-action: none; }
/* 2026-10-17：不用 CSS 动画了（iPad 上点不中），JS 每帧改 top；字母本身不接点，点在天空上按位置找 */
.zm-fall {
  position: absolute; top: -72px; width: 70px; height: 70px; border-radius: 50%; border: 3px solid #4A3728; background: #fff;
  font-size: 44px; color: #4A3728; line-height: 1; display: grid; place-items: center; pointer-events: none;
}
.zm-fall.got { background: #EAF6E4; border-color: #3c8a33; color: #3c8a33; animation: zmpop .45s forwards; }
.zm-fall.bad { background: #F6F1E6; border-color: #B5A58C; color: #B5A58C; animation: zmno .4s; }

/* 排队：小火车 */
.zm-train { display: flex; align-items: flex-end; justify-content: center; gap: 6px; margin: 26px 0 22px; transition: transform 1s ease-in; }
.zm-train .eng { font-size: 54px; line-height: 1; transform: scaleX(-1); }
.zm-train .car {
  width: 74px; height: 74px; border-radius: 12px 12px 6px 6px; border: 3px solid #4A3728; background: #FFD87A;
  display: grid; place-items: center; font-size: 46px; color: #4A3728; position: relative;
}
.zm-train .car::after { content: ""; position: absolute; bottom: -12px; left: 12px; right: 12px; height: 12px; background: radial-gradient(circle at 15% 50%, #4A3728 0 6px, transparent 7px), radial-gradient(circle at 85% 50%, #4A3728 0 6px, transparent 7px); }
.zm-train .car.hole { background: #fff; border-style: dashed; color: #E85D4A; }
.zm-train .car.fill { background: #EAF6E4; border-style: solid; color: #3c8a33; }
.zm-train.go { transform: translateX(-120vw); }
.zm-opts { display: flex; justify-content: center; gap: 14px; }
.zm-o {
  width: 82px; height: 82px; border-radius: 18px; border: 3px solid #4A3728; background: #fff; font-size: 46px; color: #3F6FD1;
  cursor: pointer; box-shadow: 0 4px 0 rgba(74, 55, 40, .3); touch-action: manipulation;
}
.zm-o.ok { background: #EAF6E4; border-color: #3c8a33; color: #3c8a33; }

/* ---------- 一局结束 ---------- */
.zm-done { text-align: center; padding-top: calc(50px + env(safe-area-inset-top)); }
.zm-big { font-size: 68px; }
.zm-dt { display: block; font-size: 22px; margin: 8px 0 12px; }
.zm-lits { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 0 auto 14px; max-width: 340px; }
.zm-lits .zm-un { width: 52px; height: 52px; }
.zm-lits .zm-ph b { font-size: 24px; }
.zm-st { font-size: 30px; font-weight: 900; color: #E5A100; margin-bottom: 18px; }
.zm-done .hm-go { margin-top: 6px; }

/* ---------- 图鉴格子：没点亮的下面三颗小点＝答对了几天（满3天点亮） ---------- */
.zm-cell { align-content: center; }
.zm-cell .dots { display: block; font-style: normal; font-size: 14px; letter-spacing: 1px; color: #3F6FD1; line-height: 1; margin-top: 2px; }
.zm-cell:not(.half) .dots { color: #C9B9A3; }

/* ---------- 怎么得⭐ ---------- */
.zm-rules { background: #fff; border: 2px solid #E6DCCB; border-radius: 16px; padding: 10px 12px; margin: 14px 0 6px; }
.zm-rules > b { display: block; font-size: 16px; margin-bottom: 4px; }
.zm-rules div { display: flex; gap: 8px; align-items: baseline; padding: 4px 0; border-top: 1.5px dashed #E6DCCB; }
.zm-rules span { flex: none; font-weight: 800; font-size: 15px; min-width: 6.6em; }
.zm-rules em { font-style: normal; font-size: 14px; color: #6f6252; line-height: 1.45; }
.zm-rules p { margin: 6px 0 0; font-size: 14px; color: #3F6FD1; font-weight: 800; text-align: center; }
.zm-tot { text-align: center; font-size: 16px; color: #6f6252; margin: 0 0 12px; }
.zm-tot b { font-size: 22px; color: #E5A100; }

/* ---------- 字母卡：大写、小写、笔顺 ---------- */
.zm-lc { text-align: center; }
.zm-lch { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; text-align: left; }
.zm-lch .t { flex: 1; }
.zm-lch .zm-aa { display: block; font-size: 38px; line-height: 1.1; }
.zm-lch span { font-size: 14px; color: #8B7A63; }
.zm-un.mid { width: 64px; height: 64px; flex: none; }
.zm-lcs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.zm-lcs > div { background: #FFFDF8; border: 2px solid #E6DCCB; border-radius: 14px; padding: 6px 4px 2px; }
.zm-lcs small { display: block; font-size: 14px; font-weight: 800; color: #6f6252; }
.zm-sv { width: 100%; height: auto; display: block; overflow: visible; }
.zm-sv line { stroke: #C9BBA6; stroke-width: .8; }
.zm-sv line.bl { stroke: #E89A8E; }
.zm-sv .gh { fill: none; stroke: #EFE7DA; stroke-width: 7; stroke-linecap: round; stroke-linejoin: round; }
.zm-sv .ink { fill: none; stroke: #3F6FD1; stroke-width: 7; stroke-linecap: round; stroke-linejoin: round; }
.zm-sv .nm { opacity: 0; transition: opacity .2s; }
.zm-sv .nm.on { opacity: 1; }
.zm-sv .nm circle { fill: #E5A100; }
.zm-sv .nm text { fill: #fff; font-size: 7.5px; font-weight: 900; text-anchor: middle; font-family: -apple-system, sans-serif; }
.zm-rv { font-size: 15px; color: #B5602A; margin: 8px 0 0; }
.zm-lc .hm-later { margin-top: 4px; }

/* ---------- 游戏背景（2026-10-17 画图AI画的「天空遗迹」，和未知图腾卡同一个世界） ---------- */
.zm-sky { background: #CFE8FB url(../img/abc/bg-sky-0d66bfec.jpg) center / cover no-repeat; }
/* 四个游戏：整屏（连 body 一起，不留两边的奶油色边）铺同一张，上面压一层浅色，字和按钮看得清 */
body:has(.zm-play) { background: linear-gradient(rgba(255, 252, 245, .58), rgba(255, 252, 245, .72)), #CFE8FB url(../img/abc/bg-sky-0d66bfec.jpg) center / cover no-repeat fixed; }
.zm-play .zm-tip { color: #4A3728; text-shadow: 0 1px 0 rgba(255, 255, 255, .9); }
body:has(.zm-play)::before { display: none; }          /* 首页那几个彩色大圆点，压在天空上很乱 */
.zm-play .topbar { background: transparent; box-shadow: none; }

/* ---------- 👂 A还是I？两个大按钮（2026-10-17） ---------- */
.zm-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; max-width: 360px; margin: 18px auto 8px; }
.zm-pb {
  font: inherit; aspect-ratio: 3 / 4; border-radius: 22px; border: 3px solid #4A3728; background: #fff; color: #3F6FD1; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; box-shadow: 0 5px 0 rgba(74, 55, 40, .3); touch-action: manipulation;
}
.zm-pb b { font-family: "Andika", "Century Gothic", "Avenir Next", Arial, sans-serif; font-size: 84px; line-height: 1; }
.zm-pb b i { font-style: normal; font-size: 56px; margin-left: 6px; color: #6E9BE8; }
.zm-pb span { font-size: 22px; font-weight: 900; color: #B5602A; }
.zm-pb.ok { background: #EAF6E4; border-color: #3c8a33; color: #3c8a33; }
.zm-pb.no { animation: zmno .4s; }
.zm-pb.hint { border-color: #7BC96F; box-shadow: 0 0 0 6px rgba(123, 201, 111, .45); }
.zm-ftip { background: #FFF6DE; border: 2px solid #F2B33D; border-radius: 14px; padding: 8px 10px; margin-top: 10px; }
.zm-ftip p { margin: 0 0 8px; font-size: 15px; font-weight: 800; color: #6f4a1e; }
.zm-ftip .zm-g { width: 100%; }

/* 2026-10-20 泡泡/翻牌/排队各用自己的背景（画图AI第2版：同一个云中遗迹世界，几只宝可梦站在左右两边）；b和d、其余用 bg-sky。
   手机比图窄，cover 会把左右两边的宝可梦裁掉：底下一层 cover 铺满，上面一层（body::before）按屏幕宽度完整放在下方、上沿渐隐。iPad 是3:4，两层重合 */
body:has(.zm-g-bubble) { --zbg: url(../img/abc/bg-bubble-f31ee78f.jpg); background: linear-gradient(rgba(255, 252, 245, .45), rgba(255, 252, 245, .6)), #CFE8FB var(--zbg) center / cover no-repeat fixed; }
body:has(.zm-g-bubble)::before {
  display: block; content: ''; position: fixed; inset: auto 0 0 0; height: calc(100vw * 4 / 3); max-height: 100%; z-index: 0; pointer-events: none;
  background: linear-gradient(rgba(255, 252, 245, .3), rgba(255, 252, 245, .42)), var(--zbg) center bottom / 100% auto no-repeat;
  -webkit-mask-image: linear-gradient(transparent 0, #000 28%); mask-image: linear-gradient(transparent 0, #000 28%);
}
body:has(.zm-g-flip) { --zbg: url(../img/abc/bg-flip-d3b7aad7.jpg); background: linear-gradient(rgba(255, 252, 245, .45), rgba(255, 252, 245, .6)), #CFE8FB var(--zbg) center / cover no-repeat fixed; }
body:has(.zm-g-flip)::before {
  display: block; content: ''; position: fixed; inset: auto 0 0 0; height: calc(100vw * 4 / 3); max-height: 100%; z-index: 0; pointer-events: none;
  background: linear-gradient(rgba(255, 252, 245, .3), rgba(255, 252, 245, .42)), var(--zbg) center bottom / 100% auto no-repeat;
  -webkit-mask-image: linear-gradient(transparent 0, #000 28%); mask-image: linear-gradient(transparent 0, #000 28%);
}
body:has(.zm-g-train) { --zbg: url(../img/abc/bg-train-bf623d39.jpg); background: linear-gradient(rgba(255, 252, 245, .45), rgba(255, 252, 245, .6)), #CFE8FB var(--zbg) center / cover no-repeat fixed; }
body:has(.zm-g-train)::before {
  display: block; content: ''; position: fixed; inset: auto 0 0 0; height: calc(100vw * 4 / 3); max-height: 100%; z-index: 0; pointer-events: none;
  background: linear-gradient(rgba(255, 252, 245, .3), rgba(255, 252, 245, .42)), var(--zbg) center bottom / 100% auto no-repeat;
  -webkit-mask-image: linear-gradient(transparent 0, #000 28%); mask-image: linear-gradient(transparent 0, #000 28%);
}

/* 10-29 横屏（电脑、iPad横放）：上面那层原来按 100% 100% 铺，屏幕比图宽时整张图被压扁（爸爸截图里胖丁扁了）。
   横屏改成整张图按高度完整放在正中（不变形），两边露出底下那层 cover 铺的同一张图 */
@media (min-aspect-ratio: 3/4) {
  body:has(.zm-g-bubble)::before, body:has(.zm-g-flip)::before, body:has(.zm-g-train)::before {
    inset: 0; height: auto; max-height: none; background-size: auto 100%; background-position: center;
    -webkit-mask-image: none; mask-image: none;
  }
  /* 两边那层是同一张图放大，会冒出一只巨大的皮卡丘：再垫一层糊掉的，只留颜色 */
  body:has(.zm-g-bubble)::after, body:has(.zm-g-flip)::after, body:has(.zm-g-train)::after {
    content: ''; position: fixed; inset: -40px; z-index: -1; pointer-events: none;
    background: linear-gradient(rgba(255, 252, 245, .4), rgba(255, 252, 245, .55)), var(--zbg) center / cover no-repeat; filter: blur(28px);
  }
}

/* ---------- 看地图说方位（tabs/maptalk.js，2026-10-23） ---------- */
.hm-read.hm-mt { background: #EAF6E4; border-color: #7BC96F; box-shadow: 0 3px 0 #B9DFAE; }
.hm-mt .abi { font-size: 26px; background: #fff; }
.mt-tip { font-size: 15px; color: #6f6252; text-align: center; margin: 2px 0 8px; font-weight: 700; }
.mt-tip.sm { font-size: 14px; font-weight: 400; margin-top: 10px; }
.mt-map { border-radius: 14px; overflow: hidden; border: 2px solid #4A3728; position: sticky; top: calc(56px + env(safe-area-inset-top)); z-index: 2; background: #fff; }
.mt-map img { display: block; width: 100%; }
.mt-box { position: absolute; border-radius: 8px; border: 3px solid transparent; transition: all .25s; pointer-events: none; }
.mt-box.a { border-color: #E5A100; box-shadow: 0 0 0 3px rgba(255, 255, 255, .85), 0 0 14px rgba(229, 161, 0, .8); }
.mt-box.b { border-color: #3F6FD1; box-shadow: 0 0 0 3px rgba(255, 255, 255, .85); }
.mt-list { list-style: none; margin: 10px 0 0; padding: 0; }
.mt-s { position: relative; background: #fff; border: 2px solid #E6DCCB; border-radius: 14px; padding: 8px 34px 8px 12px; margin-bottom: 8px; cursor: pointer; }
.mt-s.on { border-color: #E5A100; background: #FFF6DE; }
.mt-s .en { display: block; font-size: 17px; font-weight: 700; line-height: 1.35; font-family: "Avenir Next", "Helvetica Neue", Arial, sans-serif; }
.mt-s .en b { color: #D98A00; }
.mt-s .zh { display: block; font-size: 14px; color: #8B7A63; }
.mt-s em { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); font-style: normal; font-weight: 900; color: #DDD3C2; font-size: 18px; }
.mt-s.ok em { color: #3c8a33; }

/* 新地图（10-23）上叠的字：地点名白底小牌、街名路面上的白字 */
.mt-map { position: sticky; }
.mt-pl { position: absolute; transform: translate(-50%, -100%); background: rgba(255, 255, 255, .92); color: #4A3728; border-radius: 6px; padding: 0 4px;
  font: 800 clamp(8px, 2.2vw, 14px)/1.35 "Avenir Next", "Helvetica Neue", Arial, sans-serif; white-space: nowrap; pointer-events: none; box-shadow: 0 1px 2px rgba(0, 0, 0, .25); }
.mt-pl.r { transform: translate(-100%, -100%); }
.mt-pl.begin { transform: translate(0, -50%); color: #C0392B; }
.mt-st { position: absolute; transform: translate(-50%, -50%); color: #fff; font: 700 clamp(7px, 1.8vw, 12px)/1 "Avenir Next", "Helvetica Neue", Arial, sans-serif;
  letter-spacing: .3px; white-space: nowrap; pointer-events: none; text-shadow: 0 0 2px #555, 0 0 2px #555; text-transform: uppercase; }
.mt-st.v { transform: translate(-50%, -50%) rotate(-90deg); }
