/* ==========================================================================
   队伍编排 · 网页版样式
   配色沿用小程序：墨绿 #2f6f63 / 深墨绿 #1f3b34 / 米白 #f4f5f1
   ========================================================================== */

:root {
  --bg: #f4f5f1;
  --panel: #ffffff;
  --ink: #1f2421;
  --ink-2: #4a544f;
  --muted: #8a938f;
  --line: #e9ede8;
  --line-strong: #dde4de;
  --brand: #2f6f63;
  --brand-dark: #1f3b34;
  --brand-soft: #eef4f1;
  --warn: #c0392b;
  --warn-soft: #fdeeee;
  --gold: #b8860b;
  --radius: 18px;
  --shadow-sm: 0 1px 2px rgba(31, 59, 52, 0.04);
  --shadow: 0 1px 2px rgba(31, 59, 52, 0.03), 0 12px 28px -18px rgba(31, 59, 52, 0.45);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Noto Sans SC", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3,
h4,
p,
ul,
ol {
  margin: 0;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
}

input,
select,
textarea {
  font: inherit;
  color: inherit;
}

svg {
  display: block;
}

::selection {
  background: rgba(47, 111, 99, 0.18);
}

/* ---------------- 布局骨架 ---------------- */

.app {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  flex: 0 0 246px;
  width: 246px;
  height: 100vh;
  padding: 26px 16px 22px;
  display: flex;
  flex-direction: column;
  gap: 28px;
  color: #d8e5df;
  background: radial-gradient(120% 80% at 0% 0%, #2a5148 0%, #1d3a33 45%, #162c26 100%);
  overflow-y: auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 8px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: linear-gradient(145deg, #f4e3bd, #d8b872);
  color: #26382f;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 0.5px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.22);
}

.brand-name {
  font-size: 16.5px;
  font-weight: 600;
  letter-spacing: 0.3px;
  color: #fff;
}

.brand-sub {
  font-size: 11.5px;
  color: #9db4ab;
  letter-spacing: 1.4px;
  margin-top: 1px;
}

.side-nav {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.side-nav a {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 13px;
  border-radius: 11px;
  color: #aec5bc;
  font-size: 14.5px;
  transition: background 0.16s ease, color 0.16s ease;
}

.side-nav a svg {
  width: 18px;
  height: 18px;
  opacity: 0.85;
}

.side-nav a:hover {
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
}

.side-nav a.active {
  background: rgba(255, 255, 255, 0.13);
  color: #fff;
  font-weight: 600;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.side-nav a.active svg {
  opacity: 1;
}

.side-foot {
  margin-top: auto;
  padding: 0 6px;
}

.side-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 13px;
  border-radius: 11px;
  border: 1px dashed rgba(255, 255, 255, 0.2);
  color: #cfe0d9;
  font-size: 13.5px;
  transition: 0.16s ease;
}

.side-link:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.34);
}

.side-arrow {
  opacity: 0.7;
}

.side-note {
  margin-top: 12px;
  font-size: 11.5px;
  line-height: 1.6;
  color: #7f9a90;
}

.main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 15px 34px;
  background: rgba(244, 245, 241, 0.86);
  backdrop-filter: saturate(1.2) blur(12px);
  -webkit-backdrop-filter: saturate(1.2) blur(12px);
  border-bottom: 1px solid rgba(31, 59, 52, 0.07);
}

.topbar-left {
  display: flex;
  align-items: baseline;
  gap: 12px;
  min-width: 0;
}

.topbar h1 {
  font-size: 19px;
  font-weight: 650;
  letter-spacing: -0.2px;
  color: var(--brand-dark);
  white-space: nowrap;
}

.topbar-sub {
  font-size: 12.5px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.local-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--line-strong);
  font-size: 12px;
  color: var(--ink-2);
  white-space: nowrap;
}

.local-chip i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #4caf88;
  box-shadow: 0 0 0 3px rgba(76, 175, 136, 0.15);
}

.icon-btn {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: #fff;
  border: 1px solid var(--line-strong);
  color: var(--brand);
  transition: 0.16s ease;
}

