/* 平台中文字体。Windows会直接使用本机微软雅黑，无需联网加载字体。 */
:root {
  --font-ui: "Microsoft YaHei", "微软雅黑", sans-serif;
}
body,
button,
input,
select,
textarea,
svg text,
.brand-symbol,
.cooperation-symbol span,
.graphic-card strong,
.choice-content b,
.opponent-avatar {
  font-family: var(--font-ui);
}
.brand-symbol { font-size: 24px; font-weight: 600; }
.page-container { min-height: calc(100vh - 85px); }

/* 登录页左侧和整页背景都使用雪山红叶GIF。 */
body.login-autumn {
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  background: #f5f7fa;
}
.login-autumn::before,
.login-autumn::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
}
.login-autumn::before {
  z-index: -2;
  background: url("images/login-mountain.53f4acf5c31c.gif") center 45% / cover no-repeat;
  opacity: .18; /* 整页背景浓度：数值越小，背景越淡。 */
  filter: blur(6px) saturate(.65);
  transform: scale(1.04);
}
.login-autumn::after {
  z-index: -1;
  background: linear-gradient(115deg, rgba(245, 248, 252, .55), rgba(255, 255, 255, .80));
}
.login-autumn .site-header {
  background: rgba(255, 255, 255, .85);
  border-bottom-color: rgba(97, 125, 155, .15);
  backdrop-filter: blur(12px);
}
.login-autumn .brand { color: #294867; }
.login-autumn .brand-symbol {
  background: #42658a;
  border-radius: 11px;
}
.login-autumn .login-page {
  min-height: calc(100vh - 85px);
  min-height: calc(100svh - 85px);
  padding: 42px 28px;
  flex-direction: column;
}
.login-autumn .login-page > .messages { width: 100%; max-width: 980px; }
.login-autumn .login-shell {
  width: 100%;
  max-width: 980px;
  min-height: 540px;
  display: grid;
  grid-template-columns: 1.08fr 1fr;
  gap: 24px;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
/* 左侧播放所选的像素GIF，保持清晰和正常不透明度。 */
.login-autumn .login-story {
  position: relative;
  overflow: hidden;
  min-height: 540px;
  padding: 0;
  background: transparent;
  border: 1px solid rgba(80, 112, 149, .28);
  border-radius: 18px;
}
.login-autumn .login-story picture {
  position: absolute;
  inset: 0;
  display: block;
}
.login-autumn .login-scene-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  image-rendering: pixelated;
}
.login-autumn .login-panel {
  padding: 48px 42px;
  background: rgba(255, 255, 255, .96);
  border: 1px solid rgba(114, 140, 167, .22);
  border-radius: 18px;
  box-shadow: 0 18px 50px rgba(42, 74, 108, .06);
}
.login-autumn .login-panel .eyebrow {
  color: #7b8998;
  font-size: 15px;
  letter-spacing: 1px;
}
.login-autumn .login-panel h1 {
  color: #294460;
  font-size: 32px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0;
  margin-bottom: 30px;
}
.login-autumn .login-panel > p { color: #7c8997; margin-bottom: 31px; }
.login-autumn .form-field label { color: #435b73; }
.login-autumn .form-field input {
  background: rgba(255, 255, 255, .9);
  border-color: #d9e1e9;
  min-height: 45px;
  border-radius: 7px;
  color: #354e67;
}
.login-autumn .form-field input:focus {
  outline-color: #e0e9f3;
  border-color: #88a4c0;
}
.login-autumn .button.primary { background: #42658a; min-height: 44px; }
.login-autumn .button.primary:hover:not(:disabled) { background: #304f70; }
.login-autumn .login-help { color: #8492a0; font-size: 15px; line-height: 1.8; }

@media (max-width: 1100px) {
  .header-inner { gap: 22px; }
  .main-nav { gap: 18px; }
  .brand { font-size: 18px; }
}
@media (max-width: 760px) {
  .header-inner { gap: 12px; }
  .brand { min-width: 0; gap: 9px; font-size: 17px; }
  .brand-symbol { width: 32px; height: 32px; font-size: 22px; }
  .brand > span:last-child { overflow-wrap: anywhere; }
  .login-autumn .site-header { min-height: 70px; }
  .login-autumn .login-page {
    min-height: calc(100svh - 70px);
    padding: 28px 18px;
    align-items: center;
  }
  .login-autumn .login-shell {
    max-width: 470px;
    min-height: 0;
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
  }
  .login-autumn .login-story { min-height: 220px; }
  .login-autumn .login-scene-image { object-position: center 38%; }
  .login-autumn .login-panel { padding: 30px 26px; }
  .login-autumn .login-panel h1 { font-size: 28px; }
  .login-autumn .login-panel > p { margin-bottom: 25px; }
  .login-autumn .login-help { margin-top: 23px; font-size: 14px; }
}

/* 全平台阅读字号已统一增大；控件和表格留出相应空间。 */
.main-nav a { min-height: 44px; }
.account-menu summary { min-height: 42px; }
.account-dropdown { width: 230px; }
.account-dropdown > a,
.account-dropdown button { padding: 11px 0; }
.button { min-height: 46px; }
.button.small-button,
.module-bottom .button,
.filters .button { min-height: 42px; }
.form-field input,
.form-field select { min-height: 48px; }
.login-autumn .form-field input { min-height: 50px; font-size: 16px; }
.login-autumn .form-field label,
.login-autumn .button.primary { font-size: 16px; }
.login-autumn .button.primary { min-height: 48px; }
.login-autumn .login-panel .stack-form { gap: 23px; }
.login-autumn .login-help { margin-top: 29px; color: #64758a; }
.module-content > p,
.strategy-details td:last-child { line-height: 1.85; }
.module-meta { flex-wrap: wrap; row-gap: 6px; }
.section-heading { flex-wrap: wrap; }
.panel.table-scroll { overflow-x: auto; }
.table-scroll table { min-width: 850px; }
.table-scroll th,
.table-scroll td { overflow-wrap: break-word; }
.leaderboard td { vertical-align: top; }
.leaderboard td:first-child { overflow-wrap: anywhere; }
.rank { width: 27px; }
.score-cell { gap: 6px; }
.score-cell > span { min-width: 35px; }
.scatter-chart { display: block; max-width: 760px; margin-left: auto; margin-right: auto; }
.chart-axis text { font-size: 23px; }
.chart-axis text:nth-of-type(-n + 5) { text-anchor: end; }
.chart-axis text:nth-of-type(n + 6):nth-of-type(-n + 10) { text-anchor: middle; }
.scatter-own-label { font-size: 22px; }
.chart-empty { font-size: 24px; }

/* 窗口变窄时让导航和图表换行，保持较大的阅读字号。 */
@media (max-width: 1100px) {
  .site-header { height: auto; min-height: 85px; }
  .header-inner { flex-wrap: wrap; padding-top: 14px; padding-bottom: 14px; gap: 14px 22px; }
  .main-nav { order: 3; flex: 1 0 100%; flex-wrap: wrap; min-height: 42px; gap: 8px 24px; }
  .main-nav a { font-size: 16px; padding-bottom: 7px; }
  .chart-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .brand { font-size: 17px; }
  .brand-symbol { flex-shrink: 0; }
  .main-nav { height: auto; margin-bottom: 0; gap: 5px 20px; }
  .main-nav a { font-size: 15px; }
  .login-autumn .login-panel h1 { margin-bottom: 25px; }
  .page-heading .row { flex-wrap: wrap; gap: 10px; }
  .game-heading { flex-wrap: wrap; }
  .legend,
  .scatter-legend { flex-wrap: wrap; row-gap: 6px; }
  .scatter-panel { overflow-x: auto; }
  .scatter-chart { min-width: 440px; }
}

/* 作业首页与三国游戏界面。 */
.account-menu summary > span.caret {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: center;
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  margin-left: 2px;
  color: #203f60;
  line-height: 1;
  transition: transform .15s;
}
.account-menu .caret svg { display: block; }
.account-menu[open] .caret { transform: rotate(180deg); }
.module-tag { font-weight: 700; }
.art-caption { font-size: 15px; letter-spacing: .5px; }
.rules-grid > div > span { color: #29425d; font-size: 23px; font-weight: 700; }
.rules-grid strong { font-size: 20px; line-height: 1.6; }
.rule-score { font-size: 34px; font-weight: 800; line-height: 1.2; color: #c23745; }
.intro-video { margin: 25px 0; padding: 20px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.intro-video h2 { margin-bottom: 14px; }
.intro-video .button { font-size: 18px; }
.game-heading .game-objective { max-width: 760px; margin-top: 14px; color: #29425d; font-size: 23px; font-weight: 700; line-height: 1.6; }
.game-view .game-stats { margin-bottom: 14px; }
.game-view { overflow-anchor: none; }
.round-feedback {
  --round-accent: #456580;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100px;
  margin-bottom: 24px;
  padding: 18px 22px;
  background: #f0f4f8;
  border: 1px solid #dce5ee;
  border-radius: 10px;
  color: #495e74;
  font-size: 18px;
  line-height: 1.75;
}
.round-feedback p { margin: 0; }
.round-feedback--bonus { --round-accent: #7541ae; background: #f5effc; border-color: #e1d2f1; }
.round-feedback--cooperate { --round-accent: #267b54; background: #edf8f1; border-color: #cfe8d9; }
.round-feedback--loss,
.round-feedback--error { --round-accent: #bb3547; background: #fff0f2; border-color: #efcdd3; }
.round-result-label { font-weight: 600; }
.round-opponent { color: var(--round-accent); font-size: 21px; font-weight: 750; }
.round-score { color: var(--round-accent); font-size: 27px; font-weight: 800; }
.round-placeholder { color: #6d7e90; }
.round-feedback .round-notice { margin-top: 7px; color: #8d632e; font-size: 16px; }
.round-feedback--error { color: #a13242; }
.decision-panel .section-heading h2 { font-size: 25px; }
.decision-panel .choice-content { min-height: 140px; padding: 24px 12px 22px; justify-content: center; }
.decision-panel .choice-content b { font-family: var(--font-ui); font-size: clamp(22px, 2.6vw, 32px); font-weight: 600; line-height: 1.3; }
.decision-panel .choice-content strong { margin-top: 10px; font-size: 27px; font-weight: 700; }
.decision-panel button[type="submit"] { min-height: 56px; font-size: 21px; font-weight: 700; }
.opponent-panel > .eyebrow { color: #4b6480; font-size: 22px; font-weight: 700; letter-spacing: .5px; }
.opponent-panel .opponent-title { margin: 20px 0 26px; }
.opponent-panel .opponent-title h2 { font-size: 36px; font-weight: 750; }
.opponent-panel .small { font-size: 20px; line-height: 1.7; }
.opponent-panel .row { flex-wrap: wrap; gap: 6px 14px; }
.opponent-panel .opponent-last strong { font-size: 22px; line-height: 1.65; font-weight: 650; }
@media (max-width: 760px) {
  .rules-grid { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .round-feedback { padding: 16px; font-size: 17px; }
  .game-heading .game-objective { font-size: 21px; }
  .opponent-panel .small { font-size: 18px; }
}
