:root {
  --bg-cream: #FBF6EE;
  --paper-white: #FFFDF9;
  --paper-warm: #F4E8D5;
  --wood-border: #D9C0A1;
  --terracotta: #C96F53;
  --terracotta-dark: #A95338;
  --sage: #5E8067;
  --gold: #E2A03B;
  --danger: #D95338;
  --ink: #3C2B1E;
  --ink-muted: #765E4C;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
}

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #E5D6C1;
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Segoe UI", sans-serif;
}

.arena-shell {
  position: relative;
  width: 100%;
  max-width: 430px;
  height: 100dvh;
  margin: 0 auto;
  overflow: hidden;
  background: var(--bg-cream);
  box-shadow: 0 0 42px rgba(60, 43, 30, 0.18);
}

#glCanvas, #fxCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
}

#glCanvas { z-index: 1; }
#fxCanvas { z-index: 4; }

.mob-badge {
  position: absolute;
  left: 0;
  top: 0;
  transform: translate3d(-999px, -999px, 0);
  will-change: transform;
  z-index: 12;
  background: #365A3F;
  color: #FFFDF9;
  border: 2.5px solid #FFFDF9;
  border-radius: 999px;
  padding: 3px 14px;
  font-size: 16px;
  font-weight: 900;
  box-shadow: 0 6px 14px rgba(54, 90, 63, 0.35);
  pointer-events: none;
}

.mob-badge.hidden { display: none; }