.icon-btn:hover {
  background: var(--brand-soft);
  border-color: rgba(47, 111, 99, 0.35);
}

.icon-btn svg {
  width: 16px;
  height: 16px;
}

.view-root {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 24px 34px 64px;
}

.view {
  animation: rise 0.24s ease both;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* ---------------- 通用组件 ---------------- */

.card {
  background: var(--panel);
  border: 1px solid rgba(31, 59, 52, 0.07);
  border-radius: var(--radius);
  padding: 20px 22px;
  box-shadow: var(--shadow);
  margin-bottom: 16px;
}

.card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.card-head h2 {
  font-size: 15.5px;
  font-weight: 650;
  color: var(--brand-dark);
  letter-spacing: 0.1px;
}

.card-head .sub {
  font-size: 12.5px;
  color: var(--muted);
}

.card-head .link {
  font-size: 12.5px;
  color: var(--brand);
  cursor: pointer;
}

.card-head .link:hover {
  text-decoration: underline;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  align-items: start;
}

.grid-2 > .card {
  margin-bottom: 16px;
}

.muted {
  color: var(--muted);
}

.hint {
  margin-top: 12px;
  font-size: 12.5px;
  line-height: 1.65;
  color: var(--muted);
}

.hint.tight {
  margin-top: 8px;
}

.divider {
  height: 1px;
  background: var(--line);
  margin: 16px 0;
}

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 38px;
  padding: 0 17px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  border: 1px solid transparent;
  transition: transform 0.12s ease, background 0.16s ease, box-shadow 0.16s ease, opacity 0.16s;
}

.btn:active {
  transform: translateY(1px);
}

.btn svg {
  width: 15px;
  height: 15px;
}

.btn.primary {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 6px 16px -8px rgba(47, 111, 99, 0.9);
}

.btn.primary:hover {
  background: #2a6357;
}

.btn.ghost {
  background: #fff;
  border-color: var(--line-strong);
  color: var(--brand);
}

.btn.ghost:hover {
  background: var(--brand-soft);
  border-color: rgba(47, 111, 99, 0.32);
}

.btn.soft {
  background: var(--brand-soft);
  color: var(--brand);
}

.btn.soft:hover {
  background: #e3eee9;
}

.btn.warn {
  background: var(--warn-soft);
  color: var(--warn);
}

.btn.warn:hover {
  background: #fbe2e0;
}

.btn.block {
  width: 100%;
}

.btn[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.btn-row .btn {
  flex: 1;
}

.btn-row.auto .btn {
  flex: 0 0 auto;
}

/* 标签 */
.tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 11.5px;
  line-height: 1.55;
  font-weight: 500;
  white-space: nowrap;
}

.tag-tank {
  background: #fbf3e0;
  color: #9a6f0b;
}

.tag-heal {
  background: #e6f5ec;
  color: #1f7a52;
}

.tag-dps {
  background: #fdeceb;
  color: #b03a2e;
}

.tag-support {
  background: #e9eff8;
  color: #3d5f8f;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 500;
  background: #f2f5f2;
  color: var(--ink-2);
}

.pill.ok {
  background: #e8f5ee;
  color: #1f7a52;
}

.pill.warn {
  background: var(--warn-soft);
  color: var(--warn);
}

.pill.gold {
  background: #fbf3e0;
  color: #9a6f0b;
}

