:root {
  color-scheme: light;
  --paper: #ffffff;
  --surface: #ffffff;
  --ink: #251d2d;
  --muted: #716979;
  --line: #d9d1e5;
  --teal: #8b5cf6;
  --teal-dark: #6d28d9;
  --coral: #b87900;
  --yellow: #ffd400;
  --purple-soft: #f5f0ff;
  --gold-soft: #fff9d9;
  --blue: #2878d0;
  --green: #168b61;
  --red: #e5484d;
  --shadow: 0 14px 36px rgba(109, 40, 217, 0.11);
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC",
    "Noto Sans SC", sans-serif;
  font-synthesis: weight;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
}

body {
  min-width: 320px;
  min-height: 100dvh;
  color: var(--ink);
  background: var(--paper);
  -webkit-tap-highlight-color: transparent;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid rgba(139, 92, 246, 0.26);
  outline-offset: 2px;
}

#app {
  min-height: 100dvh;
}

.shell {
  width: min(100%, 520px);
  min-height: 100dvh;
  margin: 0 auto;
  padding:
    max(20px, env(safe-area-inset-top))
    max(20px, env(safe-area-inset-right))
    max(24px, env(safe-area-inset-bottom))
    max(20px, env(safe-area-inset-left));
  display: flex;
  flex-direction: column;
}

.entry-shell {
  justify-content: flex-start;
  gap: 22px;
  padding-top: max(42px, env(safe-area-inset-top));
  padding-bottom: max(48px, env(safe-area-inset-bottom));
}

.entry-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(150px, 42%);
  align-items: center;
  gap: 24px;
  padding: 18px 0 10px;
}

.entry-hero-copy {
  min-width: 0;
}

.brand-mark {
  grid-area: brand;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  width: fit-content;
  margin-bottom: 14px;
  color: var(--coral);
  font-size: 13px;
  font-weight: 800;
}

.mark-grid {
  width: 28px;
  height: 35px;
  flex: 0 0 28px;
  background: url("/assets/focus-mascot.webp?v=0.6.0-img1") center / contain
    no-repeat;
  filter: drop-shadow(0 4px 8px rgba(83, 38, 122, 0.2));
}

.mark-grid i {
  display: none;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 12px;
  font-size: 40px;
  line-height: 1.08;
  letter-spacing: 0;
}

.product-title {
  grid-area: product;
  max-width: 460px;
  margin-bottom: 0;
  color: var(--teal-dark);
  font-size: 20px;
  font-weight: 750;
  line-height: 1.45;
  text-wrap: balance;
}

.family-portrait {
  grid-area: portrait;
  width: 100%;
  height: 174px;
  overflow: hidden;
  border: 2px solid rgba(255, 212, 0, 0.7);
  border-radius: 8px;
  background-image: url("/assets/family-stroop.webp?v=0.6.0-img1");
  background-position: center;
  background-size: cover;
  box-shadow: 0 10px 24px rgba(109, 40, 217, 0.14);
  animation: family-float 5.6s ease-in-out infinite;
  transform-origin: center;
}

.stroop-cover-visual {
  min-width: 0;
  width: 100%;
  aspect-ratio: 1.16;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 20px minmax(0, 1fr);
  align-items: center;
  gap: 4px;
  overflow: hidden;
  border: 2px solid rgba(255, 212, 0, 0.78);
  border-radius: 8px;
  background: #faf8ff;
  box-shadow: 0 10px 24px rgba(109, 40, 217, 0.14);
  animation: family-float 5.6s ease-in-out infinite;
}

.stroop-cover-visual > div {
  min-width: 0;
  display: grid;
  justify-items: center;
  gap: 8px;
}

.stroop-cover-visual small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.stroop-cover-visual strong {
  font-size: 34px;
  font-weight: 900;
}

.stroop-cover-visual > span {
  color: var(--yellow);
  font-size: 18px;
  font-weight: 900;
}

.cover-word-meaning {
  color: var(--blue);
}

.cover-word-ink {
  color: var(--red);
}

.game-name {
  position: relative;
  width: fit-content;
  margin: 0 0 16px;
  font-size: 48px;
  font-weight: 900;
  line-height: 1.08;
  animation: title-enter 520ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.stroop-play-mode {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.fixed-round-note {
  display: grid;
  gap: 5px;
  padding: 14px 16px;
  border-left: 4px solid var(--yellow);
  background: var(--gold-soft);
}

.fixed-round-note strong {
  color: var(--teal-dark);
  font-size: 15px;
}

.fixed-round-note span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.duel-game-shell {
  width: min(100%, 720px);
}

.duel-score-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(78px, 1fr));
  gap: 1px;
  margin: 18px 0 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--line);
}

.duel-score-strip > div {
  min-width: 0;
  display: grid;
  justify-items: center;
  gap: 3px;
  padding: 10px 6px;
  background: #fff;
}

.duel-score-strip > div.round-winner {
  background: var(--gold-soft);
}

.duel-score-strip span {
  max-width: 100%;
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.duel-score-strip strong {
  color: var(--teal-dark);
  font-size: 20px;
}

.duel-progress-note {
  min-height: 44px;
  display: grid;
  place-items: center;
  margin-bottom: 12px;
  border-left: 4px solid var(--yellow);
  color: var(--ink);
  background: var(--gold-soft);
  font-size: 13px;
  font-weight: 800;
  text-align: center;
}

.duel-progress-note.second-step {
  border-left-color: var(--teal);
  background: var(--purple-soft);
}

.duel-stage {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.duel-stage.paused {
  opacity: 0.38;
}

.duel-stimulus {
  min-width: 0;
  min-height: 220px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  place-items: center;
  padding: 18px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.duel-stimulus.meaning {
  border-top: 5px solid var(--yellow);
}

.duel-stimulus.ink {
  border-top: 5px solid var(--teal);
}

.duel-stimulus > span {
  color: var(--ink);
  font-size: 13px;
  font-weight: 850;
}

.duel-stimulus strong {
  font-size: 82px;
  line-height: 1;
}

.duel-stimulus small {
  color: var(--muted);
  font-size: 11px;
}

.duel-color-options {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
  margin-top: 12px;
}

.duel-color-button {
  min-width: 0;
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: #fff;
  font-weight: 850;
}

.duel-color-button i {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  border-radius: 50%;
}

.duel-color-button:active {
  transform: scale(0.96);
}

.duel-color-button:disabled {
  cursor: default;
  opacity: 0.48;
}

.duel-feedback {
  min-height: 30px;
  padding-top: 8px;
  color: var(--red);
  font-size: 12px;
  font-weight: 750;
  text-align: center;
}

.map-game-shell {
  width: min(100%, 720px);
}

.map-headline {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 72px;
}

.map-headline > div:not(.timer) {
  display: grid;
  gap: 3px;
}

.map-headline > div:last-child {
  justify-items: end;
}

.map-headline span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
}

.map-headline strong {
  color: var(--teal-dark);
  font-size: 20px;
  font-variant-numeric: tabular-nums;
}

.map-headline strong b {
  font: inherit;
}

.map-instruction {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 14px;
  border-top: 2px solid var(--yellow);
  border-bottom: 2px solid var(--yellow);
  background: var(--gold-soft);
  font-size: 14px;
  font-weight: 850;
}

.map-instruction.ink-mode {
  border-color: var(--teal);
  background: var(--purple-soft);
}

.map-instruction strong {
  min-width: 42px;
  font-size: 30px;
  font-weight: 900;
  line-height: 1;
  text-align: center;
  text-shadow: 0 1px 0 rgba(37, 29, 45, 0.08);
}

.map-score-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 4px;
}

.map-score-item {
  min-width: 0;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  align-items: center;
  gap: 4px;
  padding: 7px 6px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface);
  transition:
    order 160ms ease,
    border-color 160ms ease,
    background 160ms ease;
}

.map-score-item.leader {
  border-color: var(--yellow);
  background: var(--gold-soft);
}

.map-rank {
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--teal-dark);
  font-size: 9px;
  font-style: normal;
  font-weight: 850;
}

