/* ===== 基础 ===== */
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; height: 100%; }
body {
  background: #eef1f6;
  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: #1f2933;
}
.view { display: none; }
.view.active { display: block; }
.card {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}
.red { color: #e53935; font-weight: 700; }

/* ===== Toast ===== */
.toast {
  position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%) scale(0.9);
  background: rgba(0,0,0,0.8); color: #fff; padding: 12px 22px; border-radius: 12px;
  font-size: 15px; z-index: 999; opacity: 0; pointer-events: none; transition: opacity .15s, transform .15s;
}
.toast.show { opacity: 1; transform: translate(-50%, -50%) scale(1); }

/* ===================== 登录 ===================== */
#view-login { min-height: 100%; display: none; }
#view-login.active { display: flex; align-items: center; justify-content: center; padding: 24px; }
.login-wrap { width: 100%; max-width: 420px; }
.hero { text-align: center; margin-bottom: 28px; }
.hero-title { font-size: 32px; font-weight: 700; color: #1565c0; letter-spacing: 3px; }
.hero-sub { margin-top: 8px; font-size: 14px; color: #8a94a6; }
.login-card { padding: 28px 24px; }
.label { font-size: 14px; color: #5b6472; margin-bottom: 12px; }
.code-input {
  width: 100%; height: 60px; background: #f3f5f9; border: none; border-radius: 12px;
  text-align: center; font-size: 30px; letter-spacing: 12px; font-weight: 700; color: #1f2933;
  outline: none; padding-left: 12px;
}
.code-input::placeholder { letter-spacing: 2px; font-weight: 400; color: #b6bdc8; }
.err { margin-top: 12px; color: #e53935; font-size: 13px; min-height: 18px; }
.enter-btn {
  width: 100%; margin-top: 16px; height: 52px; background: #1565c0; color: #fff; border: none;
  font-size: 18px; border-radius: 12px; cursor: pointer; font-weight: 600;
}
.enter-btn:disabled { opacity: 0.6; cursor: default; }
.tip { margin-top: 16px; font-size: 12px; color: #aab2bf; text-align: center; }
.legend { margin-top: 28px; display: flex; justify-content: center; gap: 10px; }
.chip { padding: 6px 16px; border-radius: 999px; font-size: 13px; color: #fff; }
.chip-food { background: #43a047; }
.chip-water { background: #1e88e5; }
.chip-gold { background: #f5b301; color: #5b4500; }
.chip-war { background: #e53935; }

/* ===================== 学员（手机竖屏友好）===================== */
.stu-wrap { max-width: 560px; margin: 0 auto; padding: 14px; }
.head { display: flex; align-items: center; padding: 16px 18px; }
.head-left { flex: 1; }
.head-label { font-size: 12px; color: #8a94a6; }
.head-name { font-size: 24px; font-weight: 700; color: #1f2933; margin-top: 3px; }
.head-code {
  font-size: 14px; font-weight: 700; color: #1565c0; background: #e8f0fb;
  padding: 4px 12px; border-radius: 999px; letter-spacing: 2px; margin-right: 12px;
}
.logout { font-size: 13px; color: #8a94a6; padding: 6px; cursor: pointer; }
.hint { margin: 12px 4px 14px; font-size: 12px; color: #8a94a6; line-height: 1.6; }

.table { padding: 0; overflow: hidden; }
.t-head, .t-row { display: flex; align-items: stretch; }
.t-head {
  background: #f3f5f9; font-size: 13px; color: #5b6472; font-weight: 600;
}
.t-head .c-year, .t-head .c-econ, .t-head .c-north { padding: 12px 0; text-align: center; }
.c-year { width: 80px; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.c-econ { flex: 1; display: flex; align-items: center; justify-content: center; padding: 9px; }
.c-north { flex: 1; display: flex; align-items: center; justify-content: center; padding: 9px; }
.t-row { border-top: 1px solid #eef1f6; }
.t-row.locked { background: #fafbfc; }
.year-txt { font-size: 15px; font-weight: 600; color: #1f2933; }
.lock-tag { font-size: 10px; color: #e53935; margin-top: 3px; }

.econ-cell, .north-cell {
  width: 100%; min-height: 44px; border-radius: 10px; display: flex; align-items: center;
  justify-content: center; gap: 4px; font-size: 15px; font-weight: 600; cursor: pointer;
}
.arrow { font-size: 11px; opacity: 0.8; }
.e-none { background: #f0f2f6; color: #9aa3b2; }
.e-east { background: #43a047; color: #fff; }
.e-south { background: #1e88e5; color: #fff; }
.e-west { background: #f5b301; color: #5b4500; }
.north-cell { font-size: 14px; }
.north-cell.joined { background: #e53935; color: #fff; }
.north-cell.unjoined { background: #f0f2f6; color: #9aa3b2; }
.locked .econ-cell, .locked .north-cell { opacity: 0.55; cursor: default; }
.loading { text-align: center; padding: 30px; color: #9aa3b2; font-size: 13px; }

/* 经济联盟弹层 */
.mask {
  position: fixed; inset: 0; background: rgba(0,0,0,0.45);
  display: flex; align-items: flex-end; z-index: 50;
}
.mask[hidden] { display: none; }
.picker {
  width: 100%; max-width: 560px; margin: 0 auto; background: #fff;
  border-radius: 18px 18px 0 0; padding: 18px 18px calc(18px + env(safe-area-inset-bottom));
}
.picker-title { text-align: center; font-size: 14px; color: #8a94a6; margin-bottom: 14px; }
.picker-opt {
  height: 52px; border-radius: 12px; display: flex; align-items: center; justify-content: center;
  font-size: 17px; font-weight: 700; margin-bottom: 12px; cursor: pointer;
}
.opt-east { background: #43a047; color: #fff; }
.opt-south { background: #1e88e5; color: #fff; }
.opt-west { background: #f5b301; color: #5b4500; }
.picker-cancel {
  height: 52px; border-radius: 12px; background: #f0f2f6; color: #5b6472;
  display: flex; align-items: center; justify-content: center; font-size: 16px; cursor: pointer;
}

/* ===================== 讲师（16:9 横屏投影）===================== */
/* 设计稿 1280×720，整体等比缩放铺满视口，保证标准 16:9 观感 */
#view-teacher { width: 100%; height: 100%; background: #0f1115; }
#view-teacher.active { display: flex; align-items: center; justify-content: center; }
.stage-fit { width: 100vw; height: 100vh; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.stage {
  width: 1280px; height: 720px; flex: none; background: #eef1f6;
  padding: 24px 28px; transform-origin: center center;
}

.topbar { display: flex; align-items: center; margin-bottom: 14px; }
.topbar-title { flex: 1; font-size: 26px; font-weight: 700; color: #1f2933; }

.years { display: flex; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.year-tab {
  padding: 10px 22px; background: #fff; border-radius: 10px; font-size: 16px; color: #5b6472;
  border: 2px solid #e3e8f0; display: flex; align-items: center; gap: 5px; cursor: pointer;
}
.year-tab.active { background: #1565c0; color: #fff; border-color: #1565c0; }
.year-tab.locked { border-color: #f3b9b7; }
.year-tab.active.locked { background: #1565c0; }
.yt-lock { font-size: 14px; }

.t-main { display: flex; gap: 20px; align-items: flex-start; }
.t-table { flex: 1; padding: 0; overflow: hidden; }
.t-side { width: 360px; flex: none; }

.t-table .t-head { display: flex; }
.th { flex: 1; padding: 12px 4px; text-align: center; color: #fff; }
.th-title { font-size: 15px; line-height: 1.3; font-weight: 600; }
.th-sub { font-size: 13px; opacity: 0.92; margin-top: 3px; }
.th-east { background: #43a047; }
.th-south { background: #1e88e5; }
.th-west { background: #f5b301; color: #5b4500; }
.th-north { background: #e53935; }
.th-min { box-shadow: inset 0 -5px 0 #b71c1c; }

.t-table .t-row { display: flex; border-top: 1px solid #eef1f6; min-height: 44px; }
.t-table .td {
  flex: 1; display: flex; align-items: center; justify-content: center;
  font-size: 16px; color: #1f2933; border-right: 1px solid #eef1f6; padding: 4px;
}
.t-table .td:last-child { border-right: none; }
.td-north { color: #c62828; }

/* 右侧勾选标记列 */
.th-mark {
  flex: none; width: 72px; background: #5b6472;
  display: flex; align-items: center; justify-content: center; font-size: 15px; font-weight: 600;
}
.t-table .td-mark { flex: none; width: 72px; }
.markbox {
  width: 28px; height: 28px; border: 2px solid #c2c9d4; border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: #fff; font-weight: 700; font-size: 18px; line-height: 1;
}
.markbox.checked { background: #1565c0; border-color: #1565c0; }

.namebox { padding: 5px 12px; border-radius: 8px; font-size: 16px; line-height: 1.2; }
.name-red { background: #e53935; color: #fff; font-weight: 700; }

.summary { display: flex; padding: 14px 0; margin-bottom: 10px; }
.sum-item {
  flex: 1; text-align: center; font-size: 15px; color: #5b6472; border-right: 1px solid #eef1f6;
}
.sum-item:last-child { border-right: none; }
.sum-item span { display: block; font-size: 26px; font-weight: 700; color: #1f2933; margin-top: 2px; }
.sum-min, .sum-min span { color: #e53935; }
.sum-north span { color: #e53935; }
.min-note { font-size: 14px; color: #8a94a6; margin: 0 4px 18px; }

.actions { margin-top: 8px; }
.btn {
  width: 100%; height: 52px; font-size: 18px; border-radius: 12px; color: #fff;
  border: none; cursor: pointer; font-weight: 600;
}
.btn-confirm { background: #1565c0; }
.btn-unlock { background: #fff; color: #e53935; border: 2px solid #e53935; }
.locked-banner { text-align: center; color: #e53935; font-size: 16px; margin-bottom: 12px; }
.reset-link { text-align: center; margin-top: 22px; font-size: 14px; color: #b6bdc8; cursor: pointer; }