/* 头像 */
.avatar {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(145deg, #eaf2ee, #d5e6de);
  color: #2f6f63;
  font-size: 15px;
  font-weight: 600;
}

.avatar.sm {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  font-size: 12.5px;
}

/* 输入 */
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field > label,
.field-label {
  font-size: 12.5px;
  color: var(--ink-2);
  font-weight: 500;
}

.input,
.select,
.textarea {
  width: 100%;
  min-height: 40px;
  padding: 9px 12px;
  border-radius: 10px;
  border: 1px solid var(--line-strong);
  background: #fff;
  font-size: 14px;
  color: var(--ink);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.input::placeholder,
.textarea::placeholder {
  color: #b3bbb7;
}

.input:focus,
.select:focus,
.textarea:focus {
  border-color: rgba(47, 111, 99, 0.5);
  box-shadow: 0 0 0 3px rgba(47, 111, 99, 0.1);
}

.select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 34px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 4.5 6 8l3.5-3.5' fill='none' stroke='%238a938f' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 11px center;
  background-size: 12px;
}

.textarea {
  min-height: 120px;
  resize: vertical;
  line-height: 1.6;
}

/* 分段控件 / chips */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.chip {
  padding: 5px 13px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: #fff;
  color: var(--ink-2);
  font-size: 13px;
  transition: 0.15s ease;
}

.chip:hover {
  border-color: rgba(47, 111, 99, 0.4);
  color: var(--brand);
}

.chip.on {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
  font-weight: 600;
}

.chip.mini {
  padding: 3px 10px;
  font-size: 12px;
}

/* 进度条 */
.bar-row {
  display: grid;
  grid-template-columns: 74px 1fr 82px;
  align-items: center;
  gap: 12px;
  padding: 7px 0;
}

.bar-label {
  font-size: 13px;
  color: var(--ink-2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bar-track {
  display: block;
  height: 8px;
  border-radius: 999px;
  background: #f0f3ef;
  overflow: hidden;
}

.bar-fill {
  display: block;
  height: 100%;
  border-radius: 999px;
  transition: width 0.45s cubic-bezier(0.22, 0.9, 0.3, 1);
  min-width: 3px;
}

.bar-val {
  text-align: right;
  font-size: 12.5px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

/* 开关 */
.switch {
  position: relative;
  display: inline-block;
  width: 42px;
  height: 24px;
  flex: 0 0 auto;
}

.switch input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
  z-index: 2;
}

.switch .track {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: #dfe5e1;
  transition: background 0.18s ease;
}

.switch .track::after {
  content: "";
  position: absolute;
  left: 3px;
  top: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(20, 40, 33, 0.25);
  transition: transform 0.18s cubic-bezier(0.3, 0.8, 0.4, 1.2);
}

.switch input:checked + .track {
  background: var(--brand);
}

.switch input:checked + .track::after {
  transform: translateX(18px);
}

.switch input:focus-visible + .track {
  box-shadow: 0 0 0 3px rgba(47, 111, 99, 0.2);
}

/* 空状态 */
.empty {
  padding: 40px 16px;
  text-align: center;
  color: var(--muted);
  font-size: 13.5px;
}

.empty strong {
  display: block;
  color: var(--ink-2);
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 6px;
}

.empty .btn-row {
  max-width: 320px;
  margin: 18px auto 0;
}

/* ---------------- 概览 ---------------- */

.hero {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 26px;
  flex-wrap: wrap;
  padding: 26px 28px;
  border-radius: 22px;
  color: #fff;
  background: linear-gradient(135deg, #1f3b34 0%, #2c5f54 55%, #35796b 100%);
  box-shadow: 0 18px 40px -22px rgba(31, 59, 52, 0.85);
  margin-bottom: 18px;
}

.hero::after {
  content: "";
  position: absolute;
  right: -70px;
  top: -90px;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.16), transparent 66%);
  pointer-events: none;
}

.hero::before {
  content: "";
  position: absolute;
  left: 42%;
  bottom: -120px;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(216, 184, 114, 0.14), transparent 68%);
  pointer-events: none;
}

.hero-body {
  position: relative;
  z-index: 1;
  min-width: 0;
}

.hero-kicker {
  font-size: 11.5px;
  letter-spacing: 2.4px;
  color: rgba(255, 255, 255, 0.6);
  text-transform: uppercase;
}

.hero-title {
  font-size: 26px;
  font-weight: 650;
  letter-spacing: -0.4px;
  margin: 6px 0 5px;
  word-break: break-word;
}

.hero-sub {
  font-size: 13.5px;
  color: rgba(255, 255, 255, 0.76);
}

.hero-pill {
  display: inline-block;
  margin-top: 12px;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.18);
  font-size: 12.5px;
  color: #eaf3ef;
}

.hero-stats {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(4, minmax(58px, auto));
  gap: 4px;
}