.map-score-item span {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.map-score-item strong {
  color: var(--teal-dark);
  font-size: 16px;
  font-variant-numeric: tabular-nums;
}

.map-board-wrap {
  position: relative;
}

.map-board-wrap.paused .map-board {
  opacity: 0.3;
}

.map-board-wrap.paused .map-cell.flashing {
  animation-play-state: paused;
}

.map-pause-banner {
  position: absolute;
  z-index: 2;
  inset: 50% auto auto 50%;
  min-width: 150px;
  padding: 12px 18px;
  border: 2px solid var(--yellow);
  border-radius: 6px;
  color: var(--teal-dark);
  background: var(--surface);
  box-shadow: var(--shadow);
  font-size: 15px;
  font-weight: 850;
  text-align: center;
  transform: translate(-50%, -50%);
}

.map-board {
  width: min(100%, 560px);
  aspect-ratio: 1;
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  grid-template-rows: repeat(10, minmax(0, 1fr));
  gap: 3px;
  margin: 0 auto;
  padding: 5px;
  border: 1px solid #d9cdf5;
  border-radius: 8px;
  background: #eee8f8;
}

.map-cell {
  position: relative;
  min-width: 0;
  min-height: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 0;
  border: 1px solid #ddd5e7;
  border-radius: 4px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(37, 29, 45, 0.06);
  transition:
    transform 110ms cubic-bezier(0.34, 1.56, 0.64, 1),
    border-color 110ms ease,
    background 110ms ease;
}

.map-cell.flashing:not(.claimed) {
  animation: map-cell-flicker 1.08s steps(2, end) infinite;
}

.map-cell.flashing.flicker-1 {
  animation-duration: 0.92s;
  animation-delay: -0.31s;
}

.map-cell.flashing.flicker-2 {
  animation-duration: 1.24s;
  animation-delay: -0.67s;
}

.map-cell.flashing.flicker-3 {
  animation-duration: 1.42s;
  animation-delay: -0.94s;
}

.map-cell:not(:disabled):hover {
  z-index: 1;
  border-color: var(--teal);
  transform: scale(1.07);
}

.map-cell:not(:disabled):active,
.map-cell.pending {
  transform: scale(0.9);
}

.map-cell-word {
  font-size: 20px;
  font-weight: 900;
  line-height: 1;
}

.map-cell-owner {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 13px;
  height: 13px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: currentColor;
  background: rgba(255, 255, 255, 0.9);
  font-size: 8px;
  font-weight: 900;
  line-height: 1;
}

.map-cell-owner:empty {
  display: none;
}

.map-cell.claimed {
  cursor: default;
  border-color: transparent;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.42);
  animation: map-claim-pop 260ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

.solo-coach-mode .map-cell.claimed {
  animation: none;
}

.map-cell.claimed .map-cell-word {
  color: #fff !important;
}

.map-cell.claimed-father {
  color: #6d28d9;
  background: #7c3aed;
}

.map-cell.claimed-mother {
  color: #be123c;
  background: #f43f5e;
}

.map-cell.claimed-childA {
  color: #1d4ed8;
  background: #3b82f6;
}

.map-cell.claimed-childB {
  color: #047857;
  background: #10b981;
}

.map-cell.claimed-childC {
  color: #6b4f00;
  background: #ffd400;
}

.map-cell.claimed-childC .map-cell-word {
  color: #382b00 !important;
}

.map-cell.wrong,
.map-cell.flashing.wrong {
  border-color: var(--red);
  background: #fff1f2;
  animation: shake 240ms ease-in-out;
}

@keyframes map-cell-flicker {
  0%,
  38%,
  72%,
  100% {
    opacity: 1;
    background: #fff;
    box-shadow: 0 1px 2px rgba(37, 29, 45, 0.06);
  }

  46%,
  64% {
    opacity: 0.28;
    background: #fff7c7;
    box-shadow: inset 0 0 0 2px rgba(255, 212, 0, 0.42);
  }
}

@keyframes map-claim-pop {
  0% {
    transform: scale(0.82);
  }
  70% {
    transform: scale(1.08);
  }
  100% {
    transform: scale(1);
  }
}

.map-feedback {
  min-height: 24px;
  padding-top: 2px;
}

.map-result-winner {
  color: var(--teal-dark);
  background: var(--gold-soft);
}

.rainbow-letter {
  display: inline-block;
  animation: rainbow-wave 2.4s ease-in-out infinite;
}

.rainbow-letter:nth-child(1) {
  color: #ef4444;
}

.rainbow-letter:nth-child(2) {
  color: var(--yellow);
}

.rainbow-letter:nth-child(3) {
  color: #22b864;
}

.rainbow-letter:nth-child(4) {
  color: #3385e8;
}

.rainbow-letter:nth-child(5) {
  color: #a855f7;
}

.rainbow-letter:nth-child(2) {
  animation-delay: -1.92s;
}

.rainbow-letter:nth-child(3) {
  animation-delay: -1.44s;
}

.rainbow-letter:nth-child(4) {
  animation-delay: -0.96s;
}

.rainbow-letter:nth-child(5) {
  animation-delay: -0.48s;
}

.game-name::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -7px;
  left: 0;
  height: 3px;
  background: var(--yellow);
  transform-origin: left;
  animation: line-sweep 720ms 120ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.lead {
  max-width: 440px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.guide-link {
  width: 100%;
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 2px;
  border: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  background: transparent;
  text-align: left;
  transition:
    color 160ms ease,
    padding 160ms ease;
}

.entry-info-links {
  border-top: 1px solid var(--line);
}

.entry-info-links .guide-link {
  border-top: 0;
}

.guide-link:hover {
  padding-right: 8px;
  padding-left: 8px;
  color: var(--teal-dark);
}

.guide-link span:first-child,
.guide-link strong,
.guide-link small {
  display: block;
}

.guide-link strong {
  margin-bottom: 4px;
  font-size: 15px;
}

.guide-link small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.guide-link-arrow {
  flex: 0 0 auto;
  color: var(--yellow);
  font-size: 24px;
  font-weight: 800;
  transition: transform 160ms ease;
}

.guide-link:hover .guide-link-arrow {
  transform: translateX(4px);
}

@keyframes title-enter {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes line-sweep {
  from {
    transform: scaleX(0);
  }
  to {
    transform: scaleX(1);
  }
}

@keyframes family-float {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-5px) scale(1.018);
  }
}

@keyframes rainbow-wave {
  0%,
  52%,
  100% {
    transform: translateY(0);
  }
  26% {
    transform: translateY(-7px);
  }
}

.game-guide {
  padding: 26px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.game-guide + .game-guide {
  border-top: 0;
}

.guide-shell {
  padding-top: max(20px, env(safe-area-inset-top));
  padding-bottom: max(42px, env(safe-area-inset-bottom));
}

.guide-topbar {
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.entry-shell > .guide-topbar::after,
.guide-shell > .guide-topbar::after {
  width: 23px;
  height: 29px;
  flex: 0 0 23px;
  margin-left: auto;
  background: url("/assets/focus-mascot.webp?v=0.6.0-img1") center / contain
    no-repeat;
  filter: drop-shadow(0 3px 6px rgba(83, 38, 122, 0.16));
  opacity: 0.76;
  content: "";
  pointer-events: none;
}

.back-button {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: var(--teal-dark);
  background: transparent;
  font-size: 24px;
  transition:
    background 160ms ease,
    transform 160ms ease;
}

.back-button:hover {
  background: var(--purple-soft);
  transform: translateX(-2px);
}

.guide-intro {
  padding: 40px 0 30px;
}

.guide-intro .brand-mark {
  margin-bottom: 16px;
}

.guide-intro h1 {
  max-width: 400px;
  margin-bottom: 16px;
  color: var(--ink);
  font-size: 36px;
  line-height: 1.2;
}

.guide-intro p {
  max-width: 420px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.guide-overview {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 8px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.guide-overview > div {
  min-width: 0;
  padding: 17px 16px 18px;
  border-right: 1px solid var(--line);
}

.guide-overview > div:first-child {
  padding-left: 0;
}

.guide-overview > div:last-child {
  padding-right: 0;
  border-right: 0;
}

.guide-overview span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
}

.guide-overview strong {
  display: block;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.5;
}

.guide-overview > div:nth-child(2) strong {
  color: var(--teal-dark);
}

.guide-overview > div:nth-child(3) strong {
  text-decoration: underline;
  text-decoration-color: var(--yellow);
  text-decoration-thickness: 3px;
  text-underline-offset: 4px;
}

.guide-return {
  margin-top: 28px;
}

.principle-intro {
  padding-bottom: 24px;
}

.principle-path {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 18px minmax(0, 1fr) 18px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  padding: 16px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.principle-path span {
  min-width: 0;
  color: var(--teal-dark);
  font-size: 12px;
  font-weight: 850;
  line-height: 1.45;
  text-align: center;
}

.principle-path i {
  color: var(--yellow-dark);
  font-size: 16px;
  font-style: normal;
  font-weight: 900;
  text-align: center;
}

.principle-list {
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
  list-style: none;
}

.principle-list li {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 14px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}

.principle-list li > span {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 2px solid var(--yellow);
  border-radius: 50%;
  color: var(--teal-dark);
  background: var(--gold-soft);
  font-size: 17px;
  font-weight: 900;
}

.principle-list strong {
  display: block;
  margin: 1px 0 5px;
  color: var(--teal-dark);
  font-size: 17px;
}

.principle-list p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.principle-note {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
}

.principle-practice {
  margin-top: 18px;
  padding: 15px 16px;
  border-left: 4px solid var(--teal);
  background: var(--purple-soft);
}

.principle-practice strong {
  display: block;
  margin-bottom: 5px;
  color: var(--teal-dark);
  font-size: 14px;
}

.principle-practice p {
  margin: 0;
  color: var(--ink);
  font-size: 12px;
  line-height: 1.65;
}

/* 科学原理区块 */
.principle-science {
  margin-top: 20px;
  padding: 16px 18px;
  background: linear-gradient(135deg, rgba(98, 53, 138, 0.04), rgba(213, 168, 0, 0.03));
  border-radius: 14px;
  border: 1px solid rgba(98, 53, 138, 0.12);
}

.principle-science h2 {
  font-size: 15px;
  font-weight: 700;
  color: var(--purple, #62358a);
  margin: 4px 0 8px;
  line-height: 1.4;
}

.principle-science-lede {
  font-size: 12.5px;
  line-height: 1.75;
  color: var(--ink);
  margin: 0;
}

.principle-details {
  margin-top: 12px;
  border: none;
}

.principle-details summary {
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  color: var(--purple, #62358a);
  letter-spacing: 0.02em;
  list-style: none;
  user-select: none;
}

.principle-details summary::-webkit-details-marker {
  display: none;
}

.principle-details summary::before {
  content: "▸ ";
  color: var(--purple, #62358a);
}

.principle-details[open] summary::before {
  content: "▾ ";
}

.principle-details-body {
  margin-top: 10px;
  padding: 12px 14px;
  background: rgba(0, 0, 0, 0.02);
  border-radius: 10px;
}

.principle-details-body p {
  font-size: 11.5px;
  line-height: 1.8;
  color: #555;
  margin: 0 0 8px;
}

.principle-details-body p:last-child {
  margin-bottom: 0;
}

/* 家长脚手架话术区块（已移除） */

.guide-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

.guide-heading .eyebrow {
  margin-bottom: 5px;
}

.guide-heading h2 {
  margin-bottom: 0;
  font-size: 25px;
  line-height: 1.2;
  letter-spacing: 0;
}

.guide-badge {
  flex: 0 0 auto;
  padding: 6px 9px;
  border: 1px solid #d9cdf5;
  border-radius: 5px;
  color: var(--teal-dark);
  background: var(--purple-soft);
  font-size: 12px;
  font-weight: 750;
}

.guide-steps {
  display: grid;
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.guide-steps li {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
}

.guide-steps .step-number {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  line-height: 1;
  border-radius: 50%;
  color: #fff;
  background: var(--teal);
  box-shadow: 0 3px 10px rgba(139, 92, 246, 0.22);
  font-size: 12px;
  font-weight: 800;
}

.guide-steps strong,
.guide-steps span {
  display: block;
}

.guide-steps strong {
  margin-bottom: 4px;
  font-size: 14px;
}

.guide-steps div > span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.rule-compare {
  display: grid;
  gap: 12px;
  margin-top: 22px;
}

.rule-example {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  transition:
    border-color 160ms ease,
    transform 160ms ease,
    box-shadow 160ms ease;
}

.rule-example:hover {
  border-color: #d9cdf5;
  box-shadow: 0 10px 24px rgba(109, 40, 217, 0.08);
  transform: translateY(-2px);
}

.rule-letter {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  border-radius: 6px;
  background: var(--surface);
  font-size: 34px;
  font-weight: 900;
}

.ink-rule {
  color: var(--red);
}

.word-rule {
  color: var(--red);
  text-decoration: underline;
  text-decoration-color: var(--blue);
  text-underline-offset: 6px;
}

.rule-example strong {
  display: block;
  margin-bottom: 5px;
  color: var(--ink);
  font-size: 15px;
}

.rule-example mark {
  display: inline-block;
  padding: 2px 5px 3px;
  border-bottom: 3px solid var(--yellow);
  color: var(--teal-dark);
  background: var(--gold-soft);
  font-size: 18px;
  font-weight: 900;
  line-height: 1.15;
}

.rule-example p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.guide-notes {
  margin-top: 18px;
  padding: 14px 15px;
  border-left: 4px solid var(--yellow);
  background: var(--gold-soft);
}

.guide-notes p {
  margin-bottom: 8px;
  font-size: 12px;
  line-height: 1.6;
}

.guide-notes p:last-child {
  margin-bottom: 0;
}

.guide-scoreline {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 18px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.guide-scoreline > div {
  min-width: 0;
  padding: 13px 12px;
  border-right: 1px solid var(--line);
}

.guide-scoreline > div:first-child {
  padding-left: 0;
}

.guide-scoreline > div:last-child {
  padding-right: 0;
  border-right: 0;
}

.guide-scoreline span,
.guide-scoreline strong {
  display: block;
}

.guide-scoreline span {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.guide-scoreline strong {
  color: var(--ink);
  font-size: 12px;
  line-height: 1.5;
}

.entry-panel {
  position: relative;
  overflow: hidden;
  padding: 22px;
  border: 1px solid #e2d9f3;
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.entry-panel::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 3px;
  background: var(--yellow);
}

.member-select {
  width: 100%;
  height: 54px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  background: #fdfcff;
  font-weight: 700;
}

.entry-actions {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.entry-actions .primary-button,
.entry-actions .secondary-button,
.result-actions .primary-button,
.result-actions .secondary-button,
.tracking-lobby-actions .primary-button,
.tracking-lobby-actions .secondary-button {
  margin-top: 0;
}

.eyebrow {
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.role-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.role-button {
  min-width: 0;
  min-height: 112px;
  padding: 18px 14px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--ink);
  background: var(--surface);
  text-align: left;
  transition:
    transform 120ms ease,
    border-color 120ms ease,
    background 120ms ease;
}

.role-button:active {
  transform: scale(0.98);
}

.role-button:hover {
  border-color: var(--teal);
  background: var(--purple-soft);
}

.role-symbol {
  display: block;
  margin-bottom: 12px;
  color: var(--teal);
  font-size: 26px;
  font-weight: 800;
}

.role-title {
  display: block;
  margin-bottom: 5px;
  font-size: 18px;
  font-weight: 750;
}

.role-detail {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.join-form {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.join-form[hidden] {
  display: none;
}

.input-label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}

.code-input {
  width: 100%;
  height: 60px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  background: #fdfcff;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: 8px;
  text-align: center;
}

.primary-button,
.secondary-button,
.text-button {
  min-height: 50px;
  border-radius: 6px;
  font-weight: 750;
}

.primary-button {
  width: 100%;
  margin-top: 12px;
  padding: 0 20px;
  border: 1px solid var(--teal);
  color: #fff;
  background: var(--teal);
  box-shadow: 0 8px 20px rgba(139, 92, 246, 0.22);
  transition:
    background 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.primary-button:hover {
  background: var(--teal-dark);
  box-shadow: 0 11px 24px rgba(109, 40, 217, 0.25);
  transform: translateY(-1px);
}

.primary-button:disabled {
  cursor: not-allowed;
  border-color: #a8b3b0;
  background: #a8b3b0;
}

.secondary-button {
  width: 100%;
  padding: 0 20px;
  border: 1px solid var(--line);
  color: var(--ink);
  background: var(--surface);
  transition:
    border-color 160ms ease,
    color 160ms ease,
    transform 160ms ease;
}

.secondary-button:hover {
  border-color: var(--yellow);
  color: var(--teal-dark);
  transform: translateY(-1px);
}

.text-button {
  min-height: 40px;
  padding: 0 10px;
  border: 0;
  color: var(--muted);
  background: transparent;
}

.topbar {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.topbar-title {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  font-size: 14px;
  font-weight: 750;
}

.role-chip {
  padding: 5px 8px;
  border-radius: 5px;
  color: var(--teal-dark);
  background: var(--purple-soft);
  font-size: 12px;
}

.connection-dot {
  width: 9px;
  height: 9px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #9da8a5;
}

.connection-dot.online {
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(22, 139, 97, 0.12);
  animation: online-pulse 1.8s ease-in-out infinite;
}

@keyframes online-pulse {
  50% {
    box-shadow: 0 0 0 7px rgba(22, 139, 97, 0.05);
  }
}

.lobby {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 28px;
  padding: 24px 0 48px;
}

.room-block {
  text-align: center;
}

.room-label {
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 13px;
}

.room-code {
  margin-bottom: 8px;
  font-size: 62px;
  font-weight: 850;
  line-height: 1;
  letter-spacing: 7px;
  font-variant-numeric: tabular-nums;
  color: var(--teal-dark);
  text-shadow: 0 3px 0 rgba(255, 212, 0, 0.24);
}

.room-caption {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 14px;
}

.participant-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.participant-list-multi {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.participant {
  position: relative;
  min-height: 78px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
}

.participant-remove {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: var(--muted);
  background: transparent;
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
}

.participant-remove:hover {
  color: var(--red);
  background: #fff1f1;
}

.participant-identity {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.participant-order {
  width: 22px;
  height: 22px;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--teal);
  font-size: 11px;
  font-weight: 800;
}

.participant-name {
  display: block;
  font-weight: 750;
}

.participant-status {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
}

.setup {
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.setup-group {
  margin-bottom: 18px;
}

.setup-label {
  margin-bottom: 10px;
  font-size: 13px;
  font-weight: 700;
}

.setup-hint {
  margin: 7px 2px 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.member-arrangement {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
}

.member-button {
  min-width: 0;
  min-height: 68px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 3px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
  background: var(--surface);
  font-size: 11px;
  font-weight: 700;
  transition:
    border-color 140ms ease,
    background 140ms ease,
    transform 140ms ease;
}

.member-button:hover {
  border-color: #d9cdf5;
  transform: translateY(-1px);
}

.member-button.selected {
  border-color: var(--teal);
  color: var(--teal-dark);
  background: var(--purple-soft);
}

.member-button.locked {
  cursor: default;
}

.member-order {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--muted);
  background: #f0edf2;
  font-size: 12px;
  font-weight: 850;
}

.member-button.selected .member-order {
  color: #fff;
  background: var(--teal);
}

.role-warning {
  padding: 13px 15px;
  border-left: 4px solid var(--yellow);
  color: #765600;
  background: var(--gold-soft);
  font-size: 12px;
  line-height: 1.55;
}

.host-selection-hint {
  width: 100%;
  padding: 16px 0;
  border-top: 1px solid rgba(98, 53, 138, 0.16);
  border-bottom: 1px solid rgba(98, 53, 138, 0.16);
}

.host-selection-hint > header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  color: #62358a;
  font-size: 13px;
  font-weight: 800;
}

.host-selection-hint > header i {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #ffd400;
  box-shadow: 0 0 0 5px rgba(255, 212, 0, 0.16);
  animation: host-selection-pulse 1.6s ease-in-out infinite;
}

.host-selection-hint > header small {
  margin-left: auto;
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
}

.host-selection-values {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(112px, 1fr));
  gap: 8px 16px;
}

.host-selection-values > span {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.host-selection-values small {
  color: var(--muted);
  font-size: 10px;
}

.host-selection-values strong {
  overflow-wrap: anywhere;
  color: #26212b;
  font-size: 13px;
  line-height: 1.45;
}

.shared-game-countdown {
  position: fixed;
  z-index: 10000;
  inset: 0;
  display: grid;
  grid-template-rows: auto auto auto;
  align-content: center;
  justify-items: center;
  gap: 6px;
  padding: 24px;
  color: #2d173f;
  background: rgba(255, 255, 255, 0.9);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
  animation: shared-countdown-enter 180ms ease-out both;
}

.shared-game-countdown span,
.shared-game-countdown small,
.shared-game-countdown strong {
  position: relative;
  z-index: 1;
}

.shared-game-countdown span {
  margin-bottom: 2px;
  color: #62358a;
  font-size: 14px;
  font-weight: 800;
}

.shared-game-countdown strong {
  min-width: 168px;
  height: 166px;
  display: grid;
  place-items: center;
  padding: 0 20px 8px;
  border: 0;
  border-radius: 0;
  color: #62358a;
  background: transparent;
  text-shadow:
    0 7px 0 rgba(255, 212, 0, 0.24),
    0 18px 36px rgba(98, 53, 138, 0.16);
  font-size: 126px;
  font-weight: 900;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.shared-game-countdown strong::before {
  position: absolute;
  inset: 0;
  z-index: -1;
  display: grid;
  place-items: center;
  color: rgba(98, 53, 138, 0.22);
  content: attr(data-previous);
  font-size: 126px;
  line-height: 1;
  opacity: 0;
  pointer-events: none;
}

.shared-game-countdown strong::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 4px;
  background: #ffd400;
  content: "";
  transform: scaleX(0.28);
  transform-origin: center;
}

.shared-game-countdown strong.tick {
  animation: shared-countdown-pop 720ms cubic-bezier(0.22, 1, 0.36, 1);
}

.shared-game-countdown strong.tick::before {
  animation: shared-countdown-echo 680ms ease-out both;
}

.shared-game-countdown strong.tick::after {
  animation: shared-countdown-sweep 760ms cubic-bezier(0.22, 1, 0.36, 1)
    both;
}

.shared-game-countdown small {
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

@keyframes host-selection-pulse {
  50% {
    box-shadow: 0 0 0 9px rgba(255, 212, 0, 0.04);
    transform: scale(0.86);
  }
}

@keyframes shared-countdown-pop {
  0% {
    opacity: 0;
    transform: translateY(10px) scale(0.92);
  }

  46% {
    opacity: 1;
    transform: translateY(-2px) scale(1.02);
  }

  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes shared-countdown-echo {
  0% {
    opacity: 0.24;
    transform: translateY(-2px) scale(1);
  }

  100% {
    opacity: 0;
    transform: translateY(-24px) scale(1.04);
  }
}

@keyframes shared-countdown-sweep {
  0% {
    opacity: 0.36;
    transform: scaleX(0.18);
  }

  52% {
    opacity: 1;
    transform: scaleX(1);
  }

  100% {
    opacity: 0.72;
    transform: scaleX(0.64);
  }
}

@keyframes shared-countdown-enter {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.segments {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #f1edf4;
}

.duration-segments {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.four-segments {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.segment {
  height: 42px;
  border: 0;
  border-radius: 5px;
  color: var(--muted);
  background: transparent;
  font-size: 14px;
  font-weight: 700;
  transition:
    color 140ms ease,
    background 140ms ease,
    box-shadow 140ms ease,
    transform 140ms ease;
}

.segment:hover {
  color: var(--teal-dark);
}

.segment.selected {
  color: var(--teal-dark);
  background: var(--surface);
  box-shadow:
    0 3px 9px rgba(109, 40, 217, 0.12),
    inset 0 -2px 0 var(--yellow);
}

.switch-settings {
  display: grid;
  gap: 8px;
  margin-bottom: 6px;
}

.switch-setting {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  cursor: pointer;
}

.switch-setting span,
.switch-setting strong,
.switch-setting small {
  display: block;
}

.switch-setting span {
  min-width: 0;
}

.switch-setting strong {
  margin-bottom: 4px;
  font-size: 13px;
}

.switch-setting strong em {
  display: inline-block;
  margin-left: 5px;
  padding: 2px 5px;
  border-radius: 4px;
  color: #765600;
  background: var(--yellow);
  font-size: 9px;
  font-style: normal;
  line-height: 1.2;
  vertical-align: 1px;
}

.switch-setting small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.switch-setting input {
  width: 46px;
  height: 26px;
  flex: 0 0 auto;
  margin: 0;
  appearance: none;
  border: 1px solid #b8adbf;
  border-radius: 13px;
  background: #ded8e2;
  cursor: pointer;
  transition:
    border-color 120ms ease,
    background 120ms ease;
}

.switch-setting input::before {
  content: "";
  display: block;
  width: 20px;
  height: 20px;
  margin: 2px;
  border-radius: 50%;
  background: var(--surface);
  box-shadow: 0 1px 4px rgba(109, 40, 217, 0.28);
  transition: transform 120ms ease;
}

.switch-setting input:checked {
  border-color: var(--teal);
  background: var(--teal);
}

.switch-setting.selected {
  border-color: #d9cdf5;
  background: var(--purple-soft);
}

.free-switch-setting.selected {
  border-color: var(--yellow);
  background: var(--gold-soft);
}

.switch-setting input:checked::before {
  transform: translateX(20px);
}

.waiting-message {
  min-height: 80px;
  padding: 18px;
  border: 1px dashed #c6b5ee;
  border-radius: 7px;
  color: var(--muted);
  background: var(--purple-soft);
  text-align: center;
  line-height: 1.55;
}

.game-shell {
  gap: 14px;
}

.game-toolbar {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

.game-room-label,
.host-control-note {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.game-controls {
  display: flex;
  align-items: center;
  gap: 6px;
}

.game-control-button {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 10px;
  border: 1px solid #d9cdf5;
  border-radius: 6px;
  color: var(--teal-dark);
  background: var(--purple-soft);
  font-size: 12px;
  font-weight: 750;
}

.game-control-button span {
  min-width: 12px;
  font-size: 13px;
  text-align: center;
}

.game-control-button:hover {
  border-color: var(--teal);
  background: var(--surface);
}

.game-control-button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.return-room-button {
  color: var(--muted);
  background: var(--surface);
}

.game-header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 70px;
  border-bottom: 1px solid var(--line);
}

.metric {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.metric:last-child {
  text-align: right;
}

.metric-label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.metric-value {
  font-size: 22px;
  font-weight: 850;
  font-variant-numeric: tabular-nums;
}

.timer {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  border: 5px solid var(--teal);
  border-radius: 50%;
  background: var(--surface);
  box-shadow:
    0 0 0 5px var(--purple-soft),
    0 8px 22px rgba(109, 40, 217, 0.13);
  font-size: 18px;
  font-weight: 850;
  font-variant-numeric: tabular-nums;
  animation: timer-float 2.4s ease-in-out infinite;
}

@keyframes timer-float {
  50% {
    box-shadow:
      0 0 0 7px rgba(255, 212, 0, 0.16),
      0 10px 24px rgba(109, 40, 217, 0.17);
  }
}

.timer.urgent {
  border-color: var(--coral);
  color: var(--coral);
}

.rule-status {
  min-height: 60px;
  display: grid;
  grid-template-areas: "label rule hint";
  grid-template-columns: max-content max-content max-content;
  align-content: center;
  align-items: baseline;
  justify-content: center;
  column-gap: 10px;
  padding: 9px 14px;
  border: 2px solid #d9cdf5;
  border-left: 6px solid var(--teal);
  border-radius: 6px;
  background: var(--surface);
  box-shadow: 0 7px 20px rgba(109, 40, 217, 0.09);
}

.rule-status.word-mode {
  border-color: var(--yellow);
  border-left-color: var(--teal-dark);
}

.rule-status.compact {
  grid-template-areas: "label rule";
  grid-template-columns: max-content max-content;
  column-gap: 8px;
}

.rule-status-label {
  grid-area: label;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

.rule-status strong {
  grid-area: rule;
  color: var(--teal-dark);
  font-size: 22px;
  font-weight: 900;
  line-height: 1.1;
  text-decoration: underline;
  text-decoration-color: var(--yellow);
  text-decoration-thickness: 4px;
  text-underline-offset: 5px;
  white-space: nowrap;
}

.rule-status-hint {
  grid-area: hint;
  color: var(--coral);
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  text-align: left;
  white-space: nowrap;
}

.relay-route {
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.relay-route strong {
  color: var(--teal-dark);
}

.turn-banner {
  min-height: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 2px solid var(--yellow);
  color: var(--teal-dark);
  font-size: 14px;
  font-weight: 700;
}

.speaker-cue {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.observer-view {
  flex: 1;
  min-height: 410px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 24px;
  border: 1px solid #e2d9f3;
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  text-align: center;
}

.observer-kicker {
  margin-bottom: 16px;
  color: var(--teal-dark);
  font-size: 13px;
  font-weight: 800;
}

.observer-view h1 {
  margin-bottom: 14px;
  font-size: 38px;
}

.observer-view p {
  max-width: 290px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

.pause-view {
  min-height: 390px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 28px 18px;
  text-align: center;
}

.pause-symbol {
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  margin-bottom: 22px;
  border: 5px solid var(--teal);
  border-radius: 50%;
  color: var(--teal-dark);
  background: var(--purple-soft);
  font-size: 28px;
  font-weight: 900;
}

.pause-view h1 {
  margin: 8px 0 12px;
  color: var(--teal-dark);
  font-size: 44px;
  font-variant-numeric: tabular-nums;
}

.pause-view p {
  max-width: 330px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.transition-view {
  flex: 1;
  min-height: 410px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 24px;
  border: 1px solid #e2d9f3;
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  text-align: center;
}

.transition-kicker {
  margin-bottom: 18px;
  color: var(--coral);
  font-size: 13px;
  font-weight: 800;
}

.transition-view h1 {
  margin-bottom: 18px;
  line-height: 1.2;
}

.transition-view h1 span,
.transition-view h1 strong {
  display: block;
}

.transition-view h1 span {
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 16px;
  font-weight: 800;
}

.transition-view h1 strong {
  color: var(--teal-dark);
  font-size: 44px;
  font-weight: 900;
  text-decoration: underline;
  text-decoration-color: var(--yellow);
  text-decoration-thickness: 7px;
  text-underline-offset: 8px;
}

.transition-view p {
  max-width: 300px;
  margin-bottom: 25px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

.transition-count {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border: 4px solid var(--coral);
  border-radius: 50%;
  color: var(--coral);
  font-size: 21px;
  font-weight: 850;
  box-shadow: 0 0 0 6px var(--gold-soft);
  animation: count-pulse 900ms ease-in-out infinite;
}

@keyframes count-pulse {
  50% {
    transform: scale(1.08);
  }
}

.play-area {
  flex: 1;
  min-height: 420px;
  display: flex;
  flex-direction: column;
}

.round-timer {
  position: relative;
  min-height: 44px;
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 5px;
  overflow: hidden;
  color: var(--muted);
  background: var(--purple-soft);
  font-size: 12px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.round-timer strong {
  color: var(--teal-dark);
  font-size: 24px;
  line-height: 1;
}

.round-timer i {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 4px;
  background: var(--yellow);
  transform-origin: left;
  transition: transform 180ms linear;
}

.round-timer.urgent {
  color: var(--red);
  background: #fff3f3;
}

.round-timer.urgent strong {
  color: var(--red);
  animation: count-pulse 600ms ease-in-out infinite;
}

.round-timer.urgent i {
  background: var(--red);
}

.prompt-view,
.answer-view {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.phase-title {
  min-height: 62px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  margin: 0 0 18px;
  padding: 9px 12px;
  border-top: 2px solid var(--yellow);
  border-bottom: 2px solid var(--yellow);
  color: var(--ink);
  background: var(--gold-soft);
}

.phase-title strong {
  padding: 8px 11px;
  border-radius: 5px;
  color: #fff;
  background: var(--teal-dark);
  box-shadow: 0 4px 12px rgba(109, 40, 217, 0.2);
  font-size: 19px;
  font-weight: 900;
  line-height: 1.15;
  white-space: nowrap;
}

.phase-title span {
  min-width: 0;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.35;
  text-align: left;
}

.simple-phase-title {
  grid-template-columns: minmax(0, 1fr);
  justify-items: center;
}

.simple-phase-title strong {
  min-width: min(100%, 190px);
  text-align: center;
}

.stroop-stage {
  min-height: 280px;
  display: grid;
  place-items: center;
  border: 1px solid #e2d9f3;
  border-top: 3px solid var(--yellow);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.solo-coach-stroop-prompt {
  min-height: 82px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 84px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  padding: 8px 14px;
  border: 1px solid #e0d3fa;
  border-left: 4px solid var(--yellow);
  border-radius: 8px;
  background: #faf7ff;
  box-shadow: 0 7px 18px rgba(109, 40, 217, 0.08);
}

.solo-coach-stroop-prompt span,
.solo-coach-stroop-prompt small {
  color: var(--teal-dark);
  font-size: 12px;
  font-weight: 850;
  line-height: 1.45;
}

.solo-coach-stroop-prompt span {
  text-align: right;
}

.solo-coach-stroop-prompt small {
  color: var(--muted);
}

.solo-coach-stroop-prompt strong {
  font-size: 58px;
  font-weight: 900;
  line-height: 1;
  text-align: center;
  text-shadow: 0 3px 0 rgba(109, 40, 217, 0.08);
}

.stroop-word {
  display: block;
  font-size: 128px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0;
  text-shadow: 0 3px 0 rgba(109, 40, 217, 0.08);
}

.speak-pulse {
  width: 46px;
  height: 6px;
  margin: 20px auto 0;
  border-radius: 3px;
  background: var(--teal);
  animation: breathe 1.2s ease-in-out infinite alternate;
}

@keyframes breathe {
  from {
    transform: scaleX(0.55);
    opacity: 0.45;
  }
  to {
    transform: scaleX(1);
    opacity: 1;
  }
}

.option-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(2, 142px);
  gap: 12px;
}

.stroop-option {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 7px 18px rgba(109, 40, 217, 0.09);
  font-size: 64px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0;
  transition:
    transform 100ms ease,
    border-color 100ms ease,
    box-shadow 100ms ease;
}

.stroop-option:hover {
  border-color: #d9cdf5;
  box-shadow: 0 10px 24px rgba(109, 40, 217, 0.13);
}

.stroop-option:active {
  transform: scale(0.96);
}

.solo-coach-mode .duel-color-button:active,
.solo-coach-mode .map-cell:not(:disabled):active,
.solo-coach-mode .map-cell.flashing:not(:disabled):active,
.solo-coach-mode .stroop-option:active {
  transform: none;
}

.stroop-option.wrong {
  border-color: var(--red);
  animation: shake 240ms ease-in-out;
}

@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }
  35% {
    transform: translateX(-7px);
  }
  70% {
    transform: translateX(7px);
  }
}

.feedback {
  min-height: 34px;
  padding-top: 10px;
  color: var(--red);
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}

.result {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 28px;
  padding: 34px 0;
}

.result-kicker {
  margin-bottom: 8px;
  color: var(--teal-dark);
  font-size: 13px;
  font-weight: 800;
}

.result h1 {
  margin-bottom: 0;
}

.score-hero {
  position: relative;
  overflow: hidden;
  padding: 28px 24px;
  border-radius: 8px;
  color: #fff;
  background: var(--teal-dark);
  box-shadow: var(--shadow);
}

.score-hero::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 4px;
  background: var(--yellow);
}

.score-number {
  display: block;
  margin-bottom: 8px;
  font-size: 82px;
  font-weight: 900;
  line-height: 0.9;
  font-variant-numeric: tabular-nums;
}

.score-unit {
  font-size: 17px;
  font-weight: 750;
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--line);
}

.result-metric {
  min-width: 0;
  padding: 18px 8px;
  background: var(--surface);
  text-align: center;
}

.result-value {
  display: block;
  margin-bottom: 7px;
  font-size: 21px;
  font-weight: 850;
  font-variant-numeric: tabular-nums;
}

.result-label {
  display: block;
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}

.result-actions {
  display: grid;
  gap: 10px;
}

.child-results {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.child-result {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}

.child-result:last-child {
  border-bottom: 0;
}

.child-result span {
  color: var(--muted);
  font-size: 12px;
  text-align: right;
}

.planet-coach {
  position: relative;
  display: grid;
  gap: 12px;
  padding: 15px;
  overflow: hidden;
  border: 1px solid #e0d3fa;
  border-radius: 8px;
  background:
    linear-gradient(105deg, rgba(245, 240, 255, 0.96), rgba(255, 252, 231, 0.96)),
    var(--surface);
  box-shadow: 0 9px 24px rgba(109, 40, 217, 0.09);
}

.planet-coach.coach-entering {
  animation: coach-arrive 180ms ease-out both;
}

.planet-coach.coach-error-feedback {
  animation: coach-error-shake 280ms ease-in-out both;
}

.planet-coach::before {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--teal), var(--yellow), #ff8d7a);
  content: "";
}

.coach-invitation {
  grid-template-columns: 52px minmax(0, 1fr) auto;
  align-items: center;
}

.coach-avatar {
  width: 52px;
  height: 60px;
  flex: 0 0 auto;
  background: url("/assets/focus-mascot.webp?v=0.6.0-img1") center / contain
    no-repeat;
  filter: drop-shadow(0 5px 9px rgba(83, 38, 122, 0.2));
}

.coach-invitation-copy {
  min-width: 0;
}

.coach-invitation-copy > span,
.coach-header span,
.coach-recommendation > span,
.coach-next-session > span,
.coach-feedback > span {
  display: block;
  margin-bottom: 3px;
  color: var(--teal-dark);
  font-size: 11px;
  font-weight: 800;
}

.coach-invitation-copy strong,
.coach-message strong,
.coach-recommendation strong,
.coach-next-session strong {
  display: block;
  font-size: 14px;
  line-height: 1.45;
}

.coach-invitation-copy p,
.coach-message p,
.coach-recommendation p,
.coach-next-session p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
}

.coach-primary-action,
.coach-text-action,
.coach-hint-action,
.coach-pace-control button,
.coach-feedback button {
  min-height: 38px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 800;
  transition:
    transform 180ms cubic-bezier(0.34, 1.56, 0.64, 1),
    border-color 160ms ease,
    background 160ms ease;
}

.coach-primary-action {
  padding: 0 15px;
  border: 1px solid var(--teal);
  color: #fff;
  background: var(--teal);
  white-space: nowrap;
}

.coach-text-action {
  padding: 0 12px;
  border: 0;
  color: var(--muted);
  background: transparent;
}

.coach-hint-action {
  padding: 0 14px;
  border: 1px solid #d7c5f6;
  color: var(--teal-dark);
  background: #fff;
}

.coach-primary-action:hover,
.coach-text-action:hover,
.coach-hint-action:hover,
.coach-pace-control button:hover,
.coach-feedback button:hover {
  transform: translateY(-1px);
}

.planet-coach button:disabled {
  cursor: wait;
  opacity: 0.56;
}

.coach-header {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.coach-header .coach-avatar {
  width: 42px;
  height: 48px;
}

.coach-header strong {
  display: block;
  font-size: 14px;
}

.coach-header small {
  padding: 4px 7px;
  border: 1px solid #e6d8ae;
  border-radius: 5px;
  color: #705600;
  background: var(--gold-soft);
  font-size: 10px;
  font-weight: 800;
}

.coach-message {
  padding-left: 52px;
}

.coach-message.is-ai-review {
  padding: 10px 12px;
  border: 1px solid #ecd9f6;
  border-radius: 10px;
  background: linear-gradient(135deg, #faf5ff 0%, #fffdf2 100%);
}

/* 等待大模型复盘时的"思考中"浅紫虚线框 */
.coach-message.is-ai-pending {
  padding: 10px 12px;
  border: 1px dashed #e0d2f2;
  border-radius: 10px;
  background: #faf7ff;
}

.coach-message.is-ai-pending strong {
  color: var(--muted);
  font-weight: 800;
}

.coach-ai-badge {
  display: inline-block;
  margin-bottom: 5px;
  padding: 2px 9px;
  border-radius: 999px;
  color: #6d28d9;
  background: var(--gold-soft);
  font-size: 10px;
  font-weight: 900;
  animation: coach-ai-pop 420ms cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.coach-ai-thinking {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 7px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.coach-ai-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--teal);
  animation: coach-ai-bounce 900ms cubic-bezier(0.45, 0, 0.35, 1) infinite;
}

@keyframes coach-ai-pop {
  from {
    opacity: 0;
    transform: scale(0.6);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes coach-ai-bounce {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }
  45% {
    transform: translateY(-4px) scale(1.15);
  }
}

.coach-recommendation,
.coach-next-session {
  padding: 11px 12px;
  border-left: 3px solid var(--yellow);
  background: rgba(255, 255, 255, 0.72);
}

.coach-pace-control,
.coach-feedback > div {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
}

.coach-pace-control button,
.coach-feedback button {
  min-width: 0;
  padding: 0 6px;
  border: 1px solid var(--line);
  color: var(--muted);
  background: rgba(255, 255, 255, 0.82);
}

.coach-pace-control button.selected,
.coach-feedback button.selected {
  border-color: var(--teal);
  color: var(--teal-dark);
  background: var(--purple-soft);
  box-shadow: inset 0 -2px 0 var(--yellow);
}

.coach-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.coach-playing-actions {
  padding-left: 52px;
}

.coach-playing-actions span {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.4;
}

.coach-progress-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--line);
}

.coach-progress-summary > span {
  min-width: 0;
  padding: 9px 6px;
  background: rgba(255, 255, 255, 0.9);
  text-align: center;
}

.coach-progress-summary small,
.coach-progress-summary strong {
  display: block;
}

.coach-progress-summary small {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 9px;
}

.coach-progress-summary strong {
  font-size: 11px;
  line-height: 1.35;
}

.coach-feedback {
  display: grid;
  gap: 7px;
}

.coach-compact {
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
}

.coach-compact-identity {
  display: grid;
  justify-items: center;
  color: var(--teal-dark);
  font-size: 9px;
  font-weight: 900;
  line-height: 1;
}

.coach-compact .coach-avatar {
  width: 32px;
  height: 34px;
}

.coach-compact .coach-message {
  min-width: 0;
  padding-left: 0;
}

.coach-compact .coach-message strong {
  font-size: 12px;
}

.coach-compact .coach-message p {
  display: -webkit-box;
  margin-top: 2px;
  overflow: hidden;
  font-size: 10px;
  line-height: 1.4;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
}

.coach-compact .coach-hint-action {
  min-height: 34px;
  padding: 0 10px;
  white-space: nowrap;
}

@keyframes coach-arrive {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes coach-error-shake {
  0%,
  100% {
    transform: translateX(0);
  }
  35% {
    transform: translateX(-4px);
  }
  70% {
    transform: translateX(4px);
  }
}

.toast {
  position: fixed;
  z-index: 20;
  right: 20px;
  bottom: calc(20px + env(safe-area-inset-bottom));
  left: 20px;
  max-width: 480px;
  min-height: 46px;
  margin: 0 auto;
  padding: 13px 16px;
  border-radius: 7px;
  color: #fff;
  background: var(--teal-dark);
  box-shadow: var(--shadow);
  font-size: 14px;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition:
    opacity 160ms ease,
    transform 160ms ease;
}

.toast.visible {
  opacity: 1;
  transform: translateY(0);
}

.loading {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-weight: 700;
}

@media (max-height: 700px) {
  .shell {
    padding-top: max(12px, env(safe-area-inset-top));
    padding-bottom: max(12px, env(safe-area-inset-bottom));
  }

  .game-header {
    min-height: 62px;
  }

  .turn-banner {
    min-height: 36px;
  }

  .relay-route {
    min-height: 30px;
  }

  .rule-status {
    min-height: 52px;
    padding: 6px 10px;
  }

  .rule-status strong {
    font-size: 19px;
  }

  .rule-status-hint {
    font-size: 10px;
  }

  .play-area {
    min-height: 350px;
  }

  .round-timer {
    min-height: 36px;
  }

  .round-timer strong {
    font-size: 20px;
  }

  .phase-title {
    min-height: 54px;
    margin-bottom: 10px;
    padding: 7px 9px;
  }

  .phase-title strong {
    font-size: 17px;
  }

  .stroop-stage {
    min-height: 230px;
  }

  .solo-coach-stroop-prompt {
    min-height: 72px;
    grid-template-columns: minmax(0, 1fr) 70px minmax(0, 1fr);
    gap: 7px;
    padding: 7px 9px;
  }

  .solo-coach-stroop-prompt strong {
    font-size: 48px;
  }

  .transition-view {
    min-height: 330px;
  }

  .observer-view {
    min-height: 330px;
  }

  .option-grid {
    grid-template-rows: repeat(2, 120px);
  }
}

@media (max-width: 640px) {
  .guide-intro {
    padding: 30px 0 24px;
  }

  .guide-intro h1 {
    max-width: none;
    font-size: 30px;
  }

  .guide-intro p {
    max-width: none;
  }

  .guide-overview {
    grid-template-columns: 1fr;
  }

  .guide-overview > div,
  .guide-overview > div:first-child,
  .guide-overview > div:last-child {
    padding: 13px 0;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .guide-overview > div:last-child {
    border-bottom: 0;
  }

  .guide-heading {
    gap: 10px;
  }

  .guide-heading h2 {
    font-size: 22px;
  }

  .guide-badge {
    max-width: 42%;
    white-space: normal;
    text-align: right;
  }

  .guide-scoreline {
    grid-template-columns: 1fr;
  }

  .guide-scoreline > div,
  .guide-scoreline > div:first-child,
  .guide-scoreline > div:last-child {
    padding: 11px 0;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .guide-scoreline > div:last-child {
    border-bottom: 0;
  }

  .principle-path {
    grid-template-columns: 1fr;
    gap: 5px;
    padding: 14px 0;
  }

  .principle-path i {
    line-height: 1;
    transform: rotate(90deg);
  }
}

@media (max-width: 480px) {
  .coach-invitation {
    grid-template-columns: 46px minmax(0, 1fr);
  }

  .coach-invitation .coach-avatar {
    width: 46px;
    height: 54px;
  }

  .coach-invitation .coach-primary-action {
    grid-column: 1 / -1;
    width: 100%;
  }

  .coach-message,
  .coach-playing-actions,
  .coach-compact .coach-playing-actions {
    padding-left: 0;
  }

  .coach-compact {
    grid-template-columns: 34px minmax(0, 1fr) auto;
    gap: 7px;
    padding: 7px 8px;
  }

  .coach-compact .coach-avatar {
    width: 29px;
    height: 31px;
  }

  .coach-compact .coach-hint-action {
    min-height: 32px;
    padding: 0 8px;
  }

  .coach-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .coach-actions .coach-primary-action,
  .coach-actions .coach-text-action {
    width: 100%;
  }

  .coach-progress-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .entry-hero {
    grid-template-columns: minmax(0, 1fr) 124px;
    gap: 16px;
  }

  .rule-status {
    column-gap: 7px;
    padding-right: 9px;
    padding-left: 9px;
  }

  .rule-status-label,
  .rule-status-hint {
    font-size: 10px;
  }

  .rule-status strong {
    font-size: 20px;
  }

  .game-name {
    font-size: 36px;
  }

  .entry-hero .lead {
    font-size: 12px;
    line-height: 1.6;
  }
}

@media (max-width: 360px) {
  .entry-shell > .guide-topbar::after,
  .guide-shell > .guide-topbar::after {
    display: none;
  }

  h1 {
    font-size: 34px;
  }

  .rule-status {
    column-gap: 5px;
    padding-right: 7px;
    padding-left: 7px;
  }

  .rule-status-label,
  .rule-status-hint {
    font-size: 9px;
  }

  .rule-status strong {
    font-size: 18px;
    text-decoration-thickness: 3px;
    text-underline-offset: 4px;
  }

  .product-title {
    font-size: 18px;
  }

  .entry-hero {
    grid-template-columns: minmax(0, 1fr) 104px;
    column-gap: 12px;
  }

  .family-portrait {
    height: 158px;
  }

  .game-name {
    font-size: 34px;
  }

  .shell {
    padding-right: 14px;
    padding-left: 14px;
  }

  .room-code {
    font-size: 52px;
  }

  .stroop-word {
    font-size: 110px;
  }

  .stroop-option {
    font-size: 56px;
  }

  .duration-segments .segment {
    font-size: 12px;
  }

  .rule-example {
    grid-template-columns: 50px minmax(0, 1fr);
    gap: 10px;
    padding: 12px;
  }

  .rule-letter {
    width: 50px;
    height: 50px;
    font-size: 30px;
  }

  .phase-title {
    gap: 7px;
    padding-right: 7px;
    padding-left: 7px;
  }

  .phase-title strong {
    padding-right: 8px;
    padding-left: 8px;
    font-size: 16px;
  }

  .phase-title span {
    font-size: 12px;
  }

  .duel-stimulus {
    min-height: 180px;
    padding: 14px 8px;
  }

  .duel-stimulus strong {
    font-size: 64px;
  }

  .duel-color-options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .map-game-shell {
    padding-right: 10px;
    padding-left: 10px;
  }

  .map-instruction {
    font-size: 13px;
  }

  .map-score-strip {
    gap: 2px;
  }

  .map-score-item {
    grid-template-columns: 16px minmax(0, 1fr);
    gap: 3px;
    padding: 5px 3px;
  }

  .map-score-item strong {
    grid-column: 1 / -1;
    font-size: 14px;
    text-align: center;
  }

  .map-rank {
    width: 16px;
    height: 16px;
  }

  .map-board {
    gap: 2px;
    padding: 3px;
  }

  .map-cell-word {
    font-size: 14px;
  }

  .map-cell-owner {
    top: 1px;
    right: 1px;
    min-width: 10px;
    height: 10px;
    font-size: 7px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ============ 封面「今日AI寄语」标题行进度条 ============ */
.daily-summary-slot {
  flex: none;
  min-width: 0;
}

.daily-summary-slot:empty {
  display: none;
}

.daily-track {
  display: block;
  width: 268px;
  max-width: 100%;
  border: none;
  border-radius: 18px;
  padding: 9px 16px 8px;
  font-family: inherit;
  text-align: left;
  position: relative;
  overflow: hidden;
}

.daily-track-ready {
  background: linear-gradient(135deg, #ffd400 0%, #ffb800 100%);
  color: #5b2a86;
  box-shadow: 0 6px 16px rgba(255, 184, 0, 0.32);
  cursor: pointer;
  transition: transform 0.16s ease;
}

.daily-track-ready:active {
  transform: scale(0.97);
}

/* 发光呼吸改用伪元素透明度动画（GPU 合成），避免 box-shadow 逐帧重引发烫 */
.daily-track-ready::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 14px 2px rgba(255, 244, 180, 0.9);
  opacity: 0.35;
  animation: daily-track-glow 2.6s ease-in-out infinite;
  pointer-events: none;
}

@keyframes daily-track-glow {
  0%,
  100% {
    opacity: 0.35;
  }

  50% {
    opacity: 1;
  }
}

.daily-track-locked {
  background: #f7f5fb;
  border: 1.5px solid #e2d9f2;
  color: #8a8198;
}

.daily-track-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}

.daily-track-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.daily-track-spark {
  font-size: 14px;
  line-height: 1;
  font-style: normal;
}

.daily-track-ready .daily-track-spark {
  color: #ffffff;
}

.daily-track-locked .daily-track-spark {
  color: #62358a;
}

.daily-track-meta {
  flex: none;
  font-weight: 800;
}

.daily-track-meta em {
  font-style: normal;
}

.dt-short {
  display: none;
}

.daily-track-bar {
  display: block;
  margin-top: 7px;
  height: 5px;
  border-radius: 999px;
  background: #e6dff2;
  overflow: hidden;
}

.daily-track-bar i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #ffd400, #ffb800);
  transition: width 0.5s ease;
}

.daily-track-ready .daily-track-bar {
  background: rgba(91, 42, 138, 0.18);
}

.daily-track-ready .daily-track-bar i {
  background: #62358a;
}

@media (max-width: 720px) {
  .daily-track {
    width: 178px;
    border-radius: 15px;
    padding: 7px 12px 6px;
  }

  .daily-track-head {
    gap: 6px;
    font-size: 11.5px;
  }

  .daily-track-spark {
    font-size: 12px;
  }

  .daily-track-bar {
    margin-top: 5px;
    height: 4px;
  }

  .dt-long {
    display: none;
  }

  .dt-short {
    display: inline;
  }
}

/* ============ 封面快捷胶囊行：探索互动空间 / 盲盒速开 / 今日简报 ============ */
.hub-quick-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}

.hub-quick-explore {
  margin-right: auto;
  font-size: 21px;
  font-weight: 800;
  color: #e0a800;
  white-space: nowrap;
}

.hub-footer-note {
  margin-top: 4px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: #9a90b5;
}

.hub-logout-button {
  flex-shrink: 0;
  border: 1px solid #d4cde6;
  border-radius: 8px;
  padding: 4px 12px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  color: #6b5fa3;
  background: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.hub-logout-button:hover {
  background: #f3effc;
  border-color: #b5a8d8;
}

.hub-quick-card {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 126px;
  border-radius: 18px;
  padding: 12px 22px;
  font-family: inherit;
}

.hub-quick-name {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  position: relative;
  z-index: 1;
}

.hub-quick-bbx {
  border: none;
  background: linear-gradient(135deg, #62358a 0%, #7b3fb0 100%);
  color: #fff;
  box-shadow: 0 6px 16px rgba(98, 53, 138, 0.32);
  cursor: pointer;
  transition: transform 0.16s ease;
}

.hub-quick-bbx:active {
  transform: scale(0.97);
}

.daily-quick {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  position: relative;
  min-width: 0;
  border-radius: 18px;
  padding: 12px 20px 12px 48px;
  font-family: inherit;
  overflow: hidden;
}

.daily-quick-fill {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #ffd400, #ffb800, #ffe873, #ffd400);
  transition: width 0.5s ease;
}

/* 流光改为变换扫过的光带（GPU 合成），避免 background-position 逐帧重绘 */
/* 父 .daily-quick 有 overflow:hidden + border-radius，流光溢出由父容器裁切 */
.daily-quick-fill::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -60%;
  width: 60%;
  background: linear-gradient(
    100deg,
    rgba(255, 255, 255, 0),
    rgba(255, 255, 255, 0.45),
    rgba(255, 255, 255, 0)
  );
  transform: translateX(0) skewX(-18deg);
  animation: daily-quick-flow 2.6s linear infinite;
  pointer-events: none;
}

@keyframes daily-quick-flow {
  from {
    transform: translateX(0) skewX(-18deg);
  }

  to {
    transform: translateX(280%) skewX(-18deg);
  }
}

.daily-quick-mins {
  position: absolute;
  left: 8px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  font-style: normal;
  font-size: 10.5px;
  font-weight: 800;
  color: #5b2a86;
  white-space: nowrap;
}

.daily-quick-ready {
  position: relative;
  border: none;
  background: #fff7dd;
  color: #5b2a86;
  box-shadow: 0 6px 16px rgba(255, 184, 0, 0.32);
  cursor: pointer;
  transition: transform 0.16s ease;
}

/* 同 daily-track-ready：发光呼吸走伪元素透明度，避免逐帧重绘 */
.daily-quick-ready::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 14px 2px rgba(255, 205, 60, 0.55);
  opacity: 0.35;
  animation: daily-track-glow 2.6s ease-in-out infinite;
  pointer-events: none;
}

.daily-quick-ready:active {
  transform: scale(0.97);
}

.daily-quick-locked {
  background: #f7f5fb;
  border: 1.5px solid #e2d9f2;
  color: #8a8198;
}

.daily-quick-locked .daily-quick-fill {
  opacity: 0.55;
}

.daily-quick-locked .hub-quick-name {
  color: #6b6280;
}

@media (max-width: 720px) {
  .hub-quick-row {
    gap: 7px;
    margin: 0;
  }

  .hub-quick-card {
    border-radius: 15px;
    min-width: 104px;
    padding: 10px 15px;
  }

  .daily-quick {
    border-radius: 15px;
    min-width: 112px;
    padding: 10px 14px 10px 42px;
  }

  .hub-quick-name {
    font-size: 13px;
  }

  .hub-quick-explore {
    font-size: 17px;
  }

  .daily-quick-mins {
    font-size: 9.5px;
    left: 6px;
  }
}

/* ============ 今日寄语弹层 ============ */
.daily-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
}

.daily-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(37, 29, 45, 0.52);
}

.daily-modal-sheet {
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: min(560px, 100%);
  max-height: 92vh;
  overflow-y: auto;
  background: #ffffff;
  border-radius: 28px 28px 0 0;
  padding: 26px 24px 30px;
  box-shadow: 0 -12px 40px rgba(37, 29, 45, 0.22);
  animation: daily-sheet-up 0.28s cubic-bezier(0.2, 0.9, 0.3, 1.2);
}

/* 小 Logo 装饰层：几个小 mascot 散布在卡片边缘，轻透明、不压正文 */
.daily-modal-sheet > .daily-modal-decor {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  border-radius: inherit;
}

.daily-decor-mascot {
  position: absolute;
  background: url("/assets/focus-mascot.webp") center / contain no-repeat;
  animation: daily-mascot-float 4.6s ease-in-out infinite;
}

.daily-decor-mascot-1 {
  top: 76px;
  left: -8px;
  width: 46px;
  height: 46px;
  opacity: 0.22;
  --tilt: -12deg;
}

.daily-decor-mascot-2 {
  top: 132px;
  right: -10px;
  width: 54px;
  height: 54px;
  opacity: 0.2;
  --tilt: 14deg;
  animation-delay: -0.8s;
}

.daily-decor-mascot-3 {
  top: 40%;
  left: -12px;
  width: 40px;
  height: 40px;
  opacity: 0.16;
  --tilt: 8deg;
  animation-delay: -1.6s;
}

.daily-decor-mascot-4 {
  top: 54%;
  right: -14px;
  width: 46px;
  height: 46px;
  opacity: 0.16;
  --tilt: -10deg;
  animation-delay: -2.4s;
}

.daily-decor-mascot-5 {
  bottom: 84px;
  left: 14px;
  width: 42px;
  height: 42px;
  opacity: 0.2;
  --tilt: 10deg;
  animation-delay: -3.1s;
}

.daily-decor-mascot-6 {
  bottom: 118px;
  right: 12px;
  width: 52px;
  height: 52px;
  opacity: 0.22;
  --tilt: -14deg;
  animation-delay: -3.8s;
}

@keyframes daily-mascot-float {
  0%,
  100% {
    transform: translateY(0) rotate(var(--tilt, 0deg));
  }
  50% {
    transform: translateY(-6px) rotate(calc(var(--tilt, 0deg) + 4deg));
  }
}

.daily-modal-sheet > * {
  position: relative;
  z-index: 1;
}

@keyframes daily-sheet-up {
  from {
    transform: translateX(-50%) translateY(48px);
    opacity: 0;
  }
  to {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
  }
}

@media (min-width: 720px) {
  .daily-modal-sheet {
    bottom: auto;
    top: 50%;
    transform: translate(-50%, -50%);
    border-radius: 28px;
  }

  @keyframes daily-sheet-up {
    from {
      transform: translate(-50%, -46%) scale(0.96);
      opacity: 0;
    }
    to {
      transform: translate(-50%, -50%) scale(1);
      opacity: 1;
    }
  }
}

.daily-modal-close {
  position: absolute;
  top: 14px;
  right: 16px;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: #f1ecf8;
  color: #716979;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.daily-modal-eyebrow {
  text-align: center;
  color: #a097ad;
  font-size: 13px;
  letter-spacing: 2px;
  margin: 4px 0 2px;
}

.daily-modal-date {
  text-align: center;
  color: #62358a;
  font-size: 24px;
  font-weight: 800;
  margin: 6px 0 18px;
}

.daily-modal-hero {
  background: #f5f0ff;
  border-radius: 20px;
  padding: 18px 16px;
  text-align: center;
}

.daily-modal-minutes {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 8px;
}

.daily-modal-minutes strong {
  font-size: 54px;
  line-height: 1;
  color: #62358a;
  font-weight: 800;
}

.daily-modal-minutes span {
  font-size: 20px;
  color: #716979;
  font-weight: 600;
}

.daily-modal-hero p {
  margin: 10px 0 0;
  font-size: 14px;
  color: #716979;
}

.daily-modal-hero p strong {
  color: #62358a;
}

.daily-modal-highlights {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 14px 2px 0;
}

.daily-highlight {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  background: #f7f5fb;
  border: 1px solid #e8e1f2;
  border-radius: 14px;
  padding: 9px 12px;
}

.daily-highlight-icon {
  flex: none;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #fff3bf;
  font-size: 17px;
  font-style: normal;
}

.daily-highlight-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.3;
}

.daily-highlight-copy small {
  font-size: 11.5px;
  color: #8a8198;
  word-break: break-all;
}

.daily-highlight-copy b {
  font-size: 17px;
  font-weight: 800;
  color: #62358a;
}

@media (max-width: 480px) {
  .daily-modal-highlights {
    gap: 7px;
  }

  .daily-highlight {
    gap: 7px;
    padding: 8px 9px;
    border-radius: 12px;
  }

  .daily-highlight-icon {
    width: 30px;
    height: 30px;
    font-size: 15px;
  }

  .daily-highlight-copy small {
    font-size: 10.5px;
  }

  .daily-highlight-copy b {
    font-size: 15px;
  }
}

.daily-modal-review {
  margin-top: 14px;
  border-radius: 20px;
  padding: 20px 18px;
  background: linear-gradient(180deg, #fff9d9 0%, #fffdf2 100%);
  border: 1.5px solid #f0e2a0;
}

.daily-modal-review-pending {
  text-align: center;
  background: #f7f5fb;
  border-color: #e3dcf0;
  padding: 30px 18px;
}

.daily-modal-badge {
  width: fit-content;
  margin: 0 auto;
  background: #62358a;
  color: #ffffff;
  font-size: 12px;
  font-weight: 600;
  padding: 5px 16px;
  border-radius: 999px;
}

.daily-modal-review h3 {
  text-align: center;
  color: #62358a;
  font-size: 22px;
  font-weight: 800;
  margin: 14px 0 10px;
}

.daily-modal-text {
  font-size: 15px;
  line-height: 1.85;
  color: #251d2d;
  text-align: center;
  margin: 0;
}

.daily-modal-pending {
  margin: 16px 0 0;
  color: #716979;
  font-size: 14px;
}

.daily-spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2.5px solid #ddd4ec;
  border-top-color: #62358a;
  border-radius: 50%;
  animation: daily-spin 0.8s linear infinite;
  margin-right: 8px;
  vertical-align: -3px;
}

@keyframes daily-spin {
  to {
    transform: rotate(360deg);
  }
}

.daily-modal-download {
  width: 100%;
  margin-top: 18px;
  background: #62358a;
  color: #ffffff;
  border: none;
  border-radius: 999px;
  padding: 15px;
  font-size: 17px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(98, 53, 138, 0.28);
  transition: transform 0.16s ease;
}

.daily-modal-download:active {
  transform: scale(0.98);
}

.daily-modal-download:disabled {
  background: #c3b9d4;
  box-shadow: none;
  cursor: default;
}

.daily-modal-note {
  text-align: center;
  color: #a79fb0;
  font-size: 12px;
  margin: 12px 0 0;
}

/* 动画减排：系统开启"减弱动态效果"时停用循环动画（省电、防发烫、无障碍） */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
