/* ==========================================================================
 * 童趣中国 · 闯关挑战游戏中心（games.css）
 * --------------------------------------------------------------------------
 * 只作用于 .tq-* 类名与 #tqChallengeOverlay，不改动页面原有样式。
 * 视觉延续：奶油纸张 #f7f1e6 / 珊瑚 #e96b4c / 青绿 #2f8b80 / 深棕 #3d342c，
 * 圆角卡片、磁吸贴纸、柔和阴影。无外部字体与图片。
 * ========================================================================== */

/* ------------------------------------------------------------
   1. 顶部入口按钮（注入到 .top-actions）
   ------------------------------------------------------------ */
.tq-entry-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 42px;
  padding: 0 14px 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 14px;
  background: linear-gradient(150deg, #ffe299 0%, #f6c55a 48%, #eaa93a 100%);
  color: #5b3d11;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 1px;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 3px 0 #c58a24, 0 12px 22px -12px rgba(197, 138, 36, 0.85),
    inset 0 1px 0 rgba(255, 255, 255, 0.65);
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}
.tq-entry-btn:hover {
  transform: translateY(-1px);
  filter: saturate(1.06) brightness(1.02);
  box-shadow: 0 4px 0 #c58a24, 0 15px 26px -12px rgba(197, 138, 36, 0.9),
    inset 0 1px 0 rgba(255, 255, 255, 0.7);
}
.tq-entry-btn:active {
  transform: translateY(1px);
  box-shadow: 0 1px 0 #c58a24, inset 0 1px 0 rgba(255, 255, 255, 0.5);
}
.tq-entry-btn:focus-visible {
  outline: 3px solid rgba(201, 128, 61, 0.55);
  outline-offset: 3px;
}
.tq-entry-icon {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
}
.tq-entry-icon svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.85;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.tq-entry-text {
  font-family: var(--font-ui, sans-serif);
  transform: translateY(-0.5px);
}

/* ------------------------------------------------------------
   2. 全屏 overlay 外壳
   ------------------------------------------------------------ */