.hero-stat {
  padding: 4px 16px;
  text-align: center;
  border-left: 1px solid rgba(255, 255, 255, 0.15);
}

.hero-stat:first-child {
  border-left: none;
}

.hero-stat b {
  display: block;
  font-size: 28px;
  font-weight: 650;
  line-height: 1.2;
  letter-spacing: -0.6px;
  font-variant-numeric: tabular-nums;
}

.hero-stat span {
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.65);
}

/* 周时段 */
.day-list {
  display: flex;
  flex-direction: column;
}

.day-row {
  display: grid;
  grid-template-columns: 96px 1fr 62px;
  align-items: center;
  gap: 12px;
  padding: 8px 8px;
  margin: 0 -8px;
  border-radius: 9px;
  cursor: pointer;
  transition: background 0.15s;
}

.day-row:hover {
  background: #f7f9f6;
}

.day-row.is-active {
  background: var(--brand-soft);
}

.day-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-2);
  white-space: nowrap;
}

.day-row.is-active .day-name {
  color: var(--brand);
  font-weight: 600;
}

.day-time {
  margin-left: 6px;
  font-size: 11.5px;
  color: var(--muted);
  font-weight: 400;
}

.day-time.empty {
  color: #c2c9c5;
}

.day-count {
  text-align: right;
  font-size: 12.5px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.day-row.best .day-count {
  color: var(--gold);
  font-weight: 600;
}

.day-row.best .bar-fill {
  background: linear-gradient(90deg, #d8b872, #b8860b) !important;
}

.alert-card {
  border-color: rgba(192, 57, 43, 0.16);
  background: linear-gradient(180deg, #fffafa, #fff);
}

.alert-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14.5px;
  font-weight: 600;
  color: #a3352a;
}

.alert-title .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--warn);
  box-shadow: 0 0 0 3px rgba(192, 57, 43, 0.12);
}

.alert-body {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

/* ---------------- 报名名单 ---------------- */

.view-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.view-head h2 {
  font-size: 20px;
  font-weight: 650;
  color: var(--brand-dark);
  letter-spacing: -0.2px;
}

.view-head p {
  margin-top: 3px;
  font-size: 13px;
  color: var(--muted);
}

.head-actions {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
}

.toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.search {
  position: relative;
  flex: 1 1 220px;
  max-width: 340px;
}

.search svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 15px;
  height: 15px;
  color: #a7b1ac;
}

.search .input {
  padding-left: 34px;
}

/* 团队成员：卡片网格（列表太长，改成一屏能扫完的卡片） */
.member-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(238px, 1fr));
  gap: 12px;
}

.member-grid > .empty {
  grid-column: 1 / -1;
  background: #fff;
  border: 1px solid rgba(31, 59, 52, 0.07);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 30px 18px;
}

.member-card {
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 13px 14px 11px;
  background: #fff;
  border: 1px solid rgba(31, 59, 52, 0.07);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: 0.15s;
}

.member-card:hover {
  border-color: rgba(47, 111, 99, 0.3);
  box-shadow: 0 6px 18px rgba(31, 59, 52, 0.09);
  transform: translateY(-1px);
}

.mc-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mc-id {
  flex: 1;
  min-width: 0;
}

.mc-name {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mc-school {
  margin-top: 1px;
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mc-tags {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}

.mc-power {
  font-size: 12.5px;
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}

.mc-power.dim,
.mc-days.dim {
  color: #a9b8b0;
}

.mc-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 16px;
  padding-top: 8px;
  border-top: 1px dashed #eef2ee;
  font-size: 11.8px;
  color: #8fa39a;
}

.mc-days {
  flex: 0 0 auto;
}

.mc-note {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #a08b5f;
}

.m-main {
  flex: 1;
  min-width: 0;
}

.m-title {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}

.m-name {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--ink);
}

.m-badge {
  font-size: 10.5px;
  padding: 1px 6px;
  border-radius: 5px;
  background: var(--brand-soft);
  color: var(--brand);
  font-weight: 500;
}