.loading-veil {
  position: absolute;
  inset: 0;
  z-index: 28;
  background: rgba(246, 235, 217, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.25s ease;
}

.loading-veil.hidden {
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
}

.loading-card {
  background: var(--paper-white);
  border: 2px solid var(--wood-border);
  border-radius: 20px;
  padding: 18px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  box-shadow: 0 12px 28px rgba(60, 43, 30, 0.14);
}

.loading-spinner {
  width: 28px;
  height: 28px;
  border: 3.5px solid #EAD8C0;
  border-top-color: var(--terracotta);
  border-radius: 50%;
  animation: spin3d 0.75s linear infinite;
}

@keyframes spin3d {
  to { transform: rotate(360deg); }
}

.loading-title {
  font-size: 14px;
  font-weight: 900;
  color: var(--ink);
}

/* ========== 顶部 HUD + 玩法赛马切换条 ========== */
.top-chrome {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 30;
  padding: calc(8px + env(safe-area-inset-top)) 12px 6px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  pointer-events: none;
}

.top-row, .mode-tabs { pointer-events: auto; }

.top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.brand-stats, .top-actions {
  display: flex;
  align-items: center;
  gap: 5px;
}

.stat-chip {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: rgba(255, 253, 249, 0.94);
  border: 1.5px solid var(--wood-border);
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 12px;
  font-weight: 900;
  color: var(--ink);
  box-shadow: 0 3px 8px rgba(60, 43, 30, 0.10);
  white-space: nowrap;
}

.score-chip .ico { width: 14px; height: 14px; color: var(--gold); }
.relay-chip { background: #FFF2E6; border-color: #E3A789; color: #9C4327; }
.relay-chip.hidden { display: none; }
.squad-chip { background: #EDF4EE; border-color: #A7C2AE; color: #365A3F; }
.squad-chip.hidden, .combo-chip.hidden { display: none; }

.combo-chip {
  background: linear-gradient(180deg, #FFF2CC 0%, #FBD987 100%);
  border-color: var(--gold);
  color: #9A5508;
  animation: popBounce 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes popBounce {
  0% { transform: scale(0.75); }
  65% { transform: scale(1.16); }
  100% { transform: scale(1); }
}

.act-btn {
  appearance: none;
  border: 1.5px solid var(--wood-border);
  background: rgba(255, 253, 249, 0.94);
  color: var(--ink);
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 11.5px;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.act-btn.icon-btn { padding: 4px 7px; }
.act-btn.help-btn {
  min-width: 26px;
  font-weight: 900;
  color: var(--terracotta-dark);
  background: #FFF3E4;
  border-color: #E2B394;
}
.act-btn .ico { width: 14px; height: 14px; }
.act-btn.muted { opacity: 0.45; }

.mode-tabs {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 4px;
}

.mode-tab {
  min-width: 0;
  appearance: none;
  border: 1.5px solid #D8C0A2;
  background: rgba(255, 253, 249, 0.94);
  color: var(--ink-muted);
  border-radius: 11px;
  padding: 6px 2px;
  font-size: 11px;
  font-weight: 900;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  overflow: hidden;
  box-shadow: 0 3px 8px rgba(60, 43, 30, 0.08);
}

.mode-tab.relay-tab {
  border-color: #E2A03B;
  background: linear-gradient(180deg, #FFF9EB 0%, #FCE9C3 100%);
  color: #8A4A12;
}

.mode-tab.active {
  background: linear-gradient(180deg, var(--terracotta) 0%, var(--terracotta-dark) 100%);
  border-color: var(--terracotta-dark);
  color: #FFFDF9;
  box-shadow: 0 5px 14px rgba(169, 83, 56, 0.28);
}

.mode-tab.locked {
  flex: 0.72;
  opacity: 0.72;
  font-size: 11px;
  background: rgba(244, 232, 213, 0.9);
}

.tab-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 18px;
  padding: 0 4px;
  border-radius: 6px;
  background: rgba(60, 43, 30, 0.12);
  font-size: 10px;
  font-weight: 900;
}

.mode-tab.active .tab-num { background: rgba(255, 253, 249, 0.24); }

.act-btn.menu-btn {
  padding: 5px 11px;
  font-size: 12px;
  background: rgba(255, 253, 249, 0.92);
  border-color: #D8C0A2;
  color: var(--ink);
}

.deck-pill-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 6px;
}

.deck-pill {
  appearance: none;
  border: 1.5px solid #D8C0A2;
  background: var(--bg-cream);
  color: var(--ink);
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 11.5px;
  font-weight: 800;
  cursor: pointer;
}

.deck-pill.active {
  background: var(--sage);
  border-color: #466B4F;
  color: #FFFDF9;
}

.mode-menu-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 12px;
}

.mode-menu-grid .mode-tab {
  padding: 10px 8px;
  font-size: 13px;
  border-radius: 13px;
}

.mode-menu-grid .mode-tab.relay-tab {
  grid-column: 1 / -1;
}

.menu-tools-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.menu-tools-row .ghost-btn {
  padding: 8px 6px;
  font-size: 12px;
}

/* ========== 绝对唯一主角：带向下对话尖角的纯净折纸发问气泡 ========== */
.question-hero {
  position: absolute;
  top: calc(68px + env(safe-area-inset-top));
  left: 50%;
  transform: translateX(-50%);
  z-index: 26;
  width: 92%;
  background: rgba(255, 253, 249, 0.98);
  border: 3px solid var(--terracotta);
  border-radius: 22px 10px 22px 22px;
  padding: 12px 14px 10px;
  box-shadow: 0 14px 30px rgba(60, 43, 30, 0.16), 0 0 0 4px rgba(255, 253, 249, 0.78);
  pointer-events: none;
}

/* 向下方游戏舞台伸出的折纸对话尖角——一眼秒懂“萌宠在向你发问”！ */
.question-hero::after {
  content: "";
  position: absolute;
  bottom: -12px;
  left: 48%;
  width: 18px;
  height: 18px;
  background: inherit;
  border-right: 3px solid;
  border-bottom: 3px solid;
  border-color: inherit;
  transform: rotate(45deg);
  border-bottom-right-radius: 4px;
}

.question-hero::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 16px;
  height: 16px;
  background: linear-gradient(225deg, #E3B6A6 48%, rgba(255, 253, 249, 0.9) 52%);
  border-bottom-left-radius: 5px;
}

.q-text-col {
  flex: 1;
  min-width: 0;
}

.q-meta-mini {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}

.q-hint-mini {
  font-size: 11px;
  font-weight: 800;
  color: var(--ink-muted);
  margin-right: auto;
}

.q-body-row {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 8px;
}

.q-mascot-chip {
  flex: 0 0 56px;
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: #FFF6E6;
  border: 2.5px solid var(--terracotta);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(60, 43, 30, 0.12);
  animation: mascotBob 1.3s ease-in-out infinite;
}

.q-mascot-chip.hidden { display: none; }

.q-mascot-chip img {
  width: 46px;
  height: 46px;
  object-fit: contain;
}

.q-prompt {
  font-size: 20.5px;
  line-height: 1.28;
  font-weight: 900;
  color: #24160C;
  margin-bottom: 0;
}

.question-hero.urgent {
  border-color: var(--danger);
  box-shadow: 0 12px 28px rgba(217, 83, 56, 0.28), 0 0 0 3px rgba(255, 232, 224, 0.9);
}

.question-hero.cleared {
  border-color: var(--sage);
  box-shadow: 0 12px 28px rgba(94, 128, 103, 0.24), 0 0 0 3px rgba(232, 245, 235, 0.9);
}

.q-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 5px;
}

.q-badge {
  background: var(--terracotta);
  color: #FFFDF9;
  font-size: 11.5px;
  font-weight: 900;
  padding: 2px 9px;
  border-radius: 999px;
}

.q-hint-pill {
  flex: 1;
  font-size: 11px;
  font-weight: 900;
  color: var(--terracotta-dark);
  background: #F9EBDD;
  border: 1px solid #E5C5AC;
  padding: 2px 8px;
  border-radius: 999px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
}

.q-hint-pill.tier-3 { background: #FFF2D9; border-color: #E6A94A; color: #8B4A08; }
.q-hint-pill.tier-2 { background: #EAF4EC; border-color: #9BC0A4; color: #2E5B39; }
.q-hint-pill.tier-1 { background: #EDF3FA; border-color: #9BB8D4; color: #2A547A; }
.q-hint-pill.tier-0 { background: #F5ECE4; border-color: #D7C2AE; color: #6E523F; }

.q-body-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 7px;
}

.q-mascot-chip {
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: #FFF6E6;
  border: 2.5px solid var(--terracotta);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(60, 43, 30, 0.12);
  animation: mascotBob 1.3s ease-in-out infinite;
}

.q-mascot-chip.hidden { display: none; }

.q-mascot-chip img {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

@keyframes mascotBob {
  0%, 100% { transform: translateY(0) rotate(-5.5deg) scale(1.03, 0.97); }
  50% { transform: translateY(-5px) rotate(5.5deg) scale(0.97, 1.04); }
}

.q-timer-text {
  font-size: 13px;
  font-weight: 900;
  color: var(--terracotta-dark);
  font-variant-numeric: tabular-nums;
}

.question-hero.urgent .q-timer-text { color: var(--danger); }
.question-hero.cleared .q-timer-text { color: var(--sage); }

.q-prompt {
  flex: 1;
  min-width: 0;
  font-size: 18.5px;
  line-height: 1.26;
  font-weight: 900;
  color: var(--ink);
  margin-bottom: 0;
}

.relay-stepper {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  margin-top: 7px;
}

.relay-stepper.hidden { display: none; }

.relay-step {
  background: #F2E7D8;
  color: #8A715D;
  border-radius: 7px;
  padding: 3px 2px;
  font-size: 10px;
  font-weight: 900;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.relay-step.done {
  background: #DFEFE2;
  color: #366141;
}

.relay-step.active {
  background: var(--terracotta);
  color: #FFFDF9;
  box-shadow: 0 2px 6px rgba(201, 111, 83, 0.3);
}

/* ========== 长页面竖向无缝滚动切换层（彻底零中间打断页，心流一秒不断） ========== */
.scroll-reel-layer {
  position: absolute;
  inset: 0;
  z-index: 26;
  pointer-events: none;
  overflow: visible;
  will-change: transform;
  transform: translate3d(0, 0, 0);
}

.scroll-reel-layer.hidden { display: none; }

.scroll-prev-snap {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #F4E9D8;
}

.scroll-seam-bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -18px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 18px;
  background: linear-gradient(180deg, rgba(244, 233, 216, 0) 0%, #EFE1CB 45%, #EFE1CB 55%, rgba(244, 233, 216, 0) 100%);
}

.scroll-seam-line {
  flex: 1;
  height: 0;
  border-top: 2px dashed #C7A47D;
}

.scroll-seam-pill {
  flex: 0 0 auto;
  background: linear-gradient(180deg, #D57A5C 0%, #B85A3D 100%);
  color: #FFFDF9;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.4px;
  padding: 4px 14px;
  border-radius: 10px 4px 10px 4px;
  box-shadow: 0 4px 12px rgba(154, 72, 46, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.32);
}

.scroll-reel-layer.scrolling-out {
  animation: reelScrollOut 0.68s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.arena-shell.reel-scrolling #fxCanvas,
.arena-shell.reel-scrolling #glCanvas {
  animation: reelScrollIn 0.68s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.arena-shell.reel-scrolling #questionHero,
.arena-shell.reel-scrolling #mobLaneBar,
.arena-shell.reel-scrolling #gestureHint {
  animation: reelScrollInCentered 0.68s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes reelScrollOut {
  0% { transform: translate3d(0, 0%, 0); }
  100% { transform: translate3d(0, -104%, 0); }
}

@keyframes reelScrollIn {
  0% { transform: translate3d(0, 100%, 0); }
  100% { transform: translate3d(0, 0%, 0); }
}

@keyframes reelScrollInCentered {
  0% { transform: translate3d(-50%, 100vh, 0); }
  100% { transform: translate3d(-50%, 0, 0); }
}

@keyframes curtainPop {
  0% { transform: scale(0.84) rotate(-2deg); opacity: 0; }
  100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

.score-dot {
  width: 9px;
  height: 9px;
  border-radius: 3px 1px 3px 3px;
  transform: rotate(45deg);
  background: linear-gradient(135deg, #E5A13B 0%, #C96F53 100%);
  flex: 0 0 auto;
}

/* ========== 底部居中专属暖日系折纸圆形进度表盘（上面看题、下面连接下一题，纯 CSS 零 SVG） ========== */
.bottom-dial-dock {
  position: absolute;
  left: 50%;
  bottom: max(10px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 26;
  pointer-events: none;
  display: flex;
  justify-content: center;
}

.mastery-dial-chip {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 5px 15px 5px 6px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 253, 248, 0.97) 0%, rgba(246, 234, 215, 0.97) 100%);
  border: 2px solid #CFAF88;
  box-shadow: 0 8px 20px rgba(60, 40, 24, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  transition: transform 0.2s cubic-bezier(0.22, 1.56, 0.36, 1), border-color 0.2s ease;
}

.mastery-dial-chip.hidden { display: none !important; }

.mastery-dial-chip.pulse {
  transform: scale(1.07);
  border-color: #53825E;
}

.mastery-dial-chip.ready {
  border-color: #4E7A59;
  background: linear-gradient(180deg, #F1F9F2 0%, #DBEDDE 100%);
}

.mastery-dial {
  position: relative;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: conic-gradient(
    var(--dial-color, #C96F53) calc(var(--pct, 0) * 1%),
    #E7D8C2 0
  );
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  box-shadow: inset 0 1px 3px rgba(60, 43, 30, 0.16);
}

.mastery-dial::after {
  content: "";
  position: absolute;
  inset: 5.5px;
  border-radius: 50%;
  background: #FFFDF8;
  box-shadow: 0 1px 2px rgba(60, 43, 30, 0.08);
}

.mastery-dial-val {
  position: relative;
  z-index: 1;
  font-size: 11px;
  font-weight: 900;
  color: #4A311E;
  letter-spacing: -0.3px;
}

.mastery-dial-meta {
  display: flex;
  flex-direction: column;
  line-height: 1.22;
  text-align: left;
  white-space: nowrap;
}

.mastery-dial-meta strong {
  font-size: 12px;
  font-weight: 900;
  color: #4A3321;
}

.mastery-dial-meta span {
  font-size: 10.5px;
  font-weight: 800;
  color: #966B47;
}

.gesture-hint {
  bottom: 72px !important;
}

/* ========== 通关大勋章弹窗 ========== */
.victory-sheet { text-align: center; }

.victory-medal {
  width: 64px;
  height: 64px;
  margin: 0 auto 10px;
  border-radius: 50%;
  background: linear-gradient(180deg, #FFE08A 0%, #E2A03B 100%);
  border: 3px solid #FFFDF9;
  box-shadow: 0 10px 24px rgba(226, 160, 59, 0.42);
  color: #FFFDF9;
  font-size: 34px;
  line-height: 58px;
  font-weight: 900;
}

.victory-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 12px 0 14px;
}

.v-stat-box {
  background: var(--bg-cream);
  border: 1.5px solid #E2CEB4;
  border-radius: 12px;
  padding: 8px 6px;
}

.v-stat-val {
  font-size: 18px;
  font-weight: 900;
  color: var(--terracotta-dark);
}

.v-stat-lbl {
  font-size: 11px;
  font-weight: 800;
  color: var(--ink-muted);
}

.q-timer-track {
  width: 100%;
  height: 8px;
  background: #EFE3D2;
  border-radius: 999px;
  overflow: hidden;
}

.q-timer-fill {
  height: 100%;
  width: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #E2A03B 0%, #C96F53 100%);
  transform-origin: left center;
}

.question-hero.urgent .q-timer-fill { background: linear-gradient(90deg, #E65C3E 0%, #C92F1A 100%); }
.question-hero.cleared .q-timer-fill { background: linear-gradient(90deg, #6E9B79 0%, #4E7A59 100%); }

/* ========== 3D 萌宠撞门底部超清 A/B 选道直读大牌 ========== */
.mob-lane-bar {
  position: absolute;
  bottom: calc(16px + env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  width: 92%;
  z-index: 28;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.mob-lane-bar.hidden { display: none; }

.lane-opt-btn {
  appearance: none;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 12px;
  border-radius: 16px;
  background: rgba(255, 253, 249, 0.96);
  border: 2.5px solid #D7C1A5;
  box-shadow: 0 8px 20px rgba(60, 43, 30, 0.16);
  cursor: pointer;
  text-align: left;
  transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease, background 0.12s ease;
}

.lane-opt-btn:active { transform: scale(0.96); }

.lane-opt-btn.lane-left {
  border-color: #7FA9CC;
  animation: laneCardWiggle 2.2s ease-in-out infinite;
}
.lane-opt-btn.lane-right {
  border-color: #DC957C;
  animation: laneCardWiggle 2.2s ease-in-out -1.1s infinite;
}

@keyframes laneCardWiggle {
  0%, 100% { transform: translateY(0) rotate(-1.6deg) scale(1.01, 0.99); }
  50% { transform: translateY(-3.5px) rotate(1.6deg) scale(0.99, 1.02); }
}

.lane-opt-btn.lane-left.active {
  background: linear-gradient(180deg, #EEF7FF 0%, #D9ECFC 100%);
  border-color: #2E6896;
  box-shadow: 0 10px 22px rgba(46, 104, 150, 0.28), 0 0 0 3px rgba(255, 253, 249, 0.85);
  transform: translateY(-2px);
}

.lane-opt-btn.lane-right.active {
  background: linear-gradient(180deg, #FFF7EE 0%, #FCE5CA 100%);
  border-color: #B8593A;
  box-shadow: 0 10px 22px rgba(184, 89, 58, 0.28), 0 0 0 3px rgba(255, 253, 249, 0.85);
  transform: translateY(-2px);
}

.lane-opt-badge {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 900;
  color: #FFFDF9;
}

.lane-left .lane-opt-badge { background: #3B739E; }
.lane-right .lane-opt-badge { background: #C96F53; }

.lane-opt-text {
  flex: 1;
  min-width: 0;
  font-size: 17px;
  line-height: 1.2;
  font-weight: 900;
  color: #2B1B10;
  word-break: break-word;
}

/* ========== 轻盈暖棉纸折角助记金句条（移至底边安全区，100% 不挡上方萌宠图标） ========== */
.feedback-banner {
  position: absolute;
  bottom: calc(14px + env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  z-index: 35;
  width: 92%;
  background: rgba(255, 252, 246, 0.94);
  border: 2px solid #D9B892;
  border-radius: 14px 4px 14px 14px;
  padding: 7px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 8px 20px rgba(60, 43, 30, 0.14);
  pointer-events: none;
  backdrop-filter: blur(6px);
}

.feedback-banner::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 12px;
  height: 12px;
  background: linear-gradient(225deg, #E3C9A8 48%, rgba(255, 252, 246, 0.95) 52%);
  border-bottom-left-radius: 4px;
}

.feedback-banner.wrong { background: rgba(255, 243, 238, 0.95); border-color: #DF947E; }
.feedback-banner.hidden { display: none; }

.fb-tag {
  flex-shrink: 0;
  background: var(--terracotta);
  color: #FFFDF9;
  font-size: 11.5px;
  font-weight: 900;
  padding: 3px 9px;
  border-radius: 999px;
}

.feedback-banner.wrong .fb-tag { background: #D95338; color: #FFFDF9; }
.fb-text { font-size: 12.5px; font-weight: 800; color: var(--ink); line-height: 1.35; }

.gesture-hint {
  position: absolute;
  bottom: calc(16px + env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  z-index: 22;
  background: rgba(255, 252, 246, 0.88);
  border: 1.5px solid #D9BE9C;
  color: var(--ink);
  padding: 6px 15px;
  border-radius: 12px 4px 12px 12px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(60, 43, 30, 0.10);
  pointer-events: none;
}

.gesture-hint.hidden { display: none; }

/* ========== 抽屉 ========== */
.drawer-backdrop {
  position: absolute;
  inset: 0;
  z-index: 50;
  background: rgba(60, 43, 30, 0.44);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.drawer-backdrop.hidden { display: none; }

.paper-sheet {
  width: 100%;
  max-width: 360px;
  background: var(--paper-white);
  border: 2px solid var(--wood-border);
  border-radius: 20px;
  padding: 16px;
  box-shadow: 0 24px 48px rgba(60, 43, 30, 0.25);
}

.sheet-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.sheet-head h2 { margin: 0; font-size: 16px; font-weight: 900; }
.close-btn { border: none; background: var(--paper-warm); color: var(--ink); width: 28px; height: 28px; border-radius: 50%; font-size: 18px; font-weight: 800; cursor: pointer; }
.sheet-desc { margin: 0 0 12px; font-size: 12.5px; line-height: 1.45; color: var(--ink-muted); }
.stats-grid { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.stat-row-card { background: var(--bg-cream); border: 1.5px solid #E2CEB4; border-radius: 12px; padding: 10px 12px; }
.stat-row-top { display: flex; justify-content: space-between; font-size: 13.5px; font-weight: 900; margin-bottom: 4px; }
.stat-row-sub { font-size: 12px; color: var(--ink-muted); display: flex; justify-content: space-between; }
.import-box { width: 100%; border: 1.5px solid var(--wood-border); border-radius: 12px; background: var(--bg-cream); padding: 10px 12px; font-size: 13px; line-height: 1.45; color: var(--ink); resize: none; margin-bottom: 10px; font-family: inherit; user-select: text; -webkit-user-select: text; }
.sheet-actions { display: flex; flex-direction: column; gap: 8px; }
.primary-btn { width: 100%; border: none; border-radius: 999px; padding: 11px 16px; background: linear-gradient(180deg, var(--terracotta) 0%, var(--terracotta-dark) 100%); color: #FFFDF9; font-size: 14px; font-weight: 900; cursor: pointer; }
.ghost-btn { width: 100%; border: 1.5px solid var(--wood-border); border-radius: 999px; padding: 10px 16px; background: var(--paper-warm); color: var(--ink); font-size: 13px; font-weight: 800; cursor: pointer; }

/* ========== 消消乐级顶部吸顶动感 & 活态微动效（r9） ========== */
.stat-chip {
  transition: transform 0.16s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.18s ease, background 0.18s ease;
  will-change: transform;
}

.stat-chip.hud-bump {
  animation: match3HudBump 0.38s cubic-bezier(0.22, 1.56, 0.36, 1);
  box-shadow: 0 6px 18px rgba(226, 160, 59, 0.45), 0 0 0 3px rgba(255, 240, 194, 0.9);
}

.score-chip.hud-bump .ico {
  animation: starSpinPop 0.42s cubic-bezier(0.22, 1.56, 0.36, 1);
}

@keyframes match3HudBump {
  0% { transform: scale(1, 1) translateY(0); }
  28% { transform: scale(1.06, 1.14) translateY(-3px); }
  58% { transform: scale(0.97, 0.94) translateY(1px); }
  82% { transform: scale(1.03, 1.04) translateY(-1px); }
  100% { transform: scale(1, 1) translateY(0); }
}

@keyframes starSpinPop {
  0% { transform: scale(1) rotate(0deg); }
  45% { transform: scale(1.45) rotate(140deg); }
  100% { transform: scale(1) rotate(360deg); }
}

.act-btn {
  transition: transform 0.16s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.16s ease;
}
.act-btn:hover { transform: translateY(-1.5px) scale(1.05); box-shadow: 0 5px 12px rgba(60, 43, 30, 0.14); }
.act-btn:active { transform: scale(0.92); }

/* 顶部正中消消乐式分级欢呼浮标（独立悬于顶栏与题卡之间的 34px 专属天空带，零遮挡零压线） */
.top-celebrate-badge {
  position: absolute;
  top: calc(39px + env(safe-area-inset-top));
  left: 50%;
  transform: translateX(-50%);
  z-index: 36;
  padding: 2px 14px;
  border-radius: 999px;
  background: linear-gradient(180deg, #FFE699 0%, #E89D32 100%);
  border: 2px solid #FFFDF9;
  color: #5A2C06;
  font-size: 12.5px;
  line-height: 1.35;
  font-weight: 900;
  letter-spacing: 0.04em;
  white-space: nowrap;
  pointer-events: none;
  box-shadow: 0 6px 16px rgba(226, 160, 59, 0.44), 0 0 0 2.5px rgba(255, 243, 206, 0.85);
}

.top-celebrate-badge.hidden { display: none; }

.top-celebrate-badge.pop-in {
  animation: topBadgePop 0.92s cubic-bezier(0.22, 1.56, 0.36, 1) forwards;
}

.top-celebrate-badge.tier-hot {
  background: linear-gradient(180deg, #FFD27A 0%, #D9653B 100%);
  color: #FFFDF9;
  box-shadow: 0 10px 26px rgba(201, 111, 83, 0.52), 0 0 0 3px rgba(255, 232, 214, 0.9);
}

@keyframes topBadgePop {
  0% { transform: translateX(-50%) translateY(10px) scale(0.45) rotate(-6deg); opacity: 0; }
  22% { transform: translateX(-50%) translateY(-4px) scale(1.18) rotate(3deg); opacity: 1; }
  40% { transform: translateX(-50%) translateY(0) scale(0.98) rotate(-1deg); opacity: 1; }
  75% { transform: translateX(-50%) translateY(-2px) scale(1.02) rotate(0deg); opacity: 1; }
  100% { transform: translateX(-50%) translateY(-14px) scale(0.86); opacity: 0; }
}

/* 题目气泡流光层与吸顶脉冲 */
.question-hero {
  overflow: visible;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s ease, border-color 0.2s ease;
}

.q-shimmer-layer {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  overflow: hidden;
  pointer-events: none;
}

.q-shimmer-layer::after {
  content: "";
  position: absolute;
  top: -20%;
  left: -60%;
  width: 48%;
  height: 140%;
  background: linear-gradient(105deg, rgba(255, 255, 255, 0) 0%, rgba(255, 236, 179, 0.72) 50%, rgba(255, 255, 255, 0) 100%);
  transform: skewX(-18deg);
  opacity: 0;
}

.question-hero.celebrate-pulse {
  animation: heroJuiceBounce 0.44s cubic-bezier(0.22, 1.56, 0.36, 1);
}

.question-hero.celebrate-pulse .q-shimmer-layer::after {
  animation: shimmerSweep 0.56s ease-out;
}

.question-hero.celebrate-pulse .q-mascot-chip {
  animation: mascotCheerJump 0.52s cubic-bezier(0.22, 1.56, 0.36, 1);
}

.question-hero.fever-glow {
  box-shadow: 0 14px 32px rgba(226, 160, 59, 0.32), 0 0 0 4px rgba(255, 238, 194, 0.92);
}

@keyframes heroJuiceBounce {
  0% { transform: translateX(-50%) scale(1, 1); }
  26% { transform: translateX(-50%) scale(1.045, 0.95) translateY(-3px); }
  58% { transform: translateX(-50%) scale(0.985, 1.03) translateY(1px); }
  100% { transform: translateX(-50%) scale(1, 1); }
}

@keyframes shimmerSweep {
  0% { left: -60%; opacity: 0.95; }
  100% { left: 130%; opacity: 0; }
}

@keyframes mascotCheerJump {
  0% { transform: translateY(0) scale(1) rotate(0deg); }
  30% { transform: translateY(-11px) scale(1.22, 0.92) rotate(-10deg); }
  62% { transform: translateY(2px) scale(0.92, 1.12) rotate(8deg); }
  100% { transform: translateY(0) scale(1) rotate(0deg); }
}

/* ========== r13：题干核心锚点高亮 + 成对焊牢记忆卡 + 肉鸽无尽解锁祝福 ========== */
.q-anchor-hl {
  background: linear-gradient(180deg, transparent 52%, rgba(235, 179, 86, 0.45) 52%, rgba(235, 179, 86, 0.45) 94%, transparent 94%);
  color: #7D3418;
  font-weight: 900;
  padding: 0 3px;
  border-radius: 4px;
}

.question-hero.focus-in {
  animation: heroReadFocus 0.45s cubic-bezier(0.22, 1.4, 0.36, 1);
}

@keyframes heroReadFocus {
  0% { transform: translateX(-50%) scale(0.96); box-shadow: 0 8px 20px rgba(60, 43, 30, 0.12); }
  45% { transform: translateX(-50%) scale(1.035); box-shadow: 0 14px 32px rgba(201, 111, 83, 0.34), 0 0 0 4px rgba(255, 236, 200, 0.9); }
  100% { transform: translateX(-50%) scale(1); }
}

.feedback-banner {
  flex-direction: column;
  align-items: stretch;
  gap: 5px;
}

.fb-pair-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  flex-wrap: wrap;
  animation: pairSnapIn 0.32s cubic-bezier(0.22, 1.56, 0.36, 1);
}

.fb-pair-row.hidden { display: none; }

@keyframes pairSnapIn {
  0% { transform: scale(0.84); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.fb-pair-q {
  background: #FFF3DE;
  border: 1.5px solid #DFB06E;
  color: #6B3C1A;
  font-size: 13px;
  font-weight: 900;
  padding: 3px 9px;
  border-radius: 10px;
}

.fb-pair-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: linear-gradient(180deg, #E2A03B 0%, #C96F53 100%);
  color: #FFFDF9;
  font-size: 13px;
  font-weight: 900;
  box-shadow: 0 3px 8px rgba(201, 111, 83, 0.34);
}

.fb-pair-a {
  background: #E4F3E7;
  border: 1.5px solid #6E9B79;
  color: #2A5635;
  font-size: 13.5px;
  font-weight: 900;
  padding: 3px 10px;
  border-radius: 10px;
}

.fb-sub-row {
  display: flex;
  align-items: center;
  gap: 7px;
}

.rogue-zone-map {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
  margin: 8px 0 8px;
}

.zone-node {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
  border: 1.5px solid #DCC8AE;
  background: #F6ECE0;
  color: #8A715D;
}

.zone-node.done {
  background: #E2F1E5;
  border-color: #6E9B79;
  color: #2D5A38;
}

.zone-node.unlocked {
  background: linear-gradient(180deg, #FFF5DB 0%, #FCE2A8 100%);
  border-color: #D18B22;
  color: #7D440B;
  box-shadow: 0 4px 12px rgba(209, 139, 34, 0.28);
  animation: relicWiggle 2s ease-in-out infinite;
}

.rogue-unlock-preview {
  background: #FFF9EE;
  border: 1.5px dashed #DFB06E;
  border-radius: 12px;
  padding: 7px 10px;
  margin: 6px 0 8px;
  font-size: 11.5px;
  font-weight: 800;
  color: #7B4A23;
  line-height: 1.45;
  text-align: left;
}

.rogue-unlock-preview.hidden { display: none; }

.relic-pick-head {
  font-size: 12px;
  font-weight: 900;
  color: var(--terracotta-dark);
  margin: 8px 0 6px;
  letter-spacing: 0.2px;
}

.relic-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  margin-bottom: 8px;
}

.relic-card {
  appearance: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 4px;
  padding: 10px 6px;
  border-radius: 14px 6px 14px 14px;
  background: linear-gradient(180deg, #FFFDF9 0%, #F7EAD8 100%);
  border: 2px solid #D9B993;
  box-shadow: 0 6px 14px rgba(60, 43, 30, 0.12);
  cursor: pointer;
  transition: transform 0.14s ease, border-color 0.14s ease, box-shadow 0.14s ease;
  animation: relicWiggle 2.6s ease-in-out infinite;
}

.relic-card:nth-child(2) { animation-delay: -0.9s; }
.relic-card:nth-child(3) { animation-delay: -1.7s; }

.relic-card:hover, .relic-card:active {
  transform: translateY(-3px) scale(1.03);
  border-color: var(--terracotta);
  box-shadow: 0 10px 20px rgba(201, 111, 83, 0.28);
}

@keyframes relicWiggle {
  0%, 100% { transform: translateY(0) rotate(-1deg); }
  50% { transform: translateY(-2.5px) rotate(1deg); }
}

.relic-ico {
  font-size: 22px;
  line-height: 1;
}

.relic-name {
  font-size: 12px;
  font-weight: 900;
  color: var(--ink);
  line-height: 1.2;
}

.relic-desc {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--ink-muted);
  line-height: 1.3;
}

.rogue-active-relics {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 5px;
  margin: 4px 0 4px;
}

.rogue-active-relics.hidden { display: none; }

.primary-btn.hidden, .ghost-btn.hidden { display: none !important; }

.relic-chip {
  font-size: 10.5px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 999px;
  background: #F4E6D3;
  border: 1px solid #DEC4A3;
  color: #6B492D;
}

/* ========== r14：题干折纸空卡槽 & 答案飞升嵌合 + 100% 暖日系折纸绘本风结算贺卡 ========== */
.q-badge.carry-wrong {
  background: linear-gradient(180deg, #D95A42 0%, #B73F2A 100%) !important;
  color: #FFFDF9 !important;
  box-shadow: 0 2px 6px rgba(183, 63, 42, 0.34);
}

.q-arrow-sep {
  display: inline-block;
  margin: 0 3px;
  color: #C96F53;
  font-weight: 900;
}

.q-blank-slot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  padding: 1px 10px;
  margin-left: 2px;
  border-radius: 9px 4px 9px 9px;
  border: 2px dashed #C96F53;
  background: linear-gradient(180deg, #FFF7EA 0%, #FBE9CE 100%);
  color: #B85234;
  font-weight: 900;
  font-size: 0.94em;
  vertical-align: baseline;
  box-shadow: inset 0 1px 3px rgba(169, 83, 56, 0.14);
  animation: slotBreathe 1.8s ease-in-out infinite;
  transition: all 0.22s cubic-bezier(0.22, 1.56, 0.36, 1);
}

@keyframes slotBreathe {
  0%, 100% { transform: scale(1); border-color: #C96F53; }
  50% { transform: scale(1.05); border-color: #E2A03B; }
}

.q-blank-slot.snapped {
  animation: slotSnapPop 0.42s cubic-bezier(0.22, 1.64, 0.36, 1) forwards;
  border: 2px solid #4E7A59;
  background: linear-gradient(180deg, #EAF6EC 0%, #CFE8D4 100%);
  color: #244F2F;
  box-shadow: 0 4px 12px rgba(78, 122, 89, 0.32), 0 0 0 2px rgba(255, 253, 249, 0.9);
}

.q-blank-slot.peek-answer {
  animation: none;
  border: 2px solid #C96F53;
  background: linear-gradient(180deg, #FFF1E6 0%, #FAD9C3 100%);
  color: #9C3A20;
  box-shadow: 0 4px 12px rgba(201, 111, 83, 0.3);
}

@keyframes slotSnapPop {
  0% { transform: scale(0.72) rotate(-4deg); }
  55% { transform: scale(1.16) rotate(2deg); }
  100% { transform: scale(1.02) rotate(0deg); }
}

.question-hero.pair-locked {
  transform: translateX(-50%) scale(1.035);
  border-color: #4E7A59 !important;
  box-shadow: 0 16px 34px rgba(78, 122, 89, 0.28), 0 0 0 4px rgba(232, 246, 235, 0.94);
}

/* 100% 暖日系手工折纸绘本风结算贺卡 */
.origami-postcard {
  position: relative;
  width: 92%;
  max-width: 360px;
  background:
    radial-gradient(circle at 18% 12%, rgba(255, 249, 236, 0.92), transparent 55%),
    linear-gradient(175deg, #FBF4E6 0%, #F2E3CB 100%);
  border: 2.5px solid #CCA982;
  border-radius: 22px 6px 22px 22px;
  padding: 18px 16px 14px;
  text-align: center;
  box-shadow:
    0 24px 52px rgba(56, 38, 24, 0.34),
    inset 0 0 0 5px rgba(255, 252, 246, 0.72),
    inset 0 0 0 6.5px rgba(201, 165, 126, 0.38);
  animation: curtainPop 0.34s cubic-bezier(0.22, 1.56, 0.36, 1);
  overflow: visible;
}

.postcard-fold-corner {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 28px;
  height: 28px;
  background: linear-gradient(225deg, #DFC5A4 0%, #DFC5A4 48%, #C9A67D 50%, #EFE0CA 52%, #F9EFE0 100%);
  border-bottom-left-radius: 9px;
  box-shadow: -2px 2px 6px rgba(74, 52, 34, 0.16);
  pointer-events: none;
}

.postcard-mascot-stage {
  position: relative;
  width: 78px;
  height: 78px;
  margin: -42px auto 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.postcard-halo {
  position: absolute;
  inset: 4px;
  border-radius: 22px 8px 22px 22px;
  transform: rotate(8deg);
  background: linear-gradient(145deg, #FCE9C5 0%, #EAB875 100%);
  border: 2.5px solid #FFFDF9;
  box-shadow: 0 8px 18px rgba(154, 96, 48, 0.28);
}

.postcard-mascot-img {
  position: relative;
  width: 68px;
  height: 68px;
  object-fit: contain;
  filter: drop-shadow(0 6px 8px rgba(60, 43, 30, 0.22));
  animation: mascotCheerBob 2.2s ease-in-out infinite;
}

@keyframes mascotCheerBob {
  0%, 100% { transform: translateY(0) rotate(-3deg); }
  50% { transform: translateY(-5px) rotate(3deg); }
}

.origami-ribbon {
  display: inline-block;
  position: relative;
  background: linear-gradient(180deg, #D1785B 0%, #B85A3D 100%);
  color: #FFFDF9;
  font-size: 16px;
  font-weight: 900;
  letter-spacing: 0.4px;
  padding: 6px 18px;
  border-radius: 10px 4px 10px 4px;
  box-shadow: 0 6px 14px rgba(169, 83, 56, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.32);
  margin-bottom: 6px;
}

.postcard-sub {
  font-size: 12px;
  font-weight: 800;
  color: #7D624B;
  margin: 2px 0 8px;
  line-height: 1.4;
}

/* 手工纸艺冒险小路 */
.origami-trail {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin: 6px 0 8px;
  flex-wrap: wrap;
}

.trail-node {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 10px 4px 10px 10px;
  font-size: 11.5px;
  font-weight: 900;
  border: 1.8px solid #D4BC9E;
  background: #F7EEE0;
  color: #8A715D;
  box-shadow: 0 2px 6px rgba(60, 43, 30, 0.08);
}

.trail-node svg { width: 14px; height: 14px; flex: 0 0 auto; }

.trail-node.done {
  background: linear-gradient(180deg, #EBF5EC 0%, #D7EAD9 100%);
  border-color: #6B9675;
  color: #2E5A38;
}

.trail-node.unlocked {
  background: linear-gradient(180deg, #FFF7DF 0%, #F9DF9F 100%);
  border-color: #CE8925;
  color: #7D440D;
  box-shadow: 0 4px 12px rgba(206, 137, 37, 0.26);
}

.trail-dash {
  width: 18px;
  height: 0;
  border-top: 2px dashed #C7AB89;
  margin: 0 3px;
}

.origami-note-strip {
  background: rgba(255, 252, 245, 0.84);
  border: 1.5px dashed #CFA97E;
  border-radius: 11px;
  padding: 6px 10px;
  margin: 6px 0 8px;
  font-size: 11.5px;
  font-weight: 800;
  color: #6F4523;
  line-height: 1.45;
  text-align: left;
}

.origami-note-strip.hidden { display: none; }
.note-carry-tag {
  display: inline-block;
  margin-top: 3px;
  padding: 1px 7px;
  border-radius: 6px;
  background: #FCE6DE;
  border: 1px solid #DC8E77;
  color: #A43C24;
  font-size: 11px;
  font-weight: 900;
}

.postcard-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
  margin: 6px 0 10px;
}

.postcard-metrics .v-stat-box {
  background: rgba(255, 252, 246, 0.82);
  border: 1.5px solid #DEC8AC;
  border-radius: 11px 4px 11px 11px;
  padding: 6px 4px;
  box-shadow: 0 2px 6px rgba(60, 43, 30, 0.06);
}

.postcard-metrics .v-stat-val {
  font-size: 16px;
  color: #A84D30;
}

/* 暖日系折纸绘本风主次大按钮（零白底表单感，零手绘几何图标） */
.postcard-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}

.origami-btn {
  appearance: none;
  position: relative;
  width: 100%;
  padding: 12px 16px;
  border-radius: 14px 4px 14px 14px;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.3px;
  cursor: pointer;
  transition: transform 0.14s cubic-bezier(0.22, 1.56, 0.36, 1), box-shadow 0.14s ease;
}

.origami-btn::after {
  content: "";
  position: absolute;
  top: -1px;
  right: -1px;
  width: 13px;
  height: 13px;
  border-bottom-left-radius: 5px;
  pointer-events: none;
}

.origami-btn.primary-origami {
  background: linear-gradient(180deg, #D57A5C 0%, #B75639 100%);
  color: #FFFDF9;
  border: 2px solid #9E4328;
  box-shadow: 0 7px 16px rgba(176, 82, 54, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.origami-btn.primary-origami::after {
  background: linear-gradient(225deg, #F0C4AE 0%, #F0C4AE 48%, #9E4328 50%, #D98568 52%, #E5987C 100%);
}

.origami-btn.secondary-origami {
  background: linear-gradient(180deg, #FFFDF8 0%, #F5E7D2 100%);
  color: #6B4A2F;
  border: 2px solid #CCA982;
  box-shadow: 0 5px 12px rgba(64, 42, 24, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.origami-btn.secondary-origami::after {
  background: linear-gradient(225deg, #E5CEA9 0%, #E5CEA9 48%, #C6A175 50%, #FBF3E5 52%, #FFFDF9 100%);
}

.origami-btn:hover,
.origami-btn:active {
  transform: translateY(-2px) scale(1.015);
}


/* ========== r21：100% 复刻抖音常驻底栏导航 + 个人主页「题库 = 短视频合集」丝滑直跳 ========== */
.feedback-banner {
  bottom: calc(74px + env(safe-area-inset-bottom)) !important;
}

.gesture-hint {
  bottom: calc(72px + env(safe-area-inset-bottom)) !important;
}

.mob-lane-bar {
  bottom: calc(78px + env(safe-area-inset-bottom)) !important;
}

.douyin-tabbar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 75;
  height: calc(60px + env(safe-area-inset-bottom));
  padding: 0 12px env(safe-area-inset-bottom);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  background: linear-gradient(180deg, rgba(255, 251, 244, 0.96) 0%, rgba(246, 235, 217, 0.99) 100%);
  border-top: 2px solid #D7BA95;
  box-shadow: 0 -6px 20px rgba(60, 40, 24, 0.14);
  backdrop-filter: blur(10px);
}

.dy-tab {
  appearance: none;
  border: 0;
  background: transparent;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  cursor: pointer;
  color: #8F7660;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.4px;
  transition: color 0.16s ease, transform 0.14s ease;
}

.dy-tab:active {
  transform: scale(0.94);
}

.dy-tab.active {
  color: #3A2414;
  font-weight: 900;
}

.dy-tab-label {
  line-height: 1.1;
}

.dy-tab-indicator {
  width: 24px;
  height: 3.5px;
  border-radius: 999px;
  background: linear-gradient(90deg, #D57A5C 0%, #B75639 100%);
  opacity: 0;
  transform: scaleX(0.35);
  transition: opacity 0.18s ease, transform 0.2s cubic-bezier(0.22, 1.56, 0.36, 1);
}

.dy-tab.active .dy-tab-indicator {
  opacity: 1;
  transform: scaleX(1);
}

.dy-tab-center {
  appearance: none;
  position: relative;
  top: -5px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 13px 4px 5px;
  border-radius: 999px;
  background: linear-gradient(180deg, #FFFDF8 0%, #F5E6CE 100%);
  border: 2px solid #CCA87E;
  box-shadow: 0 7px 16px rgba(60, 40, 24, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.92);
  cursor: pointer;
  transition: transform 0.18s cubic-bezier(0.22, 1.56, 0.36, 1), border-color 0.2s ease, background 0.2s ease;
}

.dy-tab-center:active {
  transform: scale(0.95);
}

.dy-tab-center.pulse {
  transform: scale(1.07);
  border-color: #53825E;
}

.dy-tab-center.ready {
  border-color: #4E7A59;
  background: linear-gradient(180deg, #F1F9F2 0%, #DBEDDE 100%);
}

.dy-tab-center .mastery-dial {
  width: 38px;
  height: 38px;
}

.dy-tab-center .mastery-dial::after {
  inset: 5px;
}

.dy-tab-center .mastery-dial-val {
  font-size: 10.5px;
}

.dy-dial-caption {
  display: flex;
  flex-direction: column;
  text-align: left;
  line-height: 1.2;
  white-space: nowrap;
}

.dy-dial-caption strong {
  font-size: 11.5px;
  font-weight: 900;
  color: #47301E;
}

.dy-dial-caption span {
  font-size: 10px;
  font-weight: 800;
  color: #936947;
}

.profile-hub-screen {
  position: absolute;
  inset: 0;
  z-index: 65;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(circle at 12% 8%, rgba(255, 250, 240, 0.94), transparent 46%),
    repeating-linear-gradient(0deg, rgba(186, 158, 124, 0.06) 0px, rgba(186, 158, 124, 0.06) 1px, transparent 1px, transparent 22px),
    repeating-linear-gradient(90deg, rgba(186, 158, 124, 0.06) 0px, rgba(186, 158, 124, 0.06) 1px, transparent 1px, transparent 22px),
    linear-gradient(175deg, #F6ECD9 0%, #ECE0C9 100%);
  opacity: 0;
  transform: translate3d(20px, 0, 0);
  transition: opacity 0.2s ease, transform 0.22s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
  overflow: hidden;
}

.profile-hub-screen.open {
  opacity: 1;
  transform: translate3d(0, 0, 0);
  pointer-events: auto;
}

.arena-shell.hub-open #topChrome,
.arena-shell.hub-open #questionHero,
.arena-shell.hub-open #fxCanvas,
.arena-shell.hub-open #glCanvas,
.arena-shell.hub-open #gestureHint,
.arena-shell.hub-open #feedbackBanner {
  transition: opacity 0.2s ease;
  opacity: 0.22;
}

.hub-top-bar {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: calc(10px + env(safe-area-inset-top)) 14px 10px;
  background: linear-gradient(180deg, rgba(246, 236, 217, 0.98) 0%, rgba(246, 236, 217, 0.9) 100%);
  border-bottom: 1.5px dashed #CFAF88;
  z-index: 5;
}

.hub-page-title {
  font-size: 16px;
  font-weight: 900;
  color: #3C2819;
  letter-spacing: 0.3px;
}

.hub-top-right {
  display: flex;
  align-items: center;
  gap: 6px;
}

.hub-login-btn,
.hub-share-btn {
  appearance: none;
  cursor: pointer;
  font-size: 11.5px;
  font-weight: 900;
  padding: 6px 11px;
  border-radius: 11px 4px 11px 11px;
  transition: transform 0.14s ease;
  white-space: nowrap;
}

.hub-login-btn {
  background: #FFFDF8;
  color: #6B4A2F;
  border: 1.8px solid #CCA982;
  box-shadow: 0 3px 8px rgba(64, 42, 24, 0.08);
}

.hub-share-btn {
  background: linear-gradient(180deg, #5C8C68 0%, #456F50 100%);
  color: #FFFDF9;
  border: 1.8px solid #35583E;
  box-shadow: 0 4px 10px rgba(69, 111, 80, 0.24);
}

.hub-login-btn:active,
.hub-share-btn:active {
  transform: scale(0.96);
}

.hub-scroll-body {
  flex: 1 1 auto;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 12px 14px calc(86px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* 抖音式个人主页双分栏 Tab（题库合集 / 学习复盘） */
.hub-subtabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: rgba(255, 252, 245, 0.82);
  border: 1.8px solid #D8BE9B;
  border-radius: 14px 4px 14px 14px;
  padding: 4px;
  gap: 4px;
  box-shadow: 0 4px 12px rgba(64, 42, 24, 0.07);
}

.hub-subtab {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 8px 10px;
  border-radius: 10px 3px 10px 10px;
  font-size: 13.5px;
  font-weight: 800;
  color: #846A54;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  transition: background 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}

.hub-subtab.active {
  background: linear-gradient(180deg, #D57A5C 0%, #B85A3D 100%);
  color: #FFFDF9;
  font-weight: 900;
  box-shadow: 0 4px 10px rgba(184, 90, 61, 0.28);
}

.hub-subtab-count {
  font-style: normal;
  font-size: 11px;
  font-weight: 900;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(132, 106, 84, 0.14);
  color: inherit;
}

.hub-subtab.active .hub-subtab-count {
  background: rgba(255, 253, 249, 0.24);
  color: #FFFDF9;
}

.hub-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.hub-panel.hidden {
  display: none;
}

/* 短视频合集式 2 列竖版折纸封面墙（点击任意封面卡丝滑直跳学习） */
.hub-collections-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.deck-collection-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 204px;
  padding: 10px 10px 9px;
  border-radius: 18px 5px 18px 18px;
  border: 2px solid #D2B38D;
  background: linear-gradient(168deg, var(--coll-bg-top, #FFFDF8) 0%, var(--coll-bg-bot, #F4E6CF) 100%);
  box-shadow:
    0 9px 18px rgba(64, 42, 24, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.92);
  text-align: left;
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.16s cubic-bezier(0.22, 1.56, 0.36, 1), box-shadow 0.16s ease, border-color 0.16s ease;
}

.deck-collection-card::after {
  content: "";
  position: absolute;
  top: -1px;
  right: -1px;
  width: 16px;
  height: 16px;
  background: linear-gradient(225deg, #E2C8A5 0%, #E2C8A5 48%, #C6A278 50%, #F7ECDA 52%, #FFFDF9 100%);
  border-bottom-left-radius: 6px;
  pointer-events: none;
}

.deck-collection-card:active {
  transform: scale(0.96);
}

.deck-collection-card.active-deck {
  border-color: #C96F53;
  box-shadow:
    0 11px 22px rgba(184, 90, 61, 0.22),
    0 0 0 2.5px rgba(255, 238, 224, 0.95);
}

.deck-collection-card.mastered-deck {
  border-color: #6B9675;
}

.coll-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  padding-right: 10px;
}

.coll-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 900;
  padding: 2px 7px;
  border-radius: 7px 2px 7px 7px;
  background: rgba(255, 253, 248, 0.9);
  color: #7E5E42;
  border: 1px solid #D9BE9C;
}

.coll-status-pill.is-playing {
  background: linear-gradient(180deg, #D57A5C 0%, #B85A3D 100%);
  color: #FFFDF9;
  border-color: #9E4328;
}

.coll-status-pill.is-mastered {
  background: #DCEEE0;
  color: #2A5B36;
  border-color: #7AA986;
}

.coll-live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #FFE5A3;
  box-shadow: 0 0 0 2px rgba(255, 229, 163, 0.35);
}

.coll-count-tag {
  font-size: 10px;
  font-weight: 800;
  color: #846951;
}

.coll-cover-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin: 6px 0 8px;
}

.coll-mascot-wrap {
  width: 66px;
  height: 66px;
  border-radius: 18px 5px 18px 18px;
  background: rgba(255, 253, 249, 0.85);
  border: 1.8px solid rgba(210, 179, 141, 0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 6px;
  box-shadow: 0 6px 14px rgba(64, 42, 24, 0.1);
}

.coll-mascot-wrap img {
  width: 54px;
  height: 54px;
  object-fit: contain;
  filter: drop-shadow(0 4px 5px rgba(60, 43, 30, 0.18));
}

.coll-title {
  font-size: 14px;
  font-weight: 900;
  color: #3C2819;
  line-height: 1.2;
  margin-bottom: 2px;
}

.coll-sub {
  font-size: 10.5px;
  font-weight: 700;
  color: #82674F;
  line-height: 1.25;
}

.coll-play-meta {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding-top: 7px;
  border-top: 1px dashed #D8BE9B;
}

.coll-play-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  font-size: 10.5px;
  font-weight: 900;
  color: #6B4C33;
}

.coll-plays-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #A84D30;
}

.coll-play-tri {
  width: 0;
  height: 0;
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  border-left: 6.5px solid #C96F53;
  display: inline-block;
}

.coll-prog-track {
  width: 100%;
  height: 5px;
  border-radius: 999px;
  background: rgba(201, 174, 140, 0.36);
  overflow: hidden;
}

.coll-prog-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #D9855A 0%, #5E8C69 100%);
  transition: width 0.25s ease;
}

.coll-foot-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
}

.coll-acc-text {
  font-size: 10px;
  font-weight: 800;
  color: #856A52;
}

.coll-review-btn {
  appearance: none;
  border: 1.2px solid #D1B28C;
  background: rgba(255, 253, 248, 0.92);
  color: #7D5534;
  font-size: 10px;
  font-weight: 900;
  padding: 2px 7px;
  border-radius: 7px 2px 7px 7px;
  cursor: pointer;
}

.deck-collection-card.import-card {
  border-style: dashed;
  border-color: #C96F53;
  background: linear-gradient(168deg, #FFFDF8 0%, #FAF0E1 100%);
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 8px;
}

.coll-import-plus {
  width: 48px;
  height: 48px;
  border-radius: 15px 4px 15px 15px;
  background: linear-gradient(180deg, #D57A5C 0%, #B85A3D 100%);
  color: #FFFDF9;
  font-size: 28px;
  font-weight: 900;
  line-height: 46px;
  box-shadow: 0 6px 14px rgba(184, 90, 61, 0.28);
}

/* 抖音式合集点开瞬间封面放大转场动画层 */
.hub-launch-stage {
  position: absolute;
  inset: 0;
  z-index: 90;
  pointer-events: none;
  overflow: hidden;
}

.hub-launch-stage.hidden {
  display: none;
}

.hub-launch-card {
  position: absolute;
  border-radius: 18px 5px 18px 18px;
  border: 2px solid #C96F53;
  background: linear-gradient(170deg, #FFFDF8 0%, #F4E6CF 100%);
  box-shadow: 0 20px 44px rgba(60, 40, 24, 0.28);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  will-change: left, top, width, height, opacity, border-radius;
  transition:
    left 0.24s cubic-bezier(0.22, 1, 0.36, 1),
    top 0.24s cubic-bezier(0.22, 1, 0.36, 1),
    width 0.24s cubic-bezier(0.22, 1, 0.36, 1),
    height 0.24s cubic-bezier(0.22, 1, 0.36, 1),
    border-radius 0.24s ease,
    opacity 0.24s ease;
}

.hub-launch-card img {
  width: 68px;
  height: 68px;
  object-fit: contain;
}

.hub-launch-card strong {
  font-size: 16px;
  font-weight: 900;
  color: #3C2819;
}

.hub-launch-card.expand {
  left: 0 !important;
  top: 0 !important;
  width: 100% !important;
  height: 100% !important;
  border-radius: 0 !important;
  opacity: 0;
}

/* 半拟物手工折纸通用卡片骨架 */
.hub-paper-card {
  position: relative;
  background: linear-gradient(175deg, #FFFDF8 0%, #F6EAD6 100%);
  border: 2px solid #D1B28C;
  border-radius: 18px 5px 18px 18px;
  padding: 14px 14px 12px;
  box-shadow:
    0 10px 22px rgba(64, 42, 24, 0.12),
    inset 0 0 0 4px rgba(255, 253, 249, 0.72),
    inset 0 0 0 5px rgba(206, 174, 136, 0.28);
}

.hub-fold-corner {
  position: absolute;
  top: -1px;
  right: -1px;
  width: 22px;
  height: 22px;
  background: linear-gradient(225deg, #E2C8A5 0%, #E2C8A5 48%, #C6A278 50%, #F7ECDA 52%, #FFFDF9 100%);
  border-bottom-left-radius: 7px;
  box-shadow: -2px 2px 5px rgba(74, 52, 34, 0.14);
  pointer-events: none;
}

.hub-id-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.hub-avatar-frame {
  width: 62px;
  height: 62px;
  flex: 0 0 auto;
  border-radius: 18px 5px 18px 18px;
  background: linear-gradient(145deg, #FCEAC6 0%, #EAB876 100%);
  border: 2.5px solid #FFFDF9;
  box-shadow: 0 6px 14px rgba(154, 96, 48, 0.22);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.hub-avatar-frame img {
  width: 52px;
  height: 52px;
  object-fit: contain;
  filter: drop-shadow(0 4px 5px rgba(60, 43, 30, 0.2));
}

.hub-id-info {
  flex: 1 1 auto;
  min-width: 0;
  text-align: left;
}

.hub-name-row {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 3px;
}

.hub-user-name {
  font-size: 18px;
  font-weight: 900;
  color: #3C2819;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hub-edit-name-btn {
  appearance: none;
  border: 1.4px solid #D2B28B;
  background: #FFF9EE;
  color: #8A5A35;
  font-size: 10.5px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 999px;
  cursor: pointer;
}

.hub-deck-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 2px;
}

.hub-deck-tag {
  font-size: 12px;
  font-weight: 900;
  color: #B45638;
}

.hub-switch-deck-btn {
  appearance: none;
  border: 1.3px solid #D5B690;
  background: #FFF9EE;
  color: #7D5432;
  font-size: 10px;
  font-weight: 900;
  padding: 1.5px 7px;
  border-radius: 999px;
  cursor: pointer;
}

.hub-switch-deck-btn:active {
  transform: scale(0.95);
}

.hub-sync-note {
  font-size: 10.5px;
  font-weight: 700;
  color: #8A715B;
}

.hub-login-panel {
  background: rgba(255, 252, 245, 0.9);
  border: 1.5px dashed #CFA97E;
  border-radius: 12px;
  padding: 10px;
  margin-bottom: 10px;
}

.hub-login-panel.hidden { display: none; }

.hub-login-row {
  display: flex;
  gap: 6px;
  margin-bottom: 8px;
}

.hub-name-input {
  flex: 1;
  min-width: 0;
  border: 1.8px solid #D3B48F;
  border-radius: 10px;
  padding: 7px 10px;
  font-size: 12.5px;
  font-weight: 800;
  color: #3C2819;
  background: #FFFDF9;
}

.hub-save-id-btn {
  appearance: none;
  border: 1.8px solid #9E4328;
  background: linear-gradient(180deg, #D57A5C 0%, #B85A3D 100%);
  color: #FFFDF9;
  font-size: 12px;
  font-weight: 900;
  padding: 0 12px;
  border-radius: 10px 4px 10px 10px;
  cursor: pointer;
}

.hub-avatar-picker {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.hub-av-opt {
  appearance: none;
  width: 38px;
  height: 38px;
  border-radius: 11px 4px 11px 11px;
  border: 1.8px solid #DFC7A9;
  background: #FFFDF9;
  padding: 3px;
  cursor: pointer;
  flex: 0 0 auto;
}

.hub-av-opt.active {
  border-color: #C96F53;
  background: #FCEBD2;
}

.hub-av-opt img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.hub-kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.hub-kpi-box {
  background: rgba(255, 253, 248, 0.88);
  border: 1.5px solid #DEC8AC;
  border-radius: 12px 4px 12px 12px;
  padding: 8px 4px;
  text-align: center;
  box-shadow: 0 2px 6px rgba(64, 42, 24, 0.06);
}

.hub-kpi-val {
  font-size: 17px;
  font-weight: 900;
  color: #A84D30;
  line-height: 1.15;
}

.hub-kpi-lbl {
  font-size: 10.5px;
  font-weight: 800;
  color: #82674F;
  margin-top: 2px;
}

/* 半拟物折纸爬坡折线图 */
.hub-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.hub-section-head h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 900;
  color: #3E2A1B;
}

.hub-section-sub {
  font-size: 10.5px;
  font-weight: 800;
  color: #8E735B;
}

.hub-chart-wrap {
  width: 100%;
  border-radius: 12px 4px 12px 12px;
  overflow: hidden;
  border: 1.5px solid #DEC8AC;
  background: #FFFDF8;
}

#hubClimbCanvas {
  display: block;
  width: 100%;
  height: 158px;
}

.hub-section-divider {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 2px 0;
}

.hub-div-line {
  flex: 1;
  height: 0;
  border-top: 1.8px dashed #CFAF88;
}

.hub-div-title {
  font-size: 11.5px;
  font-weight: 900;
  color: #7E5E42;
  white-space: nowrap;
}

/* 逐题复盘半拟物折纸知识卡墙 */
.hub-cards-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.origami-q-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: linear-gradient(175deg, #FFFDF9 0%, #F5E8D4 100%);
  border: 2px solid #D2B48F;
  border-radius: 16px 4px 16px 16px;
  padding: 10px 10px 9px;
  text-align: left;
  box-shadow: 0 7px 16px rgba(64, 42, 24, 0.11), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  transition: transform 0.14s ease;
}

.origami-q-card.mastered {
  border-color: #6B9675;
  background: linear-gradient(175deg, #FDFEFB 0%, #EBF5EC 100%);
}

.origami-q-card::after {
  content: "";
  position: absolute;
  top: -1px;
  right: -1px;
  width: 14px;
  height: 14px;
  background: linear-gradient(225deg, #E2C8A5 0%, #E2C8A5 48%, #C6A278 50%, #F7ECDA 52%, #FFFDF9 100%);
  border-bottom-left-radius: 5px;
  pointer-events: none;
}

.qcard-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 6px;
}

.qcard-pet {
  width: 34px;
  height: 34px;
  border-radius: 10px 3px 10px 10px;
  background: rgba(255, 252, 245, 0.9);
  border: 1.5px solid #DEC7A9;
  display: flex;
  align-items: center;
  justify-content: center;
}

.qcard-pet img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.qcard-stamp {
  font-size: 10px;
  font-weight: 900;
  padding: 2px 7px;
  border-radius: 6px 2px 6px 6px;
  background: #F6E6D2;
  color: #8E5834;
  border: 1px solid #DBBA94;
}

.origami-q-card.mastered .qcard-stamp {
  background: #DCEEE0;
  color: #2C5E38;
  border-color: #88B492;
}

.qcard-q {
  font-size: 11.5px;
  font-weight: 800;
  color: #543D2B;
  line-height: 1.35;
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.qcard-a {
  font-size: 13px;
  font-weight: 900;
  color: #2B5936;
  background: rgba(232, 246, 235, 0.9);
  border: 1.5px solid #88B392;
  border-radius: 9px 3px 9px 9px;
  padding: 4px 8px;
  margin-bottom: 8px;
  line-height: 1.25;
}

.qcard-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  padding-top: 6px;
  border-top: 1px dashed #D9C0A1;
}

.qcard-meta {
  font-size: 10px;
  font-weight: 800;
  color: #866B53;
}

.qcard-save-btn {
  appearance: none;
  border: 1.4px solid #C96F53;
  background: #FFF8EE;
  color: #B25235;
  font-size: 10px;
  font-weight: 900;
  padding: 2px 7px;
  border-radius: 7px 2px 7px 7px;
  cursor: pointer;
}

/* 存图预览弹层 */
.hub-export-modal {
  position: absolute;
  inset: 0;
  z-index: 80;
  background: rgba(54, 37, 24, 0.56);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.hub-export-modal.hidden { display: none; }

.hub-export-sheet {
  width: 100%;
  max-width: 340px;
  max-height: 92%;
  display: flex;
  flex-direction: column;
  background: linear-gradient(175deg, #FBF4E6 0%, #F1E1C8 100%);
  border: 2.5px solid #CCA982;
  border-radius: 20px 6px 20px 20px;
  padding: 14px;
  box-shadow: 0 24px 48px rgba(48, 32, 18, 0.42);
}

.hub-export-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  color: #3E291A;
  font-size: 14px;
}

.hub-export-preview-wrap {
  flex: 1 1 auto;
  overflow: auto;
  border-radius: 12px;
  border: 2px solid #D7B994;
  background: #FFFDF8;
  margin-bottom: 10px;
  max-height: 520px;
}

.hub-export-preview-wrap img {
  display: block;
  width: 100%;
  height: auto;
}
/* ========== r23 教材章节目录与本章速查表（暖日系折纸纸艺风 · 零原生 Emoji） ========== */
.hub-cheat-btn {
  background: #edf3ea;
  color: #416244;
  border-color: rgba(82, 121, 86, 0.34);
}
.chapter-sheet,
.cheatsheet-sheet {
  max-height: 84vh;
  display: flex;
  flex-direction: column;
}
.book-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 10px;
}
.book-tab-btn {
  border: 1.5px solid rgba(139, 98, 66, 0.25);
  background: #fbf5eb;
  color: #5c4330;
  border-radius: 14px;
  padding: 9px 10px;
  font-size: 13px;
  font-weight: 800;
  text-align: left;
  cursor: pointer;
  transition: transform 0.14s ease, background 0.14s ease, border-color 0.14s ease;
}
.book-tab-btn small {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  font-weight: 600;
  color: #8a6d54;
}
.book-tab-btn.active {
  background: #c86443;
  color: #fffaf3;
  border-color: #a94c2e;
  box-shadow: 0 4px 0 rgba(145, 58, 31, 0.32);
}
.book-tab-btn.active small {
  color: rgba(255, 248, 240, 0.88);
}
.chapter-list {
  flex: 1 1 auto;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-right: 2px;
  margin-bottom: 10px;
}
.chapter-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: #fffaf1;
  border: 1.5px solid rgba(139, 98, 66, 0.2);
  border-radius: 14px;
  padding: 10px 12px;
  box-shadow: 0 2px 0 rgba(139, 98, 66, 0.12);
}
.chapter-card.is-current {
  border-color: #c86443;
  background: #fff3e6;
}
.chapter-card-main {
  min-width: 0;
  flex: 1;
}
.chapter-card-top {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.chapter-card-title {
  font-size: 14px;
  font-weight: 800;
  color: #3c2819;
}
.chapter-badge {
  font-size: 10px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 999px;
  letter-spacing: 0.02em;
}
.chapter-badge.free {
  background: #e3f0df;
  color: #355e3b;
}
.chapter-badge.pro {
  background: #f5e5d5;
  color: #8f4e2a;
}
.chapter-card-meta {
  font-size: 11.5px;
  color: #7d624c;
  margin-top: 3px;
}
.chapter-card-actions {
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex-shrink: 0;
}
.chapter-go-btn {
  border: none;
  border-radius: 10px;
  padding: 6px 11px;
  font-size: 12px;
  font-weight: 800;
  background: #c86443;
  color: #fffaf3;
  cursor: pointer;
}
.chapter-cheat-btn {
  border: 1px solid rgba(139, 98, 66, 0.28);
  border-radius: 10px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 700;
  background: #fbf5eb;
  color: #5c4330;
  cursor: pointer;
}
.chapter-pricing-strip {
  background: #f4ead9;
  border: 1px dashed rgba(139, 98, 66, 0.35);
  border-radius: 12px;
  padding: 8px 10px;
  font-size: 11.5px;
  font-weight: 700;
  color: #6b4e37;
  text-align: center;
}
.cheatsheet-scroll {
  flex: 1 1 auto;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-right: 2px;
}
.cs-item {
  background: #fffaf1;
  border: 1.5px solid rgba(139, 98, 66, 0.18);
  border-radius: 13px;
  padding: 9px 11px;
}
.cs-item-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}
.cs-term {
  font-size: 13.5px;
  font-weight: 900;
  color: #b45638;
}
.cs-ans {
  font-size: 13px;
  font-weight: 800;
  color: #2f5434;
  text-align: right;
}
.cs-mnem {
  margin-top: 4px;
  font-size: 12px;
  color: #6b523e;
  line-height: 1.45;
}
.cs-faq-head {
  margin-top: 8px;
  font-size: 13px;
  font-weight: 900;
  color: #3c2819;
  border-top: 1px dashed rgba(139, 98, 66, 0.25);
  padding-top: 10px;
}
.cs-faq-card {
  background: #f7efe2;
  border-radius: 12px;
  padding: 9px 11px;
}
.cs-faq-q {
  font-size: 12.5px;
  font-weight: 800;
  color: #3c2819;
}
.cs-faq-a {
  margin-top: 3px;
  font-size: 12px;
  color: #674f3b;
  line-height: 1.45;
}
body.embed-mode .top-chrome {
  padding-top: 6px;
}