.tq-overlay {
  position: fixed;
  inset: 0;
  z-index: 320;
  display: flex;
  overflow: hidden;
  color: var(--ink);
  background:
    radial-gradient(1200px 760px at 8% -12%, #fff8e6 0%, transparent 58%),
    radial-gradient(1000px 700px at 100% 0%, #ece2fb 0%, transparent 55%),
    linear-gradient(165deg, #f8f2e7 0%, #f4ecdf 52%, #efe7d8 100%);
  font-family: var(--font-ui);
  animation: tq-fade 0.2s ease both;
}
.tq-overlay-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}
.tq-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.6;
}
.tq-blob-a {
  width: 480px;
  height: 480px;
  left: -160px;
  top: -170px;
  background: #ffd4b2;
}
.tq-blob-b {
  width: 520px;
  height: 520px;
  right: -210px;
  top: -180px;
  background: #cfe8f6;
  opacity: 0.55;
}
.tq-blob-c {
  width: 460px;
  height: 460px;
  left: 26%;
  bottom: -300px;
  background: #cfe6c0;
  opacity: 0.42;
}
.tq-doodle {
  position: absolute;
  font-weight: 800;
  color: rgba(199, 113, 74, 0.36);
  user-select: none;
  font-size: 24px;
}
.tq-doodle-a {
  left: 4%;
  top: 24%;
  transform: rotate(14deg);
}
.tq-doodle-b {
  right: 5%;
  top: 20%;
  font-size: 30px;
  color: rgba(47, 139, 128, 0.3);
}
.tq-doodle-c {
  right: 12%;
  bottom: 10%;
  font-size: 46px;
  color: rgba(242, 184, 75, 0.3);
}
.tq-shell {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 1500px;
  height: 100%;
  margin: 0 auto;
  padding: max(10px, env(safe-area-inset-top)) clamp(12px, 3vw, 38px) 0;
  animation: tq-shell-in 0.28s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

/* 顶部栏 */
.tq-topbar {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 2px 12px;
}
.tq-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.tq-brand-mark {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 16px;
  font-size: 26px;
  background: linear-gradient(145deg, #fff4d4 0%, #ffdc93 62%, #f1b94a 100%);
  box-shadow: 0 4px 0 #c58a24, 0 13px 22px -11px rgba(197, 138, 36, 0.75),
    inset 0 1px 0 rgba(255, 255, 255, 0.85);
  transform: rotate(-4deg);
}
.tq-brand-copy {
  min-width: 0;
}
.tq-brand-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(21px, 2.5vw, 30px);
  line-height: 1.08;
  letter-spacing: 1.6px;
  color: var(--ink);
  white-space: nowrap;
}
.tq-brand-title:focus {
  outline: none;
}
.tq-brand-sub {
  margin-top: 3px;
  font-size: 9.5px;
  font-weight: 900;
  letter-spacing: 2.8px;
  color: var(--muted);
}
.tq-close {
  margin-left: auto;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0 0 2px;
  border: 1px solid rgba(255, 255, 255, 0.92);
  border-radius: 50%;
  background: rgba(255, 253, 248, 0.82);
  color: var(--ink);
  font-size: 25px;
  line-height: 1;
  cursor: pointer;
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 0 rgba(78, 58, 38, 0.1), 0 12px 22px -14px rgba(63, 45, 28, 0.55);
  transition: transform 0.16s ease, background 0.16s ease, color 0.16s ease;
}
.tq-close:hover {
  background: var(--coral);
  color: #fffdf8;
  transform: rotate(8deg);
}
.tq-close:active {
  transform: rotate(0deg) scale(0.96);
}

/* 滚动内容区 */
.tq-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 2px 4px 40px 2px;
  scrollbar-width: thin;
  scrollbar-color: rgba(115, 91, 62, 0.28) transparent;
}
.tq-body::-webkit-scrollbar {
  width: 9px;
}
.tq-body::-webkit-scrollbar-thumb {
  border-radius: 99px;
  background: rgba(115, 91, 62, 0.24);
}
.tq-overlay button,
.tq-overlay input {
  font-family: inherit;
}
.tq-overlay button:focus-visible,
.tq-overlay input:focus-visible {
  outline: 3px solid rgba(47, 139, 128, 0.5);
  outline-offset: 2px;
}
.tq-view {
  width: 100%;
}

/* 通用按钮 */
.tq-primary-btn,
.tq-secondary-btn,
.tq-quiet-btn {
  cursor: pointer;
  border-radius: 13px;
  font-weight: 900;
  letter-spacing: 0.4px;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease,
    border-color 0.15s ease;
}
.tq-primary-btn {
  min-height: 44px;
  padding: 11px 22px;
  border: 0;
  background: linear-gradient(150deg, #f17f60 0%, #e96b4c 58%, #d8583b 100%);
  color: #fffdf8;
  font-size: 13.5px;
  box-shadow: 0 3px 0 #b8432c, 0 13px 22px -12px rgba(207, 75, 49, 0.8),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
.tq-primary-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 0 #b8432c, 0 16px 26px -12px rgba(207, 75, 49, 0.85);
}
.tq-primary-btn:active {
  transform: translateY(1px);
  box-shadow: 0 1px 0 #b8432c;
}
.tq-secondary-btn {
  min-height: 42px;
  padding: 10px 18px;
  border: 1.5px solid rgba(233, 107, 76, 0.4);
  background: #fffdf8;
  color: var(--coral-deep);
  font-size: 12.5px;
  box-shadow: 0 2px 0 rgba(233, 107, 76, 0.14);
}
.tq-secondary-btn:hover {
  transform: translateY(-1px);
  background: #fff6f1;
  border-color: rgba(233, 107, 76, 0.65);
}
.tq-quiet-btn {
  min-height: 38px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  background: rgba(255, 253, 248, 0.74);
  color: var(--ink-2);
  font-size: 11.5px;
}
.tq-quiet-btn:hover {
  background: #fffdf8;
  color: var(--ink);
  border-color: var(--line-strong);
}

/* ------------------------------------------------------------
   3. 首页：探险档案 + 两栏布局
   ------------------------------------------------------------ */
.tq-home {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding-top: 4px;
}
.tq-player-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding: 18px 22px;
  border: 1px solid rgba(255, 255, 255, 0.95);
  border-radius: 26px;
  background:
    radial-gradient(circle at 92% 6%, rgba(207, 230, 192, 0.5) 0%, transparent 42%),
    linear-gradient(135deg, #fffaf0 0%, #fffdf8 52%, #eef7f2 100%);
  box-shadow: 0 2px 0 rgba(255, 255, 255, 0.75) inset,
    0 24px 48px -34px rgba(60, 42, 24, 0.62);
}
.tq-player-card::after {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1.5px dashed rgba(201, 128, 61, 0.22);
  border-radius: 20px;
  pointer-events: none;
}
.tq-player-sticker {
  position: absolute;
  z-index: 1;
  top: -9px;
  right: 24px;
  padding: 4px 10px;
  border-radius: 8px;
  background: var(--ink);
  color: #ffe9b0;
  font-size: 8.5px;
  font-weight: 900;
  letter-spacing: 2px;
  transform: rotate(3deg);
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.16);
}
.tq-avatar {
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 22px;
  font-size: 32px;
  background: linear-gradient(150deg, #fff4d8, #ffe0a4);
  box-shadow: 0 4px 0 rgba(201, 138, 36, 0.35), 0 14px 24px -14px rgba(201, 138, 36, 0.7),
    inset 0 1px 0 rgba(255, 255, 255, 0.85);
  transform: rotate(-3deg);
}
.tq-player-main {
  position: relative;
  z-index: 1;
  min-width: 0;
  flex: 1 1 210px;
}
.tq-name-label {
  display: block;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 2.2px;
  color: var(--muted);
}
.tq-name-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  margin-top: 2px;
}
.tq-name-input {
  width: clamp(150px, 20vw, 240px);
  padding: 1px 26px 3px 1px;
  border: 0;
  border-bottom: 2px dashed rgba(201, 128, 61, 0.45);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 22px;
  letter-spacing: 1px;
  line-height: 1.3;
  transition: border-color 0.16s ease, background 0.16s ease;
}
.tq-name-input:hover {
  border-bottom-color: rgba(201, 128, 61, 0.7);
}
.tq-name-input:focus {
  outline: none;
  border-bottom-color: var(--coral);
  background: rgba(255, 246, 224, 0.65);
}
.tq-name-pen {
  position: absolute;
  right: 4px;
  bottom: 6px;
  font-size: 13px;
  color: var(--coral);
  pointer-events: none;
  opacity: 0.8;
}
.tq-name-hint {
  margin-top: 3px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.3px;
  color: var(--muted);
  transition: color 0.2s ease;
}
.tq-name-hint.is-flash {
  color: var(--teal);
}
.tq-player-stats {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
  margin-left: auto;
}
.tq-stat-chip {
  min-width: 76px;
  padding: 8px 12px 7px;
  border: 1px solid rgba(255, 255, 255, 0.95);
  border-radius: 15px;
  background: #fffdf8;
  text-align: center;
  box-shadow: 0 2px 0 rgba(70, 52, 35, 0.06), 0 10px 18px -16px rgba(60, 42, 24, 0.5);
}
.tq-stat-k {
  display: block;
  font-size: 8.5px;
  font-weight: 900;
  letter-spacing: 1.4px;
  color: var(--muted);
}
.tq-stat-v {
  display: block;
  margin-top: 1px;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 22px;
  line-height: 1.1;
  color: var(--ink);
}
.tq-stat-star {
  margin-left: 3px;
  font-size: 13px;
  color: var(--gold);
}
.tq-title-ribbon {
  padding: 8px 13px;
  border-radius: 12px;
  background: linear-gradient(140deg, #3c9a8b, #2f8b80);
  color: #f5fffb;
  font-size: 10.5px;
  font-weight: 900;
  letter-spacing: 0.6px;
  transform: rotate(-1.5deg);
  box-shadow: 0 3px 0 #1f6b62, 0 10px 18px -12px rgba(31, 107, 98, 0.8);
}
.tq-home-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.48fr) minmax(310px, 0.82fr);
  align-items: start;
  gap: 16px;
}
.tq-panel {
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.95);
  border-radius: 24px;
  background: rgba(255, 253, 248, 0.88);
  box-shadow: 0 2px 0 rgba(255, 255, 255, 0.8) inset,
    0 22px 46px -36px rgba(60, 42, 24, 0.55);
  backdrop-filter: blur(6px);
}
.tq-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.tq-panel-head h3 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 20px;
  letter-spacing: 0.7px;
  color: var(--ink);
}
.tq-panel-sub {
  margin-top: 3px;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.4px;
  color: var(--muted);
}
.tq-path-count {
  flex: 0 0 auto;
  padding: 6px 10px;
  border: 1px solid rgba(201, 128, 61, 0.25);
  border-radius: 999px;
  background: #fff7e4;
  color: var(--ink-2);
  font-size: 9.5px;
  font-weight: 900;
  white-space: nowrap;
}
.tq-path-count strong {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 14px;
  color: var(--coral-deep);
}
.tq-progress-track {
  height: 9px;
  margin-top: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(61, 52, 44, 0.08);
  box-shadow: inset 0 1px 2px rgba(61, 52, 44, 0.13);
}
.tq-progress-track > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #f2b84b, #e96b4c);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45);
  transition: width 0.42s ease;
}