.m-meta {
  margin-top: 2px;
  font-size: 12.5px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.m-days {
  margin-top: 1px;
  font-size: 12px;
  color: #8fa39a;
}

.m-right {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 0 0 auto;
}

.m-power {
  font-size: 12.5px;
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
  min-width: 62px;
  text-align: right;
}

.m-edit {
  font-size: 12.5px;
  color: var(--brand);
  padding: 4px 8px;
  border-radius: 7px;
}

.m-edit:hover {
  background: var(--brand-soft);
}

/* ---------------- 编排 ---------------- */

.day-bar {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.slot-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 9px 14px;
  border-radius: 10px;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 13px;
  margin-bottom: 14px;
}

.slot-line .count {
  color: #4d7c70;
  font-size: 12.5px;
}

.cfg-card {
  padding: 0;
  overflow: hidden;
}

.cfg-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 20px;
  cursor: pointer;
  user-select: none;
}

.cfg-bar:hover {
  background: #fafbf9;
}

.cfg-left {
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-width: 0;
}

.cfg-lab {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--brand-dark);
  white-space: nowrap;
}

.cfg-val {
  font-size: 12.5px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cfg-link {
  font-size: 12.5px;
  color: var(--brand);
  white-space: nowrap;
}

.need-panel {
  padding: 0 20px 18px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.preset-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.preset {
  padding: 5px 12px;
  border-radius: 8px;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 12.5px;
  font-weight: 500;
}

.preset:hover {
  background: #e2eee9;
}

.preset-tip {
  font-size: 12px;
  color: var(--muted);
}

.need-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  border-top: 1px dashed #f0f3ef;
}

.need-row:first-of-type {
  border-top: none;
}

.need-left {
  display: flex;
  align-items: center;
  gap: 9px;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.need-role {
  font-size: 13.5px;
  color: var(--ink-2);
}

.stepper {
  display: flex;
  align-items: center;
  gap: 2px;
  background: #f6f8f5;
  border-radius: 9px;
  padding: 2px;
}

.step-btn {
  width: 28px;
  height: 26px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  font-size: 15px;
  color: var(--brand);
  line-height: 1;
}

.step-btn:hover {
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.step-val {
  min-width: 26px;
  text-align: center;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.act-row {
  margin: 14px 0 18px;
}

.act-row .btn {
  height: 42px;
}

.pend-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.pend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px 5px 12px;
  border-radius: 999px;
  border: 1px dashed #d7dfd9;
  background: #fbfcfa;
  font-size: 12.5px;
  color: var(--ink-2);
  cursor: pointer;
  transition: 0.15s;
}

.pend-item:hover {
  border-color: rgba(47, 111, 99, 0.45);
  background: var(--brand-soft);
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
  gap: 16px;
}

.team-card {
  height: 100%;
  background: #fff;
  border: 1px solid rgba(31, 59, 52, 0.07);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.team-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 15px 18px 12px;
  border-bottom: 1px solid #f2f5f2;
}

.team-title {
  display: flex;
  align-items: center;
  gap: 8px;
}

.team-name {
  font-size: 15px;
  font-weight: 650;
  color: var(--brand-dark);
}

.team-power {
  font-size: 12px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.team-gap {
  padding: 7px 18px;
  font-size: 12px;
  color: #a3352a;
  background: #fef7f6;
  border-bottom: 1px solid #fbeeec;
}

.team-body {
  padding: 6px 0 8px;
}

.tm-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 18px;
  cursor: pointer;
  transition: background 0.14s;
}

.tm-row:hover {
  background: #fafbf9;
}

.tm-main {
  flex: 1;
  min-width: 0;
}

.tm-line1 {
  display: flex;
  align-items: center;
  gap: 6px;
}

.tm-name {
  font-size: 13.5px;
  font-weight: 500;
}

.leader-tag {
  font-size: 10px;
  padding: 0 5px;
  border-radius: 4px;
  background: #fbf3e0;
  color: #9a6f0b;
  line-height: 1.6;
  font-weight: 600;
}

.tm-sub {
  display: block;
  font-size: 11.5px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.team-empty {
  padding: 22px 18px;
  text-align: center;
  color: #b3bbb7;
  font-size: 12.5px;
}

/* ---------------- 设置 ---------------- */

.settings-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 16px;
  align-items: start;
}

.form-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 0;
  border-bottom: 1px dashed #f0f3ef;
}

.form-row:last-child {
  border-bottom: none;
}

.form-row > .field-label {
  flex: 0 0 96px;
  font-size: 13px;
  color: var(--ink-2);
}

.form-row .input {
  flex: 1;
}

.week-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 7px 0;
}

.week-row .day-name {
  flex: 0 0 48px;
}

.week-row .input {
  flex: 1;
  min-height: 36px;
  padding: 6px 11px;
  font-size: 13.5px;
}

.school-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px dashed #f0f3ef;
}

