/* ============================================================
   history.css —— 《希利尔讲世界史》伴读（hy-）＋「今天」页的读书横条（hm-read）
   孩子看到的字不小于14px；颜色跟首页一套（深棕描边、奶油底），读书用暖黄，不用绿色（绿色只给当天英语课的大按钮）
   ============================================================ */

/* ---------- 「今天」页：大卡片下面的读书横条 ---------- */
.hm-read {
  display: flex; align-items: center; gap: 10px; margin-top: 12px; cursor: pointer;
  background: #FFF1D6; border: 2px solid #F2B33D; border-radius: 16px; padding: 8px 12px 8px 8px;
  box-shadow: 0 3px 0 #E9C46A;
}
.hm-read:active { transform: translateY(2px); box-shadow: 0 1px 0 #E9C46A; }
.hm-read img { width: 46px; height: 46px; border-radius: 10px; object-fit: cover; flex: none; background: #fff; }
.hm-read .t { flex: 1; min-width: 0; }
.hm-read b { display: block; font-size: 16px; line-height: 1.3; }
.hm-read span { display: block; font-size: 14px; color: #8B6A2E; line-height: 1.35; text-wrap: balance; }
.hm-read .go { font-size: 22px; color: #B5602A; font-weight: 900; }
.hm-read.ok { background: #F6F1E6; border-color: #E6DCCB; box-shadow: none; }
.hm-read.ok span { color: #3c8a33; }

/* ---------- 长河 ---------- */
.hy .topbar h1 { font-size: 20px; }
.hy-river { position: relative; border-radius: 18px; overflow: hidden; border: 2px solid #4A3728; background: #BFE3F7; }
.hy-river img { display: block; width: 100%; height: auto; }
.hy-mk {
  position: absolute; transform: translate(-50%, -50%); min-width: 46px; height: 32px; padding: 0 8px; border-radius: 16px;
  font: inherit; font-weight: 900; font-size: 14px; color: #4A3728; background: rgba(255, 255, 255, .92);
  border: 2px solid #4A3728; cursor: pointer; box-shadow: 0 2px 0 rgba(74, 55, 40, .35);
}
.hy-mk.part { background: #FFF1D6; }
.hy-mk.done { background: #F2B33D; color: #fff; font-size: 18px; border-color: #B5602A; }
.hy-mk.cur { background: #fff; animation: hymk 1.6s infinite ease-in-out; }
.hy-mk.sel { outline: 3px solid #E85D4A; outline-offset: 2px; }
@keyframes hymk { 0%, 100% { transform: translate(-50%, -50%) scale(1) } 50% { transform: translate(-50%, -50%) scale(1.15) } }

.hy-era { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin: 14px 2px 6px; flex-wrap: wrap; }
.hy-era b { font-size: 17px; }
.hy-era span { font-size: 14px; color: #8B7A63; }
.hy-list { background: #fff; border: 2px solid #E6DCCB; border-radius: 16px; padding: 2px 10px; margin-bottom: 18px; }
.hy-ch { display: flex; align-items: center; gap: 10px; padding: 11px 2px; border-bottom: 1.5px dashed #E6DCCB; cursor: pointer; }
.hy-ch:last-child { border-bottom: 0; }
.hy-ch i {
  width: 30px; height: 30px; border-radius: 50%; flex: none; display: grid; place-items: center;
  font-style: normal; font-weight: 900; font-size: 14px; background: #F4EBDD; color: #8B7A63;
}
.hy-ch b { flex: 1; font-size: 16px; line-height: 1.3; }
.hy-ch span { font-size: 14px; color: #8B7A63; white-space: nowrap; }
.hy-ch.done i { background: #7BC96F; color: #fff; }
.hy-ch.now { background: #FFF1D6; border-radius: 12px; padding-left: 6px; padding-right: 6px; }
.hy-ch.now i { background: #F2B33D; color: #fff; }
.hy-ch.now span { color: #B5602A; font-weight: 900; }
.hy-ch.soon b, .hy-ch.soon i { opacity: .5; }

/* ---------- 一章 ---------- */
.hy-pic { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 16px; border: 2px solid #4A3728; }
.hy-pic.sm { aspect-ratio: 16 / 9; object-position: 50% 40%; }
.hy-t { text-align: center; margin: 10px 0 8px; }
.hy-t small { display: block; font-size: 14px; color: #8B7A63; }
.hy-t b { display: block; font-size: 23px; line-height: 1.3; }
.hy-lines { background: #fff; border: 2px solid #E6DCCB; border-radius: 16px; padding: 4px 12px; margin-bottom: 14px; }
.hy-l { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; border-bottom: 1.5px dashed #E6DCCB; cursor: pointer; }
.hy-l:last-child { border-bottom: 0; }
.hy-l i { font-style: normal; font-size: 20px; line-height: 1.3; }
.hy-l span { font-size: 16px; line-height: 1.5; }
.hy-again { text-align: center; font-size: 14px; color: #8B7A63; margin: 0 0 10px; }
.hy-c .hm-go { margin-bottom: 18px; }

/* ---------- 3道题 ---------- */
.hy-qq { font-size: 20px; font-weight: 900; line-height: 1.45; text-align: center; margin: 14px 4px 12px; text-wrap: balance; cursor: pointer; }
.hy-opts { display: grid; gap: 10px; }
.hy-o {
  font: inherit; font-size: 17px; font-weight: 800; text-align: center; line-height: 1.4; color: #4A3728;
  background: #fff; border: 2px solid #4A3728; border-radius: 14px; padding: 12px 10px; cursor: pointer;
  box-shadow: 0 3px 0 rgba(74, 55, 40, .3);
}
.hy-o.ok { background: #EAF6E4; border-color: #3c8a33; color: #3c8a33; }
.hy-o.ok::after { content: " ✓"; }
.hy-o.no { animation: hyno .4s; border-color: #E9A79F; }
@keyframes hyno { 25% { transform: translateX(-6px) } 75% { transform: translateX(6px) } }
.hy-tip { min-height: 22px; text-align: center; font-size: 15px; color: #B5602A; font-weight: 800; margin: 12px 0; }

/* ---------- 读完 ---------- */
.hy-d { text-align: center; padding-top: calc(60px + env(safe-area-inset-top)); }
.hy-big { font-size: 72px; }
.hy-dt { display: block; font-size: 22px; margin: 8px 0; }
.hy-st { font-size: 30px; font-weight: 900; color: #E5A100; margin-bottom: 22px; }
.hy-d .hm-go { margin-top: 10px; }

/* ---------- 读完一站：徽章（从长河图上裁这一站的地标） ---------- */
.hy-emod { text-align: center; }
.hy-badge { width: 150px; height: 150px; margin: 4px auto 12px; border-radius: 50%; border: 6px solid #F2B33D; box-shadow: 0 0 0 3px #B5602A, 0 6px 14px rgba(0, 0, 0, .2); background-repeat: no-repeat; }
.hy-emod b { display: block; font-size: 18px; margin-bottom: 14px; text-wrap: balance; }

/* ---------- 卡册「历史徽章」（rewards.js histBadges） ---------- */
.ab-badges.folded { display: none; }
.ab-h .hy-mini { width: 58px; height: 58px; border-radius: 50%; border: 3px solid #E6DCCB; background-repeat: no-repeat; filter: grayscale(1); opacity: .35; }
.ab-h .hy-mini.img { border: 0; object-fit: contain; }
.ab-h.on .hy-mini { filter: none; opacity: 1; border-color: #F2B33D; box-shadow: 0 0 0 2px #B5602A; }
.ab-h.on .hy-mini.img { box-shadow: none; }
.ab-badges + .ab-more { margin-top: 8px; }
.hy-badge.img { border: 0; box-shadow: none; border-radius: 0; object-fit: contain; }
.hy-emod p { font-size: 15px; color: #6f6252; margin: -6px 0 14px; }

/* ---------- 找不同（steps/spot.js，2026-10-12） ---------- */
.sp-tip { text-align: center; font-size: 15px; font-weight: 800; color: #6f6252; margin: 0 0 8px; cursor: pointer; }
.sp-pic { position: relative; border-radius: 14px; overflow: hidden; border: 2px solid #4A3728; cursor: pointer; touch-action: manipulation; }
.sp-pic img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; pointer-events: none; }
.sp-lay { position: absolute; inset: 0; pointer-events: none; }
.sp-ring { position: absolute; transform: translate(-50%, -50%); border: 4px solid #E85D4A; border-radius: 50%; box-shadow: 0 0 0 3px rgba(255, 255, 255, .8); animation: spin-in .35s ease-out; }
@keyframes spin-in { from { transform: translate(-50%, -50%) scale(1.6); opacity: 0 } }
.sp-x { position: absolute; transform: translate(-50%, -50%); font-style: normal; font-weight: 900; font-size: 22px; color: #E85D4A; text-shadow: 0 0 3px #fff; animation: spx .7s forwards; }
@keyframes spx { to { opacity: 0; transform: translate(-50%, -80%) } }
.sp-hint { position: absolute; transform: translate(-50%, -50%); border-radius: 50%; background: rgba(255, 230, 120, .45); animation: sphint 1.1s 2 ease-in-out; }
@keyframes sphint { 50% { background: rgba(255, 230, 120, .05) } }
.sp-bar { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 8px 0; font-weight: 900; font-size: 15px; }
.sp-dot { width: 16px; height: 16px; border-radius: 50%; border: 2px solid #4A3728; background: #fff; }
.sp-dot.on { background: #E85D4A; }
.sp.frozen .sp-pic { opacity: .55; }
.sp-q { text-align: center; }
.sp-w { display: flex; flex-direction: column; align-items: center; gap: 4px; margin-bottom: 6px; }
.sp-w .wart, .sp-w svg, .sp-w img { width: 96px; height: 96px; display: block; border-radius: 12px; }
.sp-w b { font-size: 24px; font-family: var(--en, inherit); }
.sp-qq { font-size: 19px; font-weight: 900; margin: 6px 0 2px; cursor: pointer; }
.sp-q small { display: block; font-size: 14px; color: #8B7A63; margin-bottom: 10px; }
.sp-opts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.sp-o { font: inherit; font-size: 18px; font-weight: 900; padding: 12px 4px; border-radius: 14px; border: 2px solid #4A3728; background: #fff; color: #4A3728; cursor: pointer; }
.sp-o.ok { background: #EAF6E4; border-color: #3c8a33; color: #3c8a33; }
.sp-o.no { animation: hyno .4s; border-color: #E9A79F; }
.sp-done { text-align: center; }
.sp-big { font-size: 60px; }
.sp-done b { display: block; font-size: 20px; margin: 6px 0; }
.sp-st { font-size: 26px; font-weight: 900; color: #E5A100; margin-bottom: 10px; }
/* 两张图一屏放下：每张边长取「屏幕宽」和「(屏幕高−顶栏提示进度)/2」里小的那个 */
.sp .sp-pic { width: min(100%, calc((100dvh - 150px - env(safe-area-inset-top) - env(safe-area-inset-bottom)) / 2)); margin: 0 auto; }
.sp .sp-tip { margin-bottom: 6px; }
.sp .sp-bar { margin: 6px 0; }

/* 首页「阅读小屋」横条（js/tabs/reading-row.js）：红色系，和精灵球、阅读小屋一致 */
.hm-read.hm-book { background: #FFEDE8; border-color: #FF8A7A; box-shadow: 0 3px 0 #F5B3A8; }
.hm-read.hm-book:active { box-shadow: 0 1px 0 #F5B3A8; }
.hm-read.hm-book span { color: #A0523F; }
.hm-read.hm-book.ok { background: #F6F1E6; border-color: #E6DCCB; box-shadow: none; }
.hm-read.hm-book.ok span { color: #3c8a33; }
.hm-book img { object-fit: cover; object-position: top; }
.hm-book .rd-ic { width: 46px; height: 46px; border-radius: 10px; flex: none; background: #fff; display: grid; place-items: center; font-size: 24px; font-style: normal; }

/* 字母乐园＋阅读小屋并排两块（四条横条一屏放不下）；孩子看的字仍≥14px，副标题最多两行 */
.hm-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.hm-pair .hm-read { margin-top: 0; padding: 8px; gap: 8px; min-width: 0; }
.hm-pair .go { display: none; }
.hm-pair .hm-read img, .hm-pair .abi, .hm-pair .rd-ic { width: 40px; height: 40px; }
.hm-pair .hm-read b { font-size: 16px; }
.hm-pair .hm-read .t span { font-size: 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; text-wrap: wrap; }