/* 关卡探险路径 */
.tq-path {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 16px;
}
.tq-path::before {
  content: "";
  position: absolute;
  top: 16px;
  bottom: 16px;
  left: 32px;
  border-left: 2.5px dashed rgba(233, 107, 76, 0.22);
}
.tq-path-item {
  position: relative;
  list-style: none;
}
.tq-level-card {
  position: relative;
  display: grid;
  grid-template-columns: 36px 46px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 12px 14px 12px 11px;
  border: 1.5px solid rgba(70, 52, 35, 0.08);
  border-radius: 18px;
  background: linear-gradient(150deg, #fffdf8, #fbf6ec);
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 3px 0 rgba(70, 52, 35, 0.05), 0 14px 24px -22px rgba(60, 42, 24, 0.55);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease,
    background 0.18s ease;
}
.tq-level-card:hover {
  transform: translateY(-2px);
  border-color: rgba(201, 128, 61, 0.35);
  box-shadow: 0 5px 0 rgba(70, 52, 35, 0.05), 0 20px 30px -22px rgba(60, 42, 24, 0.6);
}
.tq-level-card.is-current {
  border-color: rgba(242, 184, 75, 0.72);
  background: linear-gradient(150deg, #fff8e2, #fffdf8 62%);
  box-shadow: 0 3px 0 rgba(201, 138, 36, 0.16), 0 18px 28px -20px rgba(201, 138, 36, 0.55);
}
.tq-level-card.is-current::after {
  content: "当前关卡";
  position: absolute;
  top: -8px;
  right: 12px;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--coral);
  color: #fffdf8;
  font-size: 8.5px;
  font-weight: 900;
  letter-spacing: 1.2px;
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.12);
}
.tq-level-card.is-locked {
  cursor: not-allowed;
  opacity: 0.76;
  background: repeating-linear-gradient(135deg, #fbf6ec, #fbf6ec 10px, #f7f0e3 10px, #f7f0e3 20px);
}
.tq-level-card.is-locked:hover {
  transform: none;
  border-color: rgba(70, 52, 35, 0.08);
  box-shadow: 0 3px 0 rgba(70, 52, 35, 0.05), 0 14px 24px -22px rgba(60, 42, 24, 0.55);
}
.tq-level-card.is-shake {
  animation: tq-shake 0.42s cubic-bezier(0.36, 0.07, 0.19, 0.97);
}
.tq-level-num {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: var(--tq-lv-soft, #fff1d2);
  color: color-mix(in srgb, var(--tq-lv, #e59a2f) 72%, #4a3420);
  font-family: var(--font-display);
  font-size: 15px;
  line-height: 1;
  box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.7), 0 2px 0 rgba(70, 52, 35, 0.08);
}
.tq-level-card.is-locked .tq-level-num {
  background: #efe7d8;
  color: var(--muted);
}
.tq-level-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 15px;
  background: var(--tq-lv-soft, #fff1d2);
  font-size: 24px;
  line-height: 1;
  transform: rotate(-2deg);
  box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.72), 0 3px 0 rgba(70, 52, 35, 0.07);
}
.tq-level-card.is-locked .tq-level-icon {
  filter: grayscale(0.95);
  opacity: 0.8;
}
.tq-level-copy {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}
.tq-level-kicker {
  font-size: 8.5px;
  font-weight: 900;
  letter-spacing: 1.3px;
  color: color-mix(in srgb, var(--tq-lv, #e59a2f) 70%, #6e6154);
}
.tq-level-card.is-locked .tq-level-kicker {
  color: var(--muted);
}
.tq-level-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 18px;
  line-height: 1.2;
  letter-spacing: 0.8px;
  color: var(--ink);
}
.tq-level-desc {
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  margin-top: 1px;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.5;
  color: var(--ink-2);
}
.tq-level-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
  min-width: 100px;
  text-align: right;
}
.tq-stars {
  display: inline-flex;
  gap: 1px;
  font-size: 15px;
  line-height: 1;
  letter-spacing: 1px;
  color: #d9ccb8;
}
.tq-stars .tq-star.is-on {
  color: var(--gold);
  text-shadow: 0 1px 0 rgba(201, 138, 36, 0.28);
}
.tq-level-best {
  font-size: 8.5px;
  font-weight: 800;
  letter-spacing: 0.2px;
  color: var(--muted);
}
.tq-level-state {
  margin-top: 1px;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.2px;
  color: var(--coral-deep);
}
.tq-level-card.is-passed .tq-level-state {
  color: var(--teal);
}
.tq-level-card.is-locked .tq-level-state {
  color: var(--muted);
}
.tq-path-foot {
  margin-top: 13px;
  padding: 8px 11px;
  border-radius: 12px;
  background: #fff8ea;
  color: var(--ink-2);
  font-size: 9.5px;
  font-weight: 800;
  line-height: 1.6;
  letter-spacing: 0.2px;
  text-align: center;
}

/* 右侧栏 */
.tq-side {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.tq-board-panel .tq-panel-head {
  align-items: center;
}
.tq-icon-btn {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fffdf8;
  color: var(--ink-2);
  font-size: 16px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
  transition: transform 0.2s ease, color 0.16s ease, background 0.16s ease;
}
.tq-icon-btn:hover {
  color: var(--coral-deep);
  background: #fff7ee;
  transform: rotate(60deg);
}
.tq-board-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 10px;
}
.tq-board-row {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto 48px;
  align-items: center;
  gap: 6px;
  padding: 8px 9px;
  border-radius: 12px;
  background: rgba(251, 246, 236, 0.66);
  font-size: 11.5px;
  transition: background 0.16s ease;
}
.tq-board-row.is-me {
  background: linear-gradient(120deg, #fff3d4, #fff9ea);
  box-shadow: inset 0 0 0 1px rgba(242, 184, 75, 0.55), 0 2px 0 rgba(201, 138, 36, 0.12);
}
.tq-board-rank {
  font-family: var(--font-display);
  font-size: 13px;
  line-height: 1;
  text-align: center;
  color: var(--muted);
}
.tq-board-rank.is-medal {
  font-size: 16px;
}
.tq-board-name {
  display: flex;
  align-items: center;
  gap: 5px;
  overflow: hidden;
  color: var(--ink);
  font-weight: 900;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.tq-board-me {
  flex: 0 0 auto;
  padding: 1px 5px;
  border-radius: 999px;
  background: var(--coral);
  color: #fffdf8;
  font-size: 7.5px;
  font-weight: 900;
  letter-spacing: 0.6px;
}
.tq-board-score {
  color: var(--ink-2);
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.tq-board-stars {
  color: #d99a2b;
  font-size: 10.5px;
  font-weight: 900;
  text-align: right;
  white-space: nowrap;
}
.tq-board-note {
  padding: 10px 12px;
  border-radius: 12px;
  background: #fbf6ec;
  color: var(--ink-2);
  font-size: 10.5px;
  font-weight: 700;
  line-height: 1.7;
}
.tq-board-note.is-warn {
  margin-top: 8px;
  border: 1px dashed rgba(233, 107, 76, 0.35);
  background: #fff1e9;
  color: var(--coral-deep);
}
.tq-board-divider {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 5px;
  color: var(--muted);
  font-size: 8.5px;
  font-weight: 900;
  letter-spacing: 1.4px;
}
.tq-board-divider::before,
.tq-board-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}
.tq-board-foot {
  margin-top: 4px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.3px;
}

/* 成就徽章 */
.tq-ach-count {
  flex: 0 0 auto;
  padding: 4px 9px;
  border-radius: 999px;
  background: #e3f3ee;
  color: var(--teal-deep);
  font-size: 9.5px;
  font-weight: 900;
}
.tq-ach-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}
.tq-ach {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 9px;
  border: 1px solid rgba(70, 52, 35, 0.07);
  border-radius: 14px;
  background: #fbf6ec;
}
.tq-ach.is-unlocked {
  border-color: rgba(242, 184, 75, 0.4);
  background: linear-gradient(140deg, #fff8e6, #fffdf8);
  box-shadow: 0 2px 0 rgba(242, 184, 75, 0.14);
}
.tq-ach.is-locked {
  opacity: 0.62;
}
.tq-ach-icon {
  position: relative;
  flex: 0 0 34px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 11px;
  background: #fffdf8;
  font-size: 18px;
  line-height: 1;
  box-shadow: 0 2px 0 rgba(70, 52, 35, 0.06);
}
.tq-ach.is-locked .tq-ach-icon {
  filter: grayscale(1);
}
.tq-ach-lock {
  position: absolute;
  right: -4px;
  bottom: -4px;
  font-size: 10px;
  font-style: normal;
  filter: none;
}
.tq-ach-copy {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}
.tq-ach-copy strong {
  font-size: 11px;
  letter-spacing: 0.2px;
  color: var(--ink);
}
.tq-ach-copy span {
  font-size: 8.5px;
  font-weight: 700;
  line-height: 1.45;
  color: var(--muted);
}
.tq-rule-note {
  padding: 0 4px;
  color: var(--muted);
  font-size: 9.5px;
  font-weight: 800;
  line-height: 1.6;
  letter-spacing: 0.2px;
  text-align: center;
}

/* ------------------------------------------------------------
   4. 答题页
   ------------------------------------------------------------ */
.tq-quiz {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  max-width: 780px;
  margin: 0 auto;
  padding-top: 2px;
}
.tq-quiz-top {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 2px 2px 0;
}
.tq-back {
  flex: 0 0 auto;
  margin-top: 2px;
}
.tq-quiz-heading {
  flex: 1 1 auto;
  min-width: 0;
}
.tq-quiz-level {
  color: var(--muted);
  font-size: 9.5px;
  font-weight: 900;
  letter-spacing: 1.4px;
}
.tq-quiz-title {
  margin-top: 2px;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 23px;
  line-height: 1.2;
  letter-spacing: 0.6px;
  color: var(--ink);
}
.tq-quiz-title span {
  color: var(--muted);
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.3px;
}
.tq-quiz-stats {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 5px;
  flex: 0 0 auto;
}
.tq-quiz-score {
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fffdf8;
  color: var(--ink-2);
  font-size: 10px;
  font-weight: 900;
  white-space: nowrap;
}
.tq-quiz-score strong {
  margin-left: 2px;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 17px;
  color: var(--coral-deep);
}
.tq-streak {
  padding: 4px 9px;
  border-radius: 999px;
  background: linear-gradient(120deg, #fff0c9, #ffe1a1);
  color: #a36a0c;
  font-size: 9.5px;
  font-weight: 900;
  letter-spacing: 0.3px;
  box-shadow: 0 2px 0 rgba(201, 138, 36, 0.22);
}
.tq-streak.is-bump {
  animation: tq-streak-bump 0.4s ease;
}
.tq-quiz-progress {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(61, 52, 44, 0.08);
  box-shadow: inset 0 1px 2px rgba(61, 52, 44, 0.12);
}
.tq-quiz-progress > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #f2b84b, #e96b4c);
  transition: width 0.35s ease;
}
.tq-question-card {
  padding: 18px 18px 20px;
  border: 1px solid rgba(255, 255, 255, 0.95);
  border-radius: 24px;
  background: rgba(255, 253, 248, 0.93);
  box-shadow: 0 2px 0 rgba(255, 255, 255, 0.8) inset,
    0 26px 52px -38px rgba(60, 42, 24, 0.6);
}
.tq-q-prompt {
  margin-top: 16px;
}
.tq-q-prompt:focus {
  outline: none;
}
.tq-q-kicker {
  color: var(--coral-deep);
  font-size: 9.5px;
  font-weight: 900;
  letter-spacing: 1.7px;
}
.tq-q-title {
  margin-top: 4px;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(20px, 2.6vw, 26px);
  line-height: 1.3;
  letter-spacing: 0.5px;
  color: var(--ink);
}
.tq-q-sub {
  margin-top: 5px;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 700;
  line-height: 1.7;
}
.tq-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}
.tq-option {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 54px;
  padding: 11px 13px;
  border: 1.5px solid rgba(70, 52, 35, 0.1);
  border-radius: 15px;
  background: #fffdf8;
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 3px 0 rgba(70, 52, 35, 0.06);
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease,
    box-shadow 0.15s ease, opacity 0.2s ease;
}
.tq-option:hover:not(:disabled) {
  transform: translateY(-2px);
  border-color: rgba(233, 107, 76, 0.45);
  background: #fffaf4;
  box-shadow: 0 5px 0 rgba(233, 107, 76, 0.12);
}
.tq-option:active:not(:disabled) {
  transform: translateY(0);
  box-shadow: none;
}
.tq-option:disabled {
  cursor: default;
}
.tq-option-key {
  flex: 0 0 28px;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 9px;
  background: #f4ecdd;
  color: var(--ink-2);
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
}
.tq-option-label {
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.2px;
}
.tq-option.is-correct {
  border-color: rgba(64, 145, 86, 0.65);
  background: linear-gradient(140deg, #e7f7ec, #f8fdf9);
  box-shadow: 0 3px 0 rgba(64, 145, 86, 0.2);
}
.tq-option.is-correct .tq-option-key {
  background: #409156;
  color: #fff;
}
.tq-option.is-correct::after {
  content: "✓";
  margin-left: auto;
  color: #2f7a47;
  font-size: 16px;
  font-weight: 900;
}
.tq-option.is-wrong {
  border-color: rgba(233, 107, 76, 0.7);
  background: linear-gradient(140deg, #ffe9e2, #fff8f5);
  box-shadow: 0 3px 0 rgba(233, 107, 76, 0.2);
  animation: tq-wrong-shake 0.38s ease;
}
.tq-option.is-wrong .tq-option-key {
  background: var(--coral);
  color: #fff;
}
.tq-option.is-wrong::after {
  content: "×";
  margin-left: auto;
  color: var(--coral);
  font-size: 18px;
  font-weight: 900;
}
.tq-option.is-dimmed {
  opacity: 0.58;
}
.tq-feedback {
  margin-top: 14px;
}
.tq-feedback-card {
  padding: 13px 15px;
  border: 1.5px solid transparent;
  border-radius: 16px;
  animation: tq-feedback-in 0.28s ease both;
}
.tq-feedback-card.is-correct {
  border-color: rgba(64, 145, 86, 0.35);
  background: linear-gradient(140deg, #eaf8ef, #fbfffc);
}
.tq-feedback-card.is-wrong {
  border-color: rgba(233, 107, 76, 0.35);
  background: linear-gradient(140deg, #fff2ec, #fffaf6);
}
.tq-feedback-head {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.tq-feedback-icon {
  font-size: 18px;
  line-height: 1;
}
.tq-feedback-head strong {
  font-size: 13.5px;
  letter-spacing: 0.2px;
  color: var(--ink);
}
.tq-feedback-points {
  margin-left: auto;
  padding: 2px 9px;
  border-radius: 999px;
  background: #d7f0df;
  color: #2e7d4f;
  font-family: var(--font-display);
  font-size: 16px;
  line-height: 1.4;
}
.tq-feedback-answer {
  margin-left: auto;
  padding: 4px 9px;
  border-radius: 999px;
  background: #ffe1d5;
  color: var(--coral-deep);
  font-size: 10px;
  font-weight: 900;
}
.tq-feedback-knowledge {
  margin-top: 8px;
  color: var(--ink-2);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.75;
}
.tq-k-label {
  display: inline-block;
  margin-right: 6px;
  padding: 1px 6px;
  border-radius: 5px;
  background: var(--ink);
  color: #fffdf8;
  font-size: 8.5px;
  font-weight: 900;
  letter-spacing: 1px;
  vertical-align: 1px;
}
.tq-feedback-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 12px;
}
.tq-exit-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 12px 14px;
  border: 1px dashed rgba(201, 128, 61, 0.5);
  border-radius: 16px;
  background: #fff6e2;
}
.tq-exit-bar p {
  flex: 1 1 220px;
  color: var(--ink-2);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.6;
}
.tq-exit-actions {
  display: flex;
  gap: 8px;
  margin-left: auto;
}

/* ------------------------------------------------------------
   5. 题目视觉组件
   ------------------------------------------------------------ */
/* 5.1 轮廓拼图 */
.tq-puzzle {
  margin: 0;
}
.tq-puzzle-frame {
  position: relative;
  display: grid;
  place-items: center;
  height: clamp(190px, 30vh, 300px);
  overflow: hidden;
  border: 1.5px dashed rgba(201, 128, 61, 0.4);
  border-radius: 20px;
  background: radial-gradient(circle at 30% 18%, #fffaf0 0%, #f7eeda 72%);
}
.tq-puzzle-frame::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(95, 74, 48, 0.13) 1px, transparent 1px);
  background-size: 18px 18px;
  opacity: 0.55;
}
.tq-puzzle-sticker {
  position: absolute;
  top: 10px;
  left: 12px;
  z-index: 2;
  padding: 3px 8px;
  border: 1px solid rgba(201, 128, 61, 0.3);
  border-radius: 6px;
  background: #fff4d9;
  color: #b06a2c;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 2px;
  transform: rotate(-2deg);
}
.tq-puzzle-svg {
  position: relative;
  z-index: 1;
  width: min(76%, 320px);
  height: 100%;
  max-height: 260px;
  overflow: visible;
  filter: drop-shadow(0 12px 14px rgba(80, 55, 25, 0.16));
}
.tq-puzzle-shape {
  fill: #ffd9a3;
  stroke: #b9712f;
  stroke-width: 2.4;
  stroke-linejoin: round;
}
.tq-puzzle-shadow {
  fill: rgba(70, 52, 35, 0.14);
  transform: translate(5px, 7px);
}
.tq-puzzle-pin {
  position: absolute;
  right: 14px;
  bottom: 12px;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(255, 253, 248, 0.86);
  color: var(--coral);
  box-shadow: 0 3px 10px -4px rgba(80, 55, 25, 0.35);
  transform: rotate(6deg);
  backdrop-filter: blur(4px);
}
.tq-puzzle-pin svg {
  width: 17px;
  height: 17px;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.tq-puzzle figcaption,
.tq-food figcaption,
.tq-citymap figcaption {
  margin-top: 8px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.3px;
  text-align: center;
}

/* 5.2 省份卡片 */
.tq-province-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 20px;
  overflow: hidden;
  padding: 24px 26px;
  border: 1px solid rgba(255, 255, 255, 0.95);
  border-radius: 20px;
  background:
    radial-gradient(circle at 88% 10%, var(--tq-region-soft, #ffe6d1) 0%, transparent 55%),
    linear-gradient(135deg, #fffaf0, #fffdf8 58%, var(--tq-province-tone, #ffd9c1));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 14px 26px -24px rgba(60, 42, 24, 0.5);
}
.tq-province-card::after {
  content: "省份档案";
  position: absolute;
  top: 12px;
  right: 14px;
  color: color-mix(in srgb, var(--tq-region, #e8914f) 62%, #fffdf8);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 2.4px;
  transform: rotate(2deg);
}
.tq-province-emoji {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 82px;
  height: 82px;
  border-radius: 24px;
  background: #fffdf8;
  font-size: 42px;
  line-height: 1;
  transform: rotate(-3deg);
  box-shadow: 0 4px 0 rgba(70, 52, 35, 0.08), inset 0 0 0 1.5px rgba(255, 255, 255, 0.9);
}
.tq-province-copy {
  min-width: 0;
}
.tq-province-kicker {
  color: var(--tq-region, #e8914f);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 2px;
}
.tq-province-name {
  display: block;
  margin-top: 2px;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(34px, 5vw, 50px);
  line-height: 1.05;
  letter-spacing: 3px;
  color: var(--ink);
}
.tq-province-tags {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.tq-province-seal {
  padding: 2px 8px;
  border-radius: 8px;
  background: var(--tq-region, #e8914f);
  color: #fffdf8;
  font-family: var(--font-display);
  font-size: 13px;
  line-height: 1.5;
  transform: rotate(-2deg);
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.12);
}
.tq-province-pinyin {
  color: var(--muted);
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 1.5px;
}

/* 5.3 美食图片 */
.tq-food {
  margin: 0;
}
.tq-food-frame {
  position: relative;
  height: clamp(190px, 32vh, 300px);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 20px;
  background: linear-gradient(140deg, #f6ead6, #fdf7ec);
  box-shadow: inset 0 0 0 1.5px rgba(201, 128, 61, 0.12);
}
.tq-food-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, transparent 55%, rgba(35, 24, 14, 0.22));
}
.tq-food-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
}
.tq-food-badge {
  position: absolute;
  z-index: 2;
  top: 12px;
  right: 12px;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(61, 52, 44, 0.82);
  color: #ffe3a8;
  font-family: var(--font-display);
  font-size: 22px;
  line-height: 1;
  box-shadow: 0 4px 12px -6px rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(6px);
}
.tq-food-fallback {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: none;
  place-content: center;
  gap: 4px;
  padding: 20px;
  background: repeating-linear-gradient(135deg, #fbf1dd, #fbf1dd 12px, #f7ead2 12px, #f7ead2 24px);
  text-align: center;
}
.tq-food-frame.is-missing .tq-food-img {
  display: none;
}
.tq-food-frame.is-missing .tq-food-fallback {
  display: grid;
}
.tq-food-fallback-icon {
  font-size: 36px;
}
.tq-food-fallback strong {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 25px;
  letter-spacing: 2px;
  color: var(--ink);
}
.tq-food-fallback small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

/* 5.4 美食文字线索 */
.tq-clue-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  overflow: hidden;
  padding: 26px 20px;
  border: 1.5px dashed rgba(201, 128, 61, 0.45);
  border-radius: 20px;
  background: linear-gradient(140deg, #fff8e8, #fffdf8);
  text-align: center;
}
.tq-clue-card::before {
  content: "?";
  position: absolute;
  top: 4px;
  right: 18px;
  color: rgba(201, 128, 61, 0.13);
  font-family: var(--font-display);
  font-size: 64px;
  line-height: 1;
}
.tq-clue-icon {
  font-size: 34px;
  line-height: 1;
}
.tq-clue-kicker {
  color: var(--muted);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 2.4px;
}
.tq-clue-name {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(24px, 4vw, 34px);
  line-height: 1.3;
  letter-spacing: 2px;
  color: var(--ink);
}
.tq-clue-sub {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

/* 5.5 城市地图 */
.tq-citymap {
  margin: 0;
}
.tq-citymap-frame {
  position: relative;
  overflow: hidden;
  padding: 8px;
  border: 1px solid rgba(201, 128, 61, 0.18);
  border-radius: 20px;
  background: radial-gradient(circle at 50% 40%, #fffdf8 0%, #f7eedd 80%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}
.tq-city-svg {
  display: block;
  width: 100%;
  height: auto;
  max-height: clamp(220px, 40vh, 380px);
}
.tq-city-outline {
  fill: #f4ecdb;
  stroke: #d8c6a8;
  stroke-width: 1.1;
  stroke-dasharray: 4 3;
}
.tq-city-shape {
  fill: #fdf8ec;
  stroke: #c9b79c;
  stroke-width: 0.8;
  transition: fill 0.2s ease;
}
.tq-city-shape.is-target {
  fill: #ffe2c6;
  stroke: #e96b4c;
  stroke-width: 1.5;
}
.tq-city-capital-pin circle {
  fill: #e96b4c;
  stroke: #fffdf8;
  stroke-width: 1.2;
}
.tq-city-capital-pin text {
  fill: #fffdf8;
  font-family: var(--font-ui);
  font-weight: 900;
}
.tq-city-pulse-ring {
  fill: none;
  stroke: #e96b4c;
  stroke-width: 2;
  transform-box: fill-box;
  transform-origin: center;
  animation: tq-city-pulse 1.9s ease-out infinite;
}
.tq-city-pulse-ring.is-late {
  animation-delay: 0.95s;
}
.tq-city-pulse-dot {
  fill: #e96b4c;
  stroke: #fffdf8;
  stroke-width: 1;
  animation: tq-city-dot-pulse 1.9s ease-in-out infinite;
}
.tq-city-labels {
  pointer-events: none;
}
.tq-city-label {
  fill: #4a4038;
  font-family: var(--font-ui);
  font-weight: 800;
  letter-spacing: 0.2px;
  paint-order: stroke;
  stroke: rgba(255, 253, 248, 0.92);
  stroke-width: 2.2px;
  stroke-linejoin: round;
}
.tq-city-label.is-capital {
  fill: #cf3f25;
  font-weight: 900;
}
.tq-citymap-legend {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  padding: 6px 4px 2px;
  color: var(--ink-2);
  font-size: 9px;
  font-weight: 800;
}
.tq-citymap-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.tq-citymap-legend b {
  color: #cf3f25;
  font-size: 12px;
}
.tq-legend-pulse {
  display: inline-block;
  width: 10px;
  height: 10px;
  border: 2px solid var(--coral);
  border-radius: 50%;
  background: #ffd9c9;
  animation: tq-legend-pulse 1.6s ease-in-out infinite;
}

/* 5.6 中国之最数据卡 */
.tq-record-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 22px;
  border: 1px solid rgba(255, 255, 255, 0.95);
  border-radius: 20px;
  background:
    radial-gradient(circle at 89% 8%, #e9defb 0%, transparent 55%),
    linear-gradient(135deg, #fffaf0, #fffdf8 62%, #f1e9fc);
  box-shadow: inset 0 1px 0 #fff;
}
.tq-record-icon {
  flex: 0 0 62px;
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  border-radius: 20px;
  background: #fffdf8;
  font-size: 32px;
  line-height: 1;
  transform: rotate(-4deg);
  box-shadow: 0 4px 0 rgba(70, 52, 35, 0.07);
}
.tq-record-kicker {
  color: #7a5cae;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 2px;
}
.tq-record-name {
  display: block;
  margin-top: 2px;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 26px;
  line-height: 1.2;
  letter-spacing: 1.5px;
  color: var(--ink);
}
.tq-record-sub {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

/* ------------------------------------------------------------
   6. 结算页
   ------------------------------------------------------------ */
.tq-result {
  display: flex;
  justify-content: center;
  padding-top: 6px;
}
.tq-result-card {
  position: relative;
  width: min(660px, 100%);
  overflow: hidden;
  padding: clamp(22px, 4vw, 38px);
  border: 1px solid rgba(255, 255, 255, 0.95);
  border-radius: 28px;
  background:
    radial-gradient(circle at 50% -10%, #fff3d2 0%, transparent 52%),
    linear-gradient(160deg, #fffdf8, #fdf6e9);
  box-shadow: 0 32px 64px -42px rgba(60, 42, 24, 0.65), inset 0 1px 0 #fff;
  text-align: center;
}
.tq-result-card::before {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1.5px dashed rgba(201, 128, 61, 0.26);
  border-radius: 20px;
  pointer-events: none;
}
.tq-result-kicker {
  position: relative;
  display: inline-block;
  padding: 5px 12px;
  border-radius: 999px;
  background: #ffe8da;
  color: var(--coral-deep);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 2px;
}
.tq-result-title {
  position: relative;
  margin-top: 12px;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(30px, 5vw, 44px);
  line-height: 1.1;
  letter-spacing: 2px;
  color: var(--ink);
}
.tq-result-title:focus {
  outline: none;
}
.tq-result-sub {
  position: relative;
  margin-top: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}
.tq-result-stars {
  position: relative;
  display: flex;
  justify-content: center;
  gap: 14px;
  margin: 12px 0 4px;
  font-size: clamp(46px, 9vw, 72px);
  line-height: 1;
}
.tq-result-star {
  color: rgba(61, 52, 44, 0.14);
  transform: scale(0.82);
}
.tq-result-star.is-earned {
  color: var(--gold);
  text-shadow: 0 5px 0 rgba(201, 138, 36, 0.28), 0 12px 22px rgba(242, 184, 75, 0.45);
  animation: tq-star-pop 0.55s cubic-bezier(0.2, 1.6, 0.4, 1) both;
}
.tq-result-star.is-empty {
  color: rgba(61, 52, 44, 0.13);
}
.tq-record-flag {
  display: inline-block;
  margin-top: 2px;
  padding: 5px 12px;
  border-radius: 999px;
  background: #fff0c9;
  color: #a36a0c;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.6px;
  transform: rotate(-1deg);
}
.tq-result-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
  margin-top: 14px;
}
.tq-result-stat {
  padding: 11px 8px;
  border: 1px solid rgba(70, 52, 35, 0.08);
  border-radius: 16px;
  background: #fffdf8;
  box-shadow: 0 3px 0 rgba(70, 52, 35, 0.05);
}
.tq-result-stat span {
  display: block;
  color: var(--muted);
  font-size: 8.5px;
  font-weight: 900;
  letter-spacing: 1px;
}
.tq-result-stat strong {
  display: inline-block;
  margin-top: 2px;
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 30px;
  line-height: 1;
}
.tq-result-stat small {
  display: inline-block;
  margin-left: 3px;
  color: var(--muted);
  font-size: 8.5px;
  font-weight: 800;
}
.tq-unlock-note {
  margin-top: 12px;
  padding: 9px 12px;
  border: 1px dashed rgba(47, 139, 128, 0.35);
  border-radius: 13px;
  background: linear-gradient(120deg, #e5f6ee, #f6fdf9);
  color: var(--teal-deep);
  font-size: 11px;
  font-weight: 900;
  line-height: 1.6;
}
.tq-new-badges {
  margin-top: 12px;
}
.tq-new-badges-title {
  color: var(--ink-2);
  font-size: 9.5px;
  font-weight: 900;
  letter-spacing: 1.2px;
}
.tq-new-badge-row {
  display: flex;
  justify-content: center;
  gap: 7px;
  flex-wrap: wrap;
  margin-top: 6px;
}
.tq-new-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 11px;
  border: 1px solid rgba(242, 184, 75, 0.5);
  border-radius: 999px;
  background: linear-gradient(140deg, #fff4d6, #fffdf8);
  color: #8a5a10;
  font-size: 10px;
  font-weight: 900;
  animation: tq-badge-in 0.4s ease both;
}
.tq-result-actions {
  position: relative;
  display: flex;
  justify-content: center;
  gap: 9px;
  flex-wrap: wrap;
  margin-top: 16px;
}
.tq-sync-note {
  margin-top: 12px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  line-height: 1.6;
}
.tq-sync-note[data-tone="ok"] {
  color: var(--teal-deep);
}
.tq-sync-note[data-tone="warn"] {
  color: var(--coral-deep);
}

/* ------------------------------------------------------------
   7. 空状态 / 轻提示
   ------------------------------------------------------------ */
.tq-empty {
  width: min(460px, 100%);
  margin: 8vh auto 0;
  padding: 32px 24px;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 24px;
  background: #fffdf8;
  box-shadow: 0 24px 50px -38px rgba(60, 42, 24, 0.6);
  text-align: center;
}
.tq-empty-icon {
  font-size: 46px;
  line-height: 1;
}
.tq-empty h2 {
  margin-top: 8px;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 26px;
  letter-spacing: 1px;
}
.tq-empty p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}
.tq-empty .tq-primary-btn {
  margin-top: 16px;
}
.tq-toast {
  position: fixed;
  z-index: 340;
  left: 50%;
  bottom: max(22px, env(safe-area-inset-bottom));
  max-width: min(90vw, 480px);
  padding: 10px 18px;
  border-radius: 999px;
  background: rgba(51, 42, 33, 0.96);
  color: #fffdf8;
  font-size: 11.5px;
  font-weight: 800;
  line-height: 1.5;
  text-align: center;
  box-shadow: 0 16px 34px -12px rgba(31, 21, 12, 0.7);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 14px);
  transition: opacity 0.2s ease, transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.tq-toast.is-show {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ------------------------------------------------------------
   8. 动画
   ------------------------------------------------------------ */
@keyframes tq-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes tq-shell-in {
  from { opacity: 0; transform: translateY(12px) scale(0.996); }
  to { opacity: 1; transform: none; }
}
@keyframes tq-feedback-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}
@keyframes tq-star-pop {
  0% { opacity: 0; transform: scale(0.35) rotate(-20deg); }
  62% { opacity: 1; transform: scale(1.18) rotate(5deg); }
  100% { opacity: 1; transform: scale(1) rotate(0deg); }
}
@keyframes tq-badge-in {
  from { opacity: 0; transform: translateY(6px) scale(0.92); }
  to { opacity: 1; transform: none; }
}
@keyframes tq-streak-bump {
  0% { transform: scale(1); }
  45% { transform: scale(1.16) rotate(-2deg); }
  100% { transform: scale(1); }
}
@keyframes tq-wrong-shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-5px); }
  40% { transform: translateX(4px); }
  60% { transform: translateX(-3px); }
  80% { transform: translateX(2px); }
}
@keyframes tq-shake {
  0%, 100% { transform: translateX(0); }
  18% { transform: translateX(-7px) rotate(-0.6deg); }
  36% { transform: translateX(6px) rotate(0.5deg); }
  54% { transform: translateX(-5px) rotate(-0.4deg); }
  72% { transform: translateX(4px); }
  88% { transform: translateX(-2px); }
}
@keyframes tq-city-pulse {
  0% { opacity: 0.95; transform: scale(0.42); }
  70% { opacity: 0.18; transform: scale(1.35); }
  100% { opacity: 0; transform: scale(1.65); }
}
@keyframes tq-city-dot-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.55; }
}
@keyframes tq-legend-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.18); opacity: 0.72; }
}

/* ------------------------------------------------------------
   9. 响应式
   ------------------------------------------------------------ */
@media (max-width: 1180px) {
  .tq-home-grid {
    grid-template-columns: minmax(0, 1.35fr) minmax(290px, 0.85fr);
  }
  .tq-ach-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 980px) {
  .tq-home-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .tq-side {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
  }
  .tq-rule-note {
    grid-column: 1 / -1;
  }
  .tq-ach-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .tq-entry-btn {
    width: 38px;
    height: 38px;
    padding: 0;
    gap: 0;
    border-radius: 12px;
  }
  .tq-entry-icon {
    width: 19px;
    height: 19px;
  }
  .tq-entry-text {
    display: none;
  }
  .tq-shell {
    padding: max(7px, env(safe-area-inset-top)) 10px 0;
  }
  .tq-topbar {
    gap: 10px;
    padding: 8px 1px 10px;
  }
  .tq-brand {
    gap: 9px;
  }
  .tq-brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 13px;
    font-size: 22px;
  }
  .tq-brand-title {
    font-size: 21px;
    letter-spacing: 1px;
  }
  .tq-brand-sub {
    font-size: 8px;
    letter-spacing: 2px;
  }
  .tq-close {
    width: 38px;
    height: 38px;
    font-size: 23px;
  }
  .tq-body {
    padding: 0 1px 28px;
  }
  .tq-home {
    gap: 12px;
    padding-top: 2px;
  }
  .tq-player-card {
    gap: 11px;
    padding: 15px;
    border-radius: 22px;
  }
  .tq-player-card::after {
    inset: 6px;
    border-radius: 17px;
  }
  .tq-player-sticker {
    right: 14px;
    font-size: 7.5px;
    letter-spacing: 1.4px;
  }
  .tq-avatar {
    width: 52px;
    height: 52px;
    border-radius: 18px;
    font-size: 27px;
  }
  .tq-player-main {
    flex: 1 1 55%;
  }
  .tq-name-input {
    width: min(46vw, 200px);
    font-size: 19px;
  }
  .tq-player-stats {
    width: 100%;
    margin-left: 0;
    gap: 7px;
  }
  .tq-stat-chip {
    flex: 1 1 0;
    min-width: 0;
    padding: 7px 8px 6px;
  }
  .tq-stat-v {
    font-size: 20px;
  }
  .tq-title-ribbon {
    flex: 1 1 100%;
    padding: 7px 10px;
    font-size: 10px;
    text-align: center;
  }
  .tq-panel {
    padding: 14px;
    border-radius: 21px;
  }
  .tq-panel-head h3 {
    font-size: 18px;
  }
  .tq-path::before {
    left: 27px;
  }
  .tq-path {
    gap: 10px;
    margin-top: 13px;
  }
  .tq-level-card {
    grid-template-columns: 30px 40px minmax(0, 1fr);
    row-gap: 7px;
    padding: 11px 12px 10px 10px;
    border-radius: 16px;
  }
  .tq-level-num {
    width: 30px;
    height: 30px;
    border-radius: 10px;
    font-size: 13px;
  }
  .tq-level-icon {
    width: 40px;
    height: 40px;
    border-radius: 13px;
    font-size: 21px;
  }
  .tq-level-title {
    font-size: 16.5px;
  }
  .tq-level-meta {
    grid-column: 2 / 4;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 9px;
    min-width: 0;
    text-align: left;
  }
  .tq-stars {
    font-size: 14px;
  }
  .tq-level-best {
    font-size: 8.5px;
  }
  .tq-level-state {
    margin-left: auto;
    margin-top: 0;
    font-size: 9.5px;
  }
  .tq-level-card.is-current::after {
    top: -7px;
    right: 9px;
  }
  .tq-side {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .tq-ach-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .tq-quiz {
    gap: 10px;
  }
  .tq-quiz-top {
    flex-wrap: wrap;
    gap: 8px;
  }
  .tq-back {
    order: 1;
  }
  .tq-quiz-heading {
    order: 2;
    flex: 1 1 auto;
  }
  .tq-quiz-stats {
    order: 3;
    flex: 1 1 100%;
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
    gap: 7px;
  }
  .tq-quiz-title {
    font-size: 21px;
  }
  .tq-question-card {
    padding: 14px 13px 16px;
    border-radius: 21px;
  }
  .tq-q-prompt {
    margin-top: 13px;
  }
  .tq-q-title {
    font-size: 21px;
  }
  .tq-q-sub {
    font-size: 10px;
  }
  .tq-options {
    gap: 8px;
  }
  .tq-option {
    min-height: 50px;
    padding: 9px 11px;
    border-radius: 13px;
  }
  .tq-option-label {
    font-size: 13px;
  }
  .tq-puzzle-frame,
  .tq-food-frame {
    height: clamp(170px, 26vh, 240px);
    border-radius: 17px;
  }
  .tq-puzzle-svg {
    max-height: 210px;
  }
  .tq-province-card {
    gap: 14px;
    padding: 18px;
    border-radius: 17px;
  }
  .tq-province-emoji {
    width: 62px;
    height: 62px;
    border-radius: 19px;
    font-size: 32px;
  }
  .tq-province-name {
    font-size: 34px;
    letter-spacing: 2px;
  }
  .tq-province-card::after {
    font-size: 7px;
    letter-spacing: 1.6px;
  }
  .tq-record-card {
    gap: 12px;
    padding: 16px;
    border-radius: 17px;
  }
  .tq-record-icon {
    flex: 0 0 52px;
    width: 52px;
    height: 52px;
    border-radius: 17px;
    font-size: 27px;
  }
  .tq-record-name {
    font-size: 22px;
  }
  .tq-citymap-frame {
    padding: 5px;
    border-radius: 17px;
  }
  .tq-city-svg {
    max-height: 300px;
  }
  .tq-citymap-legend {
    gap: 11px;
    font-size: 8.5px;
  }
  .tq-feedback-head {
    gap: 6px;
  }
  .tq-feedback-head strong {
    font-size: 12.5px;
  }
  .tq-feedback-knowledge {
    font-size: 10.5px;
  }
  .tq-result-card {
    padding: 22px 16px;
    border-radius: 23px;
  }
  .tq-result-card::before {
    inset: 7px;
    border-radius: 17px;
  }
  .tq-result-title {
    font-size: 32px;
  }
  .tq-result-stars {
    gap: 9px;
    font-size: 52px;
  }
  .tq-result-stats {
    gap: 7px;
  }
  .tq-result-stat {
    padding: 9px 5px;
  }
  .tq-result-stat strong {
    font-size: 24px;
  }
  .tq-result-stat small {
    display: block;
    margin-left: 0;
  }
  .tq-result-actions {
    gap: 7px;
  }
  .tq-result-actions .tq-primary-btn,
  .tq-result-actions .tq-secondary-btn {
    flex: 1 1 100%;
  }
  .tq-result-actions .tq-quiet-btn {
    flex: 1 1 100%;
  }
  .tq-exit-bar {
    padding: 11px 12px;
  }
  .tq-exit-actions {
    width: 100%;
    margin-left: 0;
  }
  .tq-exit-actions .tq-secondary-btn,
  .tq-exit-actions .tq-quiet-btn {
    flex: 1;
  }
}

@media (max-width: 560px) {
  .tq-options {
    grid-template-columns: 1fr;
  }
  .tq-ach-list {
    grid-template-columns: 1fr;
  }
  .tq-brand-sub {
    display: none;
  }
  .tq-quiz-title span {
    display: inline;
  }
  .tq-new-badge {
    font-size: 9px;
  }
}

@media (max-width: 390px) {
  .tq-brand-title {
    font-size: 19px;
    letter-spacing: 0.6px;
  }
  .tq-brand-mark {
    width: 38px;
    height: 38px;
    font-size: 20px;
  }
  .tq-close {
    width: 35px;
    height: 35px;
  }
  .tq-stat-v {
    font-size: 18px;
  }
  .tq-player-stats {
    gap: 5px;
  }
  .tq-result-title {
    font-size: 28px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tq-overlay,
  .tq-shell,
  .tq-feedback-card,
  .tq-result-star.is-earned,
  .tq-new-badge,
  .tq-streak.is-bump,
  .tq-option.is-wrong,
  .tq-level-card.is-shake,
  .tq-city-pulse-ring,
  .tq-city-pulse-dot,
  .tq-legend-pulse {
    animation: none !important;
  }
  .tq-result-star {
    transform: none;
  }
  .tq-entry-btn,
  .tq-level-card,
  .tq-option,
  .tq-primary-btn,
  .tq-secondary-btn,
  .tq-icon-btn,
  .tq-close {
    transition: none !important;
  }
}

/* Numeric glyphs: ZCOOL's decorative digits read like little boxes.
   Numbers use Nunito so scores, progress and ranks stay instantly legible. */
.tq-overlay .tq-stat-v,
.tq-overlay .tq-level-num,
.tq-overlay .tq-level-best,
.tq-overlay .tq-level-kicker,
.tq-overlay .tq-path-count,
.tq-overlay .tq-path-count strong,
.tq-overlay .tq-ach-count,
.tq-overlay .tq-board-rank,
.tq-overlay .tq-board-score,
.tq-overlay .tq-board-stars,
.tq-overlay .tq-quiz-level,
.tq-overlay .tq-quiz-title,
.tq-overlay .tq-quiz-title span,
.tq-overlay .tq-quiz-score,
.tq-overlay .tq-quiz-score strong,
.tq-overlay .tq-streak,
.tq-overlay .tq-feedback-points,
.tq-overlay .tq-result-kicker,
.tq-overlay .tq-result-stat strong,
.tq-overlay .tq-result-stat small {
  font-family: var(--font-ui) !important;
  font-variant-numeric: tabular-nums;
}
.tq-overlay .tq-stat-v,
.tq-overlay .tq-quiz-score strong,
.tq-overlay .tq-result-stat strong {
  font-weight: 900;
  letter-spacing: 0;
}


/* ---------- World country challenge visuals ---------- */
.tq-world-flag-figure {
  margin: 0 0 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
}
.tq-world-flag-frame {
  position: relative;
  width: min(100%, 300px);
  aspect-ratio: 5 / 3;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 16px;
  background:
    radial-gradient(circle at 30% 20%, rgba(255,255,255,.92), transparent 55%),
    linear-gradient(145deg, #e4f3ee, #fff5e8);
  border: 1px solid rgba(74, 58, 38, .1);
  box-shadow: 0 12px 24px -18px rgba(50, 38, 24, .55), inset 0 1px 0 rgba(255,255,255,.9);
}
.tq-world-flag-img {
  width: 78%;
  max-height: 78%;
  object-fit: contain;
  filter: drop-shadow(0 8px 10px rgba(50, 38, 24, .2));
  border-radius: 3px;
}
.tq-world-flag-badge {
  position: absolute;
  right: 10px;
  bottom: 9px;
  width: 29px;
  height: 29px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 253, 248, .9);
  box-shadow: 0 3px 8px rgba(50, 38, 24, .15);
  font-size: 16px;
}
.tq-world-flag-figure figcaption {
  color: var(--tq-muted);
  font-size: 10px;
  font-weight: 700;
}
.tq-world-country {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 12px;
  padding: 12px;
  border-radius: 16px;
  background: linear-gradient(145deg, #fff8ee, #f8fcfa);
  border: 1px solid rgba(74, 58, 38, .09);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.9);
}
.tq-world-country-flag {
  flex: 0 0 auto;
  width: 82px;
  height: 55px;
  overflow: hidden;
  border-radius: 8px;
  background: #fff;
  border: 2px solid #fff;
  box-shadow: 0 5px 12px -7px rgba(50,38,24,.45);
}
.tq-world-country-flag img { width: 100%; height: 100%; object-fit: cover; }
.tq-world-country-copy { min-width: 0; }
.tq-world-country-kicker { display: block; color: var(--tq-coral-deep, #c34e36); font-size: 8px; font-weight: 900; letter-spacing: .8px; }
.tq-world-country-name { display: block; margin-top: 2px; color: var(--tq-ink, #3b2c20); font-family: var(--tq-font-display, inherit); font-size: 24px; font-weight: 800; line-height: 1.2; }
.tq-world-country-en { display: block; margin-top: 1px; color: var(--tq-muted, #8b7a68); font-size: 9px; font-weight: 700; }
.tq-world-record .tq-record-kicker { color: #4c8fbe; }
.tq-world-record .tq-record-icon { background: linear-gradient(145deg,#e2f3ff,#f3fbff); }

@media (max-width: 760px) {
  .tq-world-flag-frame { width: min(100%, 250px); border-radius: 13px; }
  .tq-world-country { padding: 9px; gap: 9px; }
  .tq-world-country-flag { width: 62px; height: 42px; }
  .tq-world-country-name { font-size: 20px; }
}