.school-name {
  flex: 1;
  font-size: 13.5px;
}

.school-row .select {
  width: 92px;
  min-height: 32px;
  padding: 4px 26px 4px 9px;
  font-size: 12.5px;
}

.school-del {
  font-size: 12px;
  color: var(--muted);
  padding: 4px 6px;
  border-radius: 6px;
}

.school-del:hover {
  color: var(--warn);
  background: var(--warn-soft);
}

.add-row {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.add-row .input {
  min-height: 36px;
}

.add-row .btn {
  height: 36px;
  padding: 0 14px;
}

.data-actions {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.data-actions .btn {
  justify-content: flex-start;
  width: 100%;
}

.foot-note {
  margin-top: 26px;
  text-align: center;
  font-size: 11.5px;
  color: #b0b9b4;
  letter-spacing: 0.4px;
}

/* ---------------- 导入 ---------------- */

.segmented {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 3px;
  padding: 3px;
  border-radius: 11px;
  background: #eef1ec;
  margin-bottom: 16px;
}

.segmented button {
  padding: 6px 15px;
  border-radius: 9px;
  font-size: 13px;
  color: var(--ink-2);
  transition: 0.15s;
}

.segmented button:hover {
  color: var(--brand);
}

.segmented button.on {
  background: #fff;
  color: var(--brand);
  font-weight: 600;
  box-shadow: var(--shadow-sm);
}

.dropzone {
  display: block;
  padding: 30px 20px;
  text-align: center;
  border: 1.5px dashed #cfdad3;
  border-radius: 14px;
  background: #fafcf9;
  cursor: pointer;
  transition: 0.16s;
}

.dropzone:hover,
.dropzone.dragover {
  border-color: rgba(47, 111, 99, 0.55);
  background: var(--brand-soft);
}

.dropzone strong {
  display: block;
  font-size: 14px;
  color: var(--brand-dark);
  margin-bottom: 4px;
}

.dropzone span {
  font-size: 12.5px;
  color: var(--muted);
}

.preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin: 16px 0 10px;
  font-size: 13px;
  color: var(--ink-2);
}

.preview-wrap {
  max-height: 320px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
}

table.preview {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}

table.preview th {
  position: sticky;
  top: 0;
  background: #f7f9f6;
  text-align: left;
  font-weight: 600;
  color: var(--ink-2);
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
  z-index: 1;
}

table.preview td {
  padding: 7px 12px;
  border-bottom: 1px solid #f4f6f3;
  color: var(--ink-2);
  white-space: nowrap;
}

table.preview tr:last-child td {
  border-bottom: none;
}

/* 分队预览：队名弱化，名字可直接编辑 */
table.preview.roster td {
  padding: 5px 10px;
}

table.preview.roster td.col-team {
  color: #8a9490;
  font-size: 12px;
  white-space: nowrap;
}

.cell-input {
  width: 100%;
  max-width: 300px;
  min-width: 132px;
  height: 30px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-size: 13px;
  font-family: inherit;
}

.cell-input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(47, 111, 99, 0.12);
}

.icon-btn.danger {
  color: #b03a2e;
}

.icon-btn.danger:hover {
  background: #fdecea;
}

/* 识别原文折叠区 */
.ocr-raw {
  margin-top: 14px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fafbf9;
}

.ocr-raw summary {
  cursor: pointer;
  font-size: 12.5px;
  color: var(--ink-2);
  user-select: none;
  list-style: none;
}

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

.ocr-raw summary::before {
  content: '▸ ';
  color: #9aa5a0;
}

.ocr-raw[open] summary::before {
  content: '▾ ';
}

.ocr-raw summary:hover {
  color: var(--brand);
}

.import-options {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.check {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  color: var(--ink-2);
  cursor: pointer;
}

.check input {
  width: 15px;
  height: 15px;
  accent-color: var(--brand);
}

/* ---------------- 报名填写 ---------------- */

.join-wrap {
  max-width: 560px;
  margin: 0 auto;
}

.join-head {
  text-align: center;
  margin-bottom: 18px;
}

.join-head h2 {
  font-size: 22px;
  font-weight: 650;
  color: var(--brand-dark);
  letter-spacing: -0.2px;
}

.join-head p {
  margin-top: 5px;
  font-size: 13px;
  color: var(--muted);
}

.join-form .form-row {
  align-items: flex-start;
  padding: 12px 0;
}

.join-form .form-row > .field-label {
  padding-top: 10px;
}

.join-form .form-row > div {
  flex: 1;
}

.day-picks {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.code-box {
  padding: 14px;
  border-radius: 12px;
  background: #f7f9f6;
  border: 1px dashed #d3ddd6;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12.5px;
  line-height: 1.7;
  word-break: break-all;
  color: var(--brand-dark);
  margin-bottom: 14px;
}

.done-box {
  text-align: center;
  padding: 18px 0 8px;
}

.done-icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 12px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #e8f5ee;
  color: #1f7a52;
  font-size: 24px;
}

.done-title {
  font-size: 17px;
  font-weight: 650;
  color: var(--brand-dark);
}

.done-sub {
  margin-top: 5px;
  font-size: 13px;
  color: var(--muted);
}

/* ---------------- 弹层 / 提示 ---------------- */

body.is-modal {
  overflow: hidden;
}

.modal-mask {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(18, 30, 26, 0.42);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  animation: fade 0.16s ease both;
}

@keyframes fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.modal {
  width: min(520px, 100%);
  max-height: 88vh;
  overflow-y: auto;
  background: #fff;
  border-radius: 20px;
  padding: 22px 24px;
  box-shadow: 0 30px 70px rgba(10, 25, 20, 0.32);
  animation: pop 0.2s cubic-bezier(0.2, 0.9, 0.3, 1.15) both;
}

@keyframes pop {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 4px;
}

.modal-head h3 {
  font-size: 17px;
  font-weight: 650;
  color: var(--brand-dark);
}

.modal-close {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1;
}

.modal-close:hover {
  background: #f3f5f2;
  color: var(--ink);
}

.modal-sub {
  font-size: 12.5px;
  color: var(--muted);
  margin-bottom: 16px;
}

.modal-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.modal-section {
  margin: 14px 0 6px;
}

.modal-section .label {
  font-size: 12.5px;
  color: var(--muted);
  margin-bottom: 8px;
}

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

.move-grid button {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--line-strong);
  background: #fff;
  font-size: 13px;
  color: var(--ink-2);
  text-align: left;
  transition: 0.15s;
}

.move-grid button:hover {
  border-color: rgba(47, 111, 99, 0.45);
  color: var(--brand);
  background: var(--brand-soft);
}

.move-grid button[disabled] {
  opacity: 0.42;
  cursor: not-allowed;
}

.modal-foot {
  display: flex;
  gap: 9px;
  margin-top: 18px;
}

.modal-foot .btn {
  flex: 1;
}

.modal-note {
  padding: 12px 14px;
  border-radius: 10px;
  background: #f7f9f6;
  font-size: 12.5px;
  line-height: 1.65;
  color: var(--ink-2);
}

.modal-note.warn {
  background: #fef6f5;
  color: #8f3329;
}

/* 腾讯文档导入的三步说明 */
ol.steps {
  margin: 14px 0 0;
  padding: 0 0 0 4px;
  list-style: none;
  counter-reset: step;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

ol.steps li {
  position: relative;
  padding-left: 30px;
  font-size: 12.8px;
  line-height: 1.6;
  color: var(--ink-2);
  counter-increment: step;
}

ol.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 1px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #e7efe9;
  color: var(--brand);
  font-size: 11.5px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

ol.steps li b {
  color: var(--ink);
}

#toast-root {
  position: fixed;
  left: 50%;
  top: 22px;
  transform: translateX(-50%);
  z-index: 120;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  pointer-events: none;
}

.toast {
  padding: 9px 18px;
  border-radius: 999px;
  background: rgba(27, 46, 39, 0.94);
  color: #fff;
  font-size: 13px;
  box-shadow: 0 10px 28px rgba(15, 30, 24, 0.28);
  animation: toast-in 0.22s ease both;
  max-width: 78vw;
  text-align: center;
}

.toast.warn {
  background: #a3352a;
}

.toast.out {
  animation: toast-out 0.2s ease both;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(-8px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes toast-out {
  to {
    opacity: 0;
    transform: translateY(-6px);
  }
}

/* 底部导航（仅移动端） */
.tabbar {
  display: none;
}

/* ---------------- 响应式 ---------------- */

@media (max-width: 1080px) {
  .team-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 980px) {
  .sidebar {
    display: none;
  }

  .topbar {
    padding: 13px 20px;
  }

  .view-root {
    padding: 20px 20px 96px;
  }

  .settings-grid,
  .grid-2 {
    grid-template-columns: 1fr;
  }

  .tabbar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 60;
    display: flex;
    padding: 7px 6px calc(7px + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-top: 1px solid rgba(31, 59, 52, 0.08);
  }

  .tabbar a {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 3px 0;
    font-size: 11px;
    color: #8a938f;
  }

  .tabbar a svg {
    width: 20px;
    height: 20px;
  }

  .tabbar a.active {
    color: var(--brand);
    font-weight: 600;
  }
}

@media (max-width: 720px) {
  .member-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 9px;
  }

  .member-card {
    padding: 11px 11px 9px;
  }

  .mc-name {
    font-size: 13.5px;
  }

  .hero {
    padding: 20px;
    border-radius: 18px;
  }

  .hero-title {
    font-size: 21px;
  }

  .hero-stats {
    width: 100%;
    grid-template-columns: repeat(4, 1fr);
    margin-top: 4px;
  }

  .hero-stat {
    padding: 2px 6px;
  }

  .hero-stat b {
    font-size: 22px;
  }

  .card {
    padding: 16px 16px;
    border-radius: 15px;
  }

  .member-row {
    padding: 12px 14px;
    gap: 10px;
  }

  .m-right {
    gap: 8px;
  }

  .m-power {
    display: block;
    min-width: 0;
    font-size: 11.5px;
    color: var(--muted);
  }

  .m-edit {
    display: none;
  }

  .bar-row {
    grid-template-columns: 58px 1fr 70px;
    gap: 9px;
  }

  .day-row {
    grid-template-columns: 82px 1fr 52px;
    gap: 8px;
  }

  .day-time {
    display: none;
  }

  .view-head h2 {
    font-size: 18px;
  }

  .head-actions .btn {
    height: 36px;
    padding: 0 13px;
    font-size: 13px;
  }

  .search {
    max-width: none;
    flex-basis: 100%;
  }

  .modal-mask {
    place-items: end center;
    padding: 0;
  }

  .modal {
    width: 100%;
    max-height: 92vh;
    border-radius: 20px 20px 0 0;
    padding: 20px 18px calc(20px + env(safe-area-inset-bottom));
    animation: sheet-up 0.24s cubic-bezier(0.2, 0.9, 0.3, 1) both;
  }

  @keyframes sheet-up {
    from {
      transform: translateY(100%);
    }
    to {
      transform: none;
    }
  }

  .topbar-sub {
    display: none;
  }

  .view-root {
    padding: 16px 14px 96px;
  }

  .btn-row {
    gap: 8px;
  }

  .team-card {
    border-radius: 15px;
  }

  .preview-wrap {
    max-height: 260px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}
