:root {
  --bg: #e7ebf0;
  --bg-2: #f4f6f8;
  --panel: #ffffff;
  --panel-2: #f7f9fb;
  --line: #d5dce4;
  --ink: #2a333c;
  --muted: #5d6975;
  --faint: #8a94a0;
  --blue: #1d6fe8;
  --blue-2: #e7f0fd;
  --green: #1a9b5c;
  --green-2: #e5f6ee;
  --red: #d23b3b;
  --red-2: #fdecec;
  --gray: #6b7682;
  --shadow: 0 12px 32px rgba(42, 51, 60, 0.08);
  /* 英文走 Arial；中文缺字回落到 Noto Sans SC */
  --font: Arial, "Noto Sans SC", "Noto Sans CJK SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-family: var(--font);
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--ink); }
body {
  background-image:
    radial-gradient(900px 420px at 0% -10%, rgba(29, 111, 232, 0.12), transparent 55%),
    radial-gradient(700px 360px at 100% 0%, rgba(26, 155, 92, 0.1), transparent 50%);
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--blue); }

.login-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}
.desk-frame.has-dock .login-wrap {
  flex: 1 1 auto;
  min-height: 0;
  height: auto;
}
.login-card {
  width: min(920px, 100%);
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 0;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.login-side {
  padding: 42px 40px;
  color: #fff;
  background: linear-gradient(165deg, #1d6fe8 0%, #1877c9 58%, #1a9b5c 140%);
}
.login-side p { color: rgba(255, 255, 255, 0.9); }
.login-side .hint { color: rgba(255, 255, 255, 0.78); }
.brand-mark {
  display: flex;
  gap: 12px;
  align-items: center;
  color: var(--blue);
  letter-spacing: 0.14em;
  font-size: 13px;
  font-weight: 700;
}
.login-side .brand-mark { color: #fff; }
.lamp {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(26, 155, 92, 0.25);
}
.login-side .lamp { background: #fff; box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.25); }
.login-side h1 { font-size: 40px; line-height: 1.15; margin: 22px 0 10px; }
.login-side p { line-height: 1.7; }
.course-part { margin-bottom: 12px; }
.lesson-link { flex: 1; text-align: left; background: transparent; border: 0; padding: 0; color: var(--ink); }
.lesson-link:hover { color: var(--blue); }
.login-form { padding: 42px 36px; background: var(--panel); }
.login-form h2 { margin: 0 0 8px; }
.hint { color: var(--faint); font-size: 13px; line-height: 1.6; }
.accounts { display: grid; gap: 8px; margin: 18px 0 8px; }
.accounts button, .ghost, .primary, .danger, .amber {
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--bg-2);
  padding: 10px 12px;
  text-align: left;
}
.accounts button:hover, .ghost:hover { border-color: #b7c3d0; background: #fff; }
.primary { background: var(--blue); border-color: transparent; color: #fff; font-weight: 700; }
.primary:hover { background: #165dcc; }
.amber { background: var(--green); border-color: transparent; color: #fff; font-weight: 700; }
.amber:hover { background: #15864f; }
.danger { background: var(--red-2); color: var(--red); border-color: #f0b4b4; font-weight: 700; }
.ghost { background: #fff; color: var(--gray); }
.stack { display: grid; gap: 8px; }
label span, .field-label { display: block; color: var(--muted); font-size: 13px; margin-bottom: 6px; }
input, select, textarea {
  width: 100%;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  outline: none;
}
textarea { min-height: 110px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(29, 111, 232, 0.15); }
input[type="range"] { padding: 8px 0; accent-color: var(--blue); }
.form-error { color: var(--red); min-height: 1.2em; font-size: 14px; }

.shell { display: grid; grid-template-columns: 206px 1fr; min-height: 100vh; }
.desk-frame.has-dock {
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}
.desk-frame.has-dock .shell {
  flex: 1 1 auto;
  min-height: 0;
  height: auto;
  align-items: stretch;
  grid-template-rows: minmax(0, 1fr);
}
.desk-frame.has-dock .side {
  position: relative;
  top: auto;
  height: auto;
  max-height: none;
}
.desk-frame.has-dock .main {
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
  padding-bottom: 16px;
  overflow: auto;
}
.desk-frame.has-dock .main:has(.home-lower) {
  padding-bottom: 0;
  overflow: hidden;
}
.desk-frame.has-dock .home-top { flex: none; }
.desk-frame.has-dock .home-lower {
  flex: 1 1 auto;
  min-height: 0;
  align-items: stretch;
}
.desk-frame.has-dock .home-lessons,
.desk-frame.has-dock .home-activity {
  height: auto;
  max-height: none;
  min-height: 0;
  overflow: auto;
}
.status-dock {
  flex: 0 0 2em;
  height: 2em;
  min-height: 0;
  display: flex;
  align-items: center;
  padding: 0 16px;
  border-top: 1px solid var(--line);
  background: #f7f9fb;
  color: var(--muted);
  font-size: 14px;
  line-height: 1;
  overflow: hidden;
}
.status-static {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
}
.status-marquee {
  width: 100%;
  overflow: hidden;
  white-space: nowrap;
}
.status-marquee span {
  display: inline-block;
  padding-left: 100%;
  animation: status-scroll 18s linear infinite;
}
@keyframes status-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-100%); }
}
.side {
  border-right: 1px solid var(--line);
  background: #f7f9fb;
  padding: 10px 6px;
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.side nav { display: grid; gap: 0; margin-top: 8px; flex: none; }
.side .nav-group { margin: 4px 0 2px; }
.side .nav-group-title {
  padding: 8px 12px 4px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.side .nav-group-items { display: grid; gap: 0; }
.side .nav-group-items button {
  padding-left: 22px;
  font-size: 14px;
}
.announce-form {
  display: grid;
  gap: 8px;
  max-width: 640px;
}
.announce-form h3 { margin: 0 0 4px; font-size: 16px; }
.announce-line {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 8px 10px;
  align-items: end;
}
.announce-form label span { margin-bottom: 4px; font-size: 12px; }
.announce-form input,
.announce-form select,
.announce-form textarea {
  padding: 6px 8px;
  border-radius: 8px;
}
.announce-form textarea {
  min-height: 88px;
  width: 100%;
}
.announce-actions {
  display: flex;
  gap: 6px;
  justify-content: flex-start;
}
.announce-actions .primary,
.announce-actions .ghost {
  padding: 6px 14px;
  flex: none;
  white-space: nowrap;
}
@media (max-width: 720px) {
  .announce-form { max-width: none; }
  .announce-line { grid-template-columns: 1fr; }
}
.user-form {
  margin: 0 0 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.user-form h3 { margin: 0 0 8px; font-size: 16px; }
.user-form-line {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr)) auto;
  gap: 8px 10px;
  align-items: end;
  max-width: 920px;
}
.user-form-line label span {
  margin-bottom: 4px;
  font-size: 12px;
}
.user-form-line input,
.user-form-line select {
  padding: 6px 8px;
  border-radius: 8px;
}
.user-form-class { grid-column: 1 / 3; }
.user-form-actions {
  display: flex;
  align-items: end;
}
.user-form-actions .primary {
  padding: 6px 14px;
  white-space: nowrap;
}
@media (max-width: 980px) {
  .user-form-line {
    grid-template-columns: 1fr 1fr;
    max-width: none;
  }
  .user-form-class,
  .user-form-actions { grid-column: 1 / -1; }
}
.class-hub-tabs {
  margin: 0 0 12px;
  gap: 6px;
}
.class-hub-tabs .ghost {
  padding: 6px 14px;
  font-size: 14px;
}
.class-hub-tabs .ghost.on {
  background: var(--blue);
  color: #fff;
  border-color: var(--blue);
  font-weight: 700;
}
.class-hub-body > .card:first-child { margin-top: 0; }
.side-ladder {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  overflow: auto;
  flex: 1;
  min-height: 0;
}
.side-foot { margin-top: auto; flex: none; display: grid; justify-items: start; gap: 8px; width: 100%; padding: 10px 4px 0; }
.side-logo { width: 152px; height: 152px; border-radius: 10px; overflow: hidden; background: #fff; border: 1px solid var(--line); position: relative; display: grid; place-items: center; }
.side-logo img, .side-logo svg { width: 144px; height: 144px; object-fit: contain; display: block; }
.side-logo-edit { position: absolute; left: 0; right: 0; bottom: 0; margin: 0; text-align: center; font-size: 11px; line-height: 1.6; background: rgba(255, 255, 255, 0.94); color: var(--blue); cursor: pointer; }
.side-version { width: 100%; text-align: center; font-size: 12px; color: var(--muted); }
.side-version form { display: flex; gap: 4px; align-items: center; }
.side-version input { width: auto; flex: 1; min-width: 0; padding: 4px 6px; text-align: center; }
.side-version button { flex: none; width: auto; padding: 4px 8px; text-align: center; }
.side-ladder h2 { font-size: 14px; margin: 0 8px 6px; }
.side-ladder .row { flex-wrap: nowrap; padding: 5px 4px; gap: 4px; margin: 2px 0; border-bottom: 0; border-radius: 8px; font-size: 12px; }
.side-ladder .row.copy { background: var(--green-2); }
.side-ladder .row.send { background: var(--red-2); }
.side-ladder .row > span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-ladder .tag { flex: none; padding: 1px 5px; font-size: 11px; }
.home-lower { align-items: start; margin-top: 0; }
.home-lessons { overflow-y: auto; }
.home-lessons button.lesson-line,
.home-lessons .lesson-line {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.home-lessons .lesson-line.locked { color: var(--faint); cursor: default; }
.lesson-status {
  flex: none;
  border: 0;
  background: none;
  padding: 0;
  border-radius: 0;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}
.lesson-status.ok { color: var(--green); }
.lesson-status.bad { color: var(--red); }
.home-activity { overflow-x: hidden; }
.home-activity h2 .faint { margin-left: 6px; font-size: 13px; font-weight: 400; }
.home-activity .row {
  display: grid;
  grid-template-columns: max-content minmax(0, max-content) minmax(0, 1fr) max-content;
  column-gap: 12px;
  align-items: center;
  width: 100%;
  font-size: 13px;
  text-align: left;
}
.home-activity .row span,
.home-activity .row b {
  display: block;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: left;
  font-variant-numeric: tabular-nums;
}
.activity-detail { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 16px; }
.activity-detail span { display: block; color: var(--faint); font-size: 12px; }
.activity-detail .ghost, .activity-detail .faint { grid-column: 1 / -1; margin: 4px 0 0; }
.modal {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(42, 51, 60, 0.38);
}
.modal-card {
  width: min(520px, 100%);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 0;
  box-shadow: var(--shadow);
  padding: 16px 18px 18px;
}
.modal-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; }
.modal-head h2 { margin: 0; font-size: 18px; }
.lesson-group { margin-top: 8px; }
.lesson-group .faint { font-size: 12px; margin-top: 8px; }
button.lesson-line {
  display: block;
  width: 100%;
  text-align: left;
  background: transparent;
  border: 0;
  border-bottom: 1px solid #e6ebf0;
  padding: 8px 0;
  color: var(--ink);
}
button.lesson-line:hover { color: var(--blue); }
.side button {
  text-align: left;
  background: transparent;
  border: 0;
  color: var(--muted);
  border-radius: 10px;
  padding: 3px 10px;
}
.side button:hover { background: var(--blue-2); color: var(--blue); }
.side button.active { background: var(--blue); color: #fff; }
.side button.locked { color: var(--faint); }
.side button.locked.active { color: #fff; }
.practice-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
.practice-choice.locked { opacity: 0.72; }
.desk-nav { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.desk-nav button {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 0;
  padding: 8px 16px;
  color: var(--ink);
}
.desk-nav button:hover { border-color: var(--blue); color: var(--blue); }
.desk-nav button.locked { color: var(--faint); }
.home-menu { display: flex; flex-wrap: wrap; gap: 2px; align-items: center; }
.home-menu button {
  flex: 0 0 auto;
  width: 5.625em;
  min-width: 0;
  text-align: center;
  padding: 8px 6px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  border-radius: 10px;
  overflow: hidden;
}
.side nav button {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
}
.side nav kbd,
.lesson-key {
  flex: none;
  font-family: Arial, sans-serif;
  font-size: 11px;
  font-weight: 400;
  line-height: 1;
}
.side button.active kbd { color: #fff; }
.home-lessons .lesson-line.current {
  background: var(--green-2);
  border-radius: 6px;
  padding-left: 8px;
  padding-right: 8px;
}
.home-lessons .lesson-line.current:hover { background: var(--green-2); }
.about-card { margin-bottom: 12px; }
.about-fold { padding-top: 12px; padding-bottom: 12px; }
.about-fold-summary {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  list-style: none;
  user-select: none;
}
.about-fold-summary::-webkit-details-marker { display: none; }
.about-fold-summary::marker { content: ""; }
.about-fold-label {
  flex: 1;
  min-width: 0;
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}
.about-fold-label::before {
  content: "▸ ";
  color: var(--muted);
  font-weight: 700;
}
.about-fold[open] > .about-fold-summary .about-fold-label::before { content: "▾ "; }
.about-fold-summary:hover .about-fold-label { color: var(--blue); }
.about-fold-panel { margin-top: 10px; }
.about-fold-nested {
  margin: 8px 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg-2, #f7f9fb);
  box-shadow: none;
}
.about-fold-nested .about-fold-label { font-size: 16px; }
.about-card h3 { margin: 16px 0 6px; font-size: 16px; }
.about-card .lesson-line { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.about-card .about-tips {
  margin: 8px 0 0;
  padding-left: 1.2em;
  line-height: 1.55;
}
.about-card .about-tips li { margin: 4px 0; }
.about-card table.timing-wpm tr.on {
  background: var(--blue-2);
}
.about-card table.timing-wpm td,
.about-card table.timing-ratio td,
.about-card table.timing-wpm th,
.about-card table.timing-ratio th {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.message-filter { margin: 4px 0 8px; }
.message-filter button.on { background: var(--blue); color: #fff; border-color: var(--blue); }
.message-row { padding: 12px 0; border-bottom: 1px solid #e6ebf0; }
.message-row p { margin: 4px 0; }
.message-meta { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 4px; }
.tag.announcement { color: var(--green); border-color: #b7e4cc; background: var(--green-2); }
.tag.homework { color: #8a5a00; border-color: #f0ddb0; background: #fff7e8; }
.tag.interaction { color: #6b3fa0; border-color: #e0d0f5; background: #f7f1fc; }
.main { padding: 0 6px 16px 0; }
.topbar { display: flex; justify-content: flex-start; gap: 10px; align-items: center; margin-bottom: 16px; position: relative; z-index: 20; }
.top-menus { display: flex; align-items: center; gap: 2px; margin-left: auto; }
.settings-form { display: grid; gap: 8px; margin-top: 8px; max-width: 720px; }
.settings-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
  align-items: end;
}
.settings-form label { display: grid; gap: 4px; }
.settings-form label span { margin-bottom: 0; font-size: 12px; color: var(--muted); }
.settings-form input,
.settings-form select {
  width: 100%;
  padding: 6px 8px;
  border-radius: 8px;
}
.settings-size { width: 120px; }
.settings-align,
.settings-mode { width: 110px; }
.settings-text { width: min(320px, 100%); }
.settings-file { width: min(360px, 100%); }
.settings-check {
  width: auto;
  min-width: 7em;
  align-content: end;
}
.settings-check input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin: 2px 0 6px;
}
.settings-actions {
  display: flex;
  align-items: end;
}
.settings-actions .primary {
  padding: 6px 14px;
  white-space: nowrap;
  flex: none;
}
.settings-form .faint,
.settings-form + .faint { margin: 0; }
.who-line { display: flex; align-items: center; gap: 14px; min-width: 0; flex-wrap: wrap; }
.topbar .home-menu { margin: 0; }
.topbar .home-menu button,
.topbar .account-toggle {
  height: 35.1px;
  padding-top: 0;
  padding-bottom: 0;
  line-height: calc(35.1px - 2px);
  border: 1px solid var(--blue);
  box-sizing: border-box;
}
.topbar .account-toggle { border-radius: 10px; padding-left: 12px; padding-right: 12px; white-space: nowrap; }
.topbar .account-toggle[aria-expanded="true"] { background: var(--blue-2); color: var(--blue); }
.account-menu { position: relative; }
.account-pop {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  z-index: 30;
  display: grid;
  min-width: max(100%, 8.5em);
  padding: 4px;
  background: #fff;
  border: 1px solid var(--blue);
  border-radius: 10px;
  box-shadow: 0 8px 20px rgba(42, 51, 60, 0.12);
}
.account-pop[hidden] { display: none; }
.account-pop button {
  height: 35.1px;
  border: 0;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  text-align: left;
  padding: 0 12px;
  white-space: nowrap;
}
.account-pop button:hover { background: var(--blue-2); color: var(--blue); }
.who { color: var(--muted); font-size: 14px; white-space: nowrap; }
.who b { color: var(--ink); }
.grid-2 { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 16px; }
.grid-2.home-lower { grid-template-columns: minmax(0, 0.84fr) minmax(0, 1.16fr); gap: 0; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 0;
  padding: 16px 18px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8) inset;
}
.card h2, .card h3 { margin: 0 0 8px; }
.card h2 { font-size: 20px; font-weight: 700; color: var(--ink); }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.card-menu-title {
  color: var(--ink);
  font-weight: 700;
  font-size: 16px; /* 相对「最近训练」20px 的 80% */
  line-height: 1.3;
}
.mono, .mono-box { font-family: var(--font); }
.mono-box {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
}
.stat { font-size: 28px; color: var(--blue); font-variant-numeric: tabular-nums; }
.list { display: grid; gap: 10px; }
.row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid #e6ebf0;
}
.row:last-child { border-bottom: 0; }
.tags { display: flex; gap: 6px; flex-wrap: wrap; }
.tag {
  border: 1px solid #c9daf8;
  border-radius: 999px;
  padding: 3px 8px;
  color: var(--blue);
  background: var(--blue-2);
  font-size: 12px;
}
.tag.ok { color: var(--green); border-color: #b7e4cc; background: var(--green-2); }
.tag.warn { color: #1d4e9c; border-color: #c9daf8; background: var(--blue-2); }
.tag.bad { color: var(--red); border-color: #f0b4b4; background: var(--red-2); }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.play-bar { display: grid; gap: 14px; margin: 14px 0; }
.tune-bar { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.tune-bar label { min-width: 0; }
.tune-bar input[type="range"] { width: 100%; min-height: 28px; }
.lesson-body { line-height: 1.75; }
.lesson-body h2 { font-size: 18px; margin: 18px 0 8px; }
.lesson-body table { width: 100%; border-collapse: collapse; margin: 10px 0 16px; }
.lesson-body th, .lesson-body td { border-bottom: 1px solid var(--line); text-align: left; padding: 8px 6px; }
.lesson-figure {
  margin: 16px 0;
  padding: 10px;
  border: 1px solid var(--line);
  background: var(--bg-2);
}
.lesson-figure img {
  display: block;
  width: 100%;
  max-width: 920px;
  height: auto;
  margin: 0 auto;
}
.lesson-figure figcaption {
  margin-top: 8px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}
.video-player {
  display: block;
  width: 100%;
  max-width: 960px;
  max-height: 70vh;
  background: #000;
  border: 1px solid var(--line);
}
.lesson-materials { margin-top: 18px; display: grid; gap: 10px; }
.lesson-material-upload {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.lesson-material-upload h3 { margin: 0 0 6px; font-size: 16px; }
.lesson-material-block {
  padding-top: 10px;
  border-top: 1px solid var(--line);
}
.lesson-material-summary {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  list-style: none;
  user-select: none;
}
.lesson-material-summary::-webkit-details-marker { display: none; }
.lesson-material-summary::marker { content: ""; }
.lesson-material-label {
  flex: 1;
  min-width: 0;
  font-size: 16px;
  font-weight: 700;
  color: var(--blue);
}
.lesson-material-label::before {
  content: "▸ ";
  color: var(--muted);
  font-weight: 700;
}
.lesson-material-block[open] .lesson-material-label::before { content: "▾ "; }
.lesson-material-summary:hover .lesson-material-label { text-decoration: underline; }
.lesson-material-panel { margin-top: 10px; }
.lesson-pdf {
  display: block;
  width: 100%;
  min-height: 70vh;
  border: 1px solid var(--line);
  background: #fff;
}
.lesson-audio { width: 100%; max-width: 640px; }
.lesson-material-image {
  margin: 0;
  border: 1px solid var(--line);
  background: var(--bg-2);
  padding: 8px;
}
.lesson-material-image img {
  display: block;
  width: 100%;
  height: auto;
}
.bars { display: grid; gap: 8px; }
.bar { height: 8px; background: #e6ebf0; border-radius: 99px; overflow: hidden; }
.bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--blue), var(--green)); }
.chars { display: flex; flex-wrap: wrap; gap: 3px; }
.home-top { display: grid; grid-template-columns: minmax(210px, 0.72fr) minmax(0, 1.85fr); gap: 0; align-items: stretch; }
.home-side { display: grid; grid-template-rows: 1fr 1fr; gap: 0; align-content: stretch; height: 100%; min-height: 0; }
.home-side .card { display: flex; flex-direction: column; justify-content: space-between; padding: 8px 10px; min-height: 0; }
.home-side-line { display: flex; align-items: baseline; gap: 8px; font-size: 16px; font-weight: 700; line-height: 1.2; }
.home-side-line .stat { font-size: 16px; line-height: 1.2; font-weight: 700; }
.home-side button { padding: 6px 10px; margin-top: 6px; align-self: flex-start; }
.home-progress {
  position: relative;
  padding: 0;
  min-height: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
}
.home-progress-fit {
  position: static;
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  padding: 8px 12px 10px;
  overflow: hidden;
  container-type: size;
  container-name: home-progress;
}
.home-progress-title { display: flex; align-items: baseline; gap: 10px; margin-bottom: 4px; flex: none; flex-wrap: wrap; }
.home-progress-title .faint,
.home-progress-title .stat,
.home-progress-title .next { font-size: 16px; line-height: 1.2; font-weight: 700; }
.home-progress-next { width: 100%; max-width: 100%; margin-bottom: 8px; flex: none; }
.home-progress-next .bar { width: 100%; height: 10px; }
.home-progress .stat { line-height: 1; }
.home-progress .chars {
  flex: 1 1 auto;
  align-self: stretch;
  width: 100%;
  max-width: 100%;
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(13, minmax(0, 1fr));
  grid-template-rows: repeat(3, minmax(0, 1fr));
  gap: clamp(3px, 0.8cqi, 8px);
}
.home-progress .char,
.home-progress .char b {
  font-family: Arial, Helvetica, sans-serif;
}
.home-progress .char {
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: clamp(4px, 0.6cqi, 8px);
  box-shadow: none;
  background: #f4f7fa;
  font-weight: 400;
  font-size: clamp(18px, 5.2cqmin, 36px);
  line-height: 1;
  overflow: hidden;
}
.home-progress .char b {
  font-weight: 400;
}
.home-progress .char.new { position: relative; z-index: 1; background: var(--green-2); color: var(--green); }
.home-progress .char.lock { opacity: 1; color: #a3adb8; background: #f4f7fa; cursor: default; }
.home-progress button.char {
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  color: inherit;
  text-align: center;
}
.home-progress button.char.jump:hover {
  border-color: var(--blue);
  background: var(--blue-2);
  color: var(--blue);
}
.home-progress button.char.jump.new:hover {
  border-color: var(--green);
  background: var(--green-2);
  color: var(--green);
}
.char {
  width: 46px;
  height: 52px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  display: grid;
  place-items: center;
  line-height: 1.1;
  color: var(--ink);
  font-weight: 700;
}
.char small { display: none; }
.char.new { border-color: var(--green); background: var(--green-2); color: var(--green); }
.char.lock { opacity: 0.4; color: var(--faint); }
.hear-chars { margin-top: 16px; }
.hear-chars .char {
  width: 64px;
  height: 64px;
  font-size: 22px;
  cursor: pointer;
}
.hear-chars .char:hover { border-color: var(--blue); color: var(--blue); background: var(--blue-2); }
.hear-chars .char.on { background: var(--blue); color: #fff; border-color: var(--blue); }
.table-wrap { overflow: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: 14px; }
table.data th, table.data td { border-bottom: 1px solid var(--line); text-align: left; padding: 8px 6px; vertical-align: top; }
table.data tr.pick { cursor: pointer; }
table.data tr.pick:hover, table.data tr.pick.on, table.data tr.on { background: var(--blue-2); }
table.data.manage-records.dragging { user-select: none; }
table.data.manage-records tr.pick.selected {
  background: #d7e8fc;
  box-shadow: inset 3px 0 0 var(--blue);
}
.manage-batch-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 12px 0 8px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--blue-2);
}
.manage-batch-bar[hidden] { display: none; }
.manage-batch-bar button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.manage-check-cell {
  width: 2.2em;
  text-align: center;
  vertical-align: middle;
}
.manage-check-cell input {
  width: 16px;
  height: 16px;
  margin: 0;
  cursor: pointer;
}
.manage-ctx {
  position: fixed;
  z-index: 90;
  min-width: 168px;
  padding: 4px;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
  list-style: none;
}
.manage-ctx button {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  padding: 8px 12px;
  border-radius: 6px;
  color: var(--red);
  font-weight: 700;
}
.manage-ctx button:hover { background: var(--red-2); }
.card.flat { box-shadow: none; background: var(--bg-2); margin: 0; }
.detail-meta { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 16px; margin: 12px 0; }
.detail-meta span { display: block; color: var(--faint); font-size: 12px; }
#record-detail { margin-top: 18px; }
.page-tools { display: flex; gap: 12px; align-items: end; justify-content: space-between; flex-wrap: wrap; }
.export-bar { display: flex; gap: 8px; align-items: center; }
.export-preview-modal { z-index: 60; align-items: start; padding-top: 24px; overflow: auto; }
.export-preview-card {
  width: min(980px, 100%);
  max-height: calc(100vh - 48px);
  display: flex;
  flex-direction: column;
  padding: 14px 16px 16px;
}
.export-preview-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.export-preview-body {
  overflow: auto;
  flex: 1;
  min-height: 0;
  padding: 16px;
  background: #cfd6de;
  border: 1px solid var(--line);
}
.pdf-preview-paper,
#print-preview-paper {
  position: relative;
  margin: 0 auto;
  background: #fff;
  box-shadow: 0 8px 28px rgba(20, 30, 40, 0.18);
  box-sizing: border-box;
  color: #111;
}
.pdf-preview-paper #export-preview-sheet,
#print-preview-paper #export-preview-sheet {
  position: relative;
  margin-top: 0;
  width: 100%;
  max-width: 100%;
  min-height: 100%;
  box-sizing: border-box;
  padding-bottom: 2.4em;
  overflow-x: visible;
}
#print-preview-paper .train-attempt,
#print-preview-paper .train-body,
#print-preview-paper .slice-block,
#export-preview-sheet .train-attempt,
#export-preview-sheet .train-body,
#export-preview-sheet .slice-block,
#record-detail-print .train-attempt,
#record-detail-print .train-body,
#record-detail-print .slice-block {
  min-width: 0;
  max-width: 100%;
}
/* 打印预览紧凑行距，尽量把 12 次训练收进一页 */
.print-compact .report-head { margin-bottom: 6px; }
.print-compact .report-system { margin: 0; font-size: 20px; }
.print-compact .report-banner { margin-bottom: 4px; }
.print-compact .report-title { margin: 0; font-size: 15.6px; }
.print-compact .report-stats { margin: 4px 0; }
.print-compact .report-dash { margin: 6px 0 5px; }
.print-compact .train-attempt { margin: 3px 0; gap: 4px 8px; }
.print-compact .train-sep { margin: 6px 0; }
.print-compact .slice-block { margin: 0 0 2px; gap: 1px 6px; }
.print-compact .train-no { font-size: 16px; }
.print-compact .report-abstract { margin-top: 0; }
.print-compact .report-miss-list { line-height: 1.25; }
/* 页脚在纸张 flex 列末尾，margin-top:auto 贴底 */
#print-preview-paper {
  display: flex;
  flex-direction: column;
}
#print-preview-paper > .report-foot,
.pdf-preview-paper > .report-foot {
  position: relative;
  margin: 0;
  margin-top: auto;
  box-sizing: border-box;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-top: 6px;
  border-top: 1px solid #222;
  font-size: 12px;
  color: var(--muted);
  background: #fff;
  flex-shrink: 0;
  width: 100%;
  z-index: 5;
}
button.card { text-align: left; width: 100%; }
button.link-card:hover { border-color: var(--blue); }
.chart { width: 100%; height: auto; display: block; }
.chart line { stroke: #d5dce4; stroke-width: 1; }
.chart text { fill: #8a94a0; font-size: 11px; }
.chart text.accuracy-tick { fill: #1a9b5c; }
.chart text.speed-tick { fill: #1d6fe8; }
.chart polyline { fill: none; stroke: #1d6fe8; stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.chart circle { fill: #1d6fe8; }
.chart polyline.accuracy { stroke: #1a9b5c; }
.chart circle.accuracy { fill: #1a9b5c; }
.chart polyline.speed { stroke: #1d6fe8; }
.records-title { display: flex; align-items: center; justify-content: flex-start; gap: 12px; margin-bottom: 8px; flex-wrap: wrap; }
.records-title h2 { margin: 0; margin-right: auto; display: flex; align-items: center; }
.records-title .records-bar { margin-left: 8px; }
.records-bar { display: flex; gap: 8px; align-items: center; }
.records-bar button { flex: none; width: auto; padding-left: 12px; padding-right: 12px; }
.date-pick { position: relative; }
.date-face {
  width: 9.2em;
  height: 32px;
  line-height: 30px;
  padding: 0 8px;
  text-align: left;
  background: #fff;
  color: var(--ink);
  font-weight: 400;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.date-pop {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  z-index: 40;
  width: 252px;
  padding: 8px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.date-nav { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.date-nav button { width: 28px; height: 28px; padding: 0; line-height: 26px; text-align: center; }
.date-week, .date-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; text-align: center; }
.date-week { color: var(--muted); font-size: 12px; margin-bottom: 4px; }
.date-grid button {
  position: relative;
  height: 30px;
  padding: 0;
  line-height: 30px;
  background: transparent;
  color: var(--ink);
  font-weight: 400;
  border: 0;
  box-shadow: none;
}
.date-grid button.on { background: transparent; color: var(--blue); font-weight: 700; }
.date-grid button.has-record::after {
  content: "";
  position: absolute;
  right: 3px;
  bottom: 3px;
  width: 5px;
  height: 5px;
  background: var(--red);
}
.records-bar input,
.records-bar button,
.records-days button {
  height: 32px;
  box-sizing: border-box;
  padding-top: 0;
  padding-bottom: 0;
  line-height: 30px;
}
.records-title .records-stats {
  display: grid;
  grid-template-columns: repeat(3, 148px);
  gap: 8px;
  margin: 0;
  width: auto;
  align-self: stretch;
}
.records-title .records-stats .card {
  height: 100%;
  padding: 0 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}
.records-title .records-stats .faint,
.records-title .records-stats .stat { margin: 0; line-height: 1; font-size: 14px; }
.records-title .records-stats .stat { font-size: 16px; }
.chart-legend { display: flex; gap: 14px; align-items: center; margin: 12px 0 4px; font-size: 13px; }
.chart-legend i { display: inline-block; width: 18px; height: 3px; margin-right: 6px; vertical-align: middle; }
.chart-legend i.speed { background: #1d6fe8; }
.chart-legend i.accuracy { background: #1a9b5c; }
button.row { width: 100%; background: transparent; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; }
.roster { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 4px 12px; }
.roster label { display: flex; gap: 8px; align-items: center; white-space: nowrap; }
.assign-form { display: grid; gap: 6px; }
.assign-lead { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.35; }
.assign-form input[name="title"][readonly] { background: var(--bg-2); color: var(--ink); }
.assign-line, .assign-split, .assign-metrics { display: grid; gap: 6px 8px; align-items: end; }
.assign-line { grid-template-columns: minmax(120px, 0.85fr) minmax(96px, 0.65fr) minmax(180px, 1.45fr) minmax(160px, 1.25fr); }
.assign-form[data-audience="progress"] .assign-line { grid-template-columns: minmax(108px, 0.85fr) minmax(88px, 0.6fr) 64px 64px minmax(150px, 1.25fr) minmax(140px, 1.15fr); }
.assign-form .only-progress { display: none; }
.assign-form[data-audience="progress"] .only-progress { display: block; }
.assign-split { grid-template-columns: 1fr 1fr; }
.assign-metrics { grid-template-columns: minmax(68px, 0.7fr) minmax(78px, 0.85fr) minmax(100px, 1.15fr) 58px 62px 62px 64px minmax(112px, 0.95fr); }
.assign-form label span { margin-bottom: 2px; font-size: 12px; }
.assign-form input, .assign-form select, .assign-form textarea { padding: 6px 8px; }
.assign-form textarea { min-height: 34px; resize: vertical; }
.assign-form .faint { margin: 0; font-size: 12px; line-height: 1.35; }
.assign-form .actions .primary { flex: 1; }
.assign-list { margin-top: 12px; }
.assign-list .actions { flex-wrap: nowrap; }
.assign-list .actions button { padding: 6px 10px; white-space: nowrap; }
.class-form { display: grid; gap: 8px; max-width: 960px; }
.class-line {
  display: grid;
  grid-template-columns: minmax(120px, 1.1fr) 110px minmax(140px, 1.3fr) auto;
  gap: 8px 10px;
  align-items: end;
}
.class-form[data-admin="1"] .class-line {
  grid-template-columns: minmax(120px, 1fr) 110px minmax(140px, 1.2fr) minmax(100px, 0.85fr) auto;
}
.class-form label span { margin-bottom: 4px; font-size: 12px; }
.class-form input, .class-form select { padding: 6px 8px; border-radius: 8px; }
.class-form-actions {
  display: flex;
  gap: 6px;
  align-items: end;
  flex-wrap: nowrap;
}
.class-form-actions .primary,
.class-form-actions .ghost {
  padding: 6px 14px;
  white-space: nowrap;
  flex: none;
}
.class-form [hidden] { display: none !important; }
.class-list { margin-top: 12px; }
.class-list .actions { flex-wrap: nowrap; }
.class-list .actions button, .member-line button.danger { padding: 6px 10px; white-space: nowrap; }
.member-line { display: flex; gap: 8px; align-items: center; justify-content: space-between; margin: 4px 0; }
.member-line .member-open {
  flex: 1;
  min-width: 0;
  text-align: left;
  white-space: normal;
  line-height: 1.35;
}
.class-open { font: inherit; }
table.data tr.roster-focus td { background: var(--blue-2); }
button.text-link {
  background: transparent;
  border: 0;
  padding: 0;
  color: var(--blue);
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}
button.text-link:hover { text-decoration: underline; }
.assign-detail-head { display: flex; justify-content: space-between; gap: 12px; align-items: center; margin-top: 16px; }
.assign-detail-head h3, .assign-copy h3 { margin: 0 0 6px; }
.assign-copy { margin-top: 14px; }
#assignment-detail { border-top: 1px solid var(--line); margin-top: 12px; }
.assign-form [hidden] { display: none !important; }
.serial-box { margin: 12px 0; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg-2); }
.serial-box h3 { margin: 0 0 6px; }
.serial-box select { min-width: 120px; }
.controls { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.playhead {
  min-height: 74px;
  border-radius: 14px;
  background: var(--blue-2);
  border: 1px dashed #b9cff5;
  display: grid;
  place-items: center;
  color: var(--blue);
  letter-spacing: 0.08em;
}
.segment-bar.card { padding: 10px 14px; }
.segment-bar-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 14px; margin-bottom: 8px; }
.segment-bar h2 { margin: 0; font-size: 18px; }
.segment-bar .faint { margin: 0; }
.segment-tabs-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
}
.segment-tabs { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.segment-tabs button { padding: 6px 12px; border-radius: 8px; }
.practice-meta-inline {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  min-width: 0;
}
.practice-meta-inline .tags { display: inline-flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.practice-meta-head { margin: 0; white-space: nowrap; }
.group-gap-ctl {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  min-width: 0;
  flex: none;
}
.group-gap-ctl span { white-space: nowrap; font-size: 13px; }
.group-gap-ctl input.group-gap-ms {
  width: 4.6em;
  padding: 4px 6px;
  margin: 0;
  text-align: center;
}
.runner.card { padding: 10px 14px; }
.runner > p { margin: 2px 0 4px; }
.runner-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 10px; }
.runner-top.play-row { justify-content: flex-start; margin: 0; }
.runner-top .faint { margin: 0; }
.runner-top .practice-meta-inline { margin-right: auto; }
.runner-result { margin-top: 14px; padding-top: 10px; border-top: 1px solid var(--line); }
.runner-result h3 { margin: 0 0 4px; }
.slice-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 8px 0; }
.slice-count { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }
.slice-count input { width: 3.2em; padding: 4px 6px; }
/* 左列：播放按钮 / 小段号；右列：频率与音量垂直对齐 */
.runner-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: min(920px, 100%);
}
.runner-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 320px);
  gap: 8px 14px;
  align-items: center;
  width: 100%;
}
.runner-controls > .actions {
  grid-column: 1;
  grid-row: 1;
  justify-self: start;
}
.runner-controls > .tune-freq {
  grid-column: 2;
  grid-row: 1;
}
.runner-controls > .slice-row {
  grid-column: 1;
  grid-row: 2;
  justify-self: start;
}
.runner-controls > .slice-row-empty { visibility: hidden; min-height: 1px; }
.runner-controls > .tune-vol {
  grid-column: 2;
  grid-row: 2;
}
.runner-body > .runner-board {
  min-width: 0;
  width: 100%;
}
.runner .playhead {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  min-height: calc(2 * 1.45em + 18px);
  margin: 0;
  padding: 8px 12px;
  font-size: 14px;
  line-height: 1.45;
  letter-spacing: 0;
  text-align: center;
  white-space: normal;
}
.runner .tune-line {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  margin: 0;
  width: 100%;
  min-width: 0;
  max-width: none;
  box-sizing: border-box;
}
/* 等宽标签 + 左对齐，使「频率」「音量」左缘垂直对齐，并紧挨右侧滑块 */
.runner .tune-line > span {
  display: inline-block;
  flex: 0 0 6.8em;
  width: 6.8em;
  margin: 0;
  white-space: nowrap;
  color: var(--ink);
  line-height: 1.2;
  font-size: 1em;
  font-weight: 400;
  text-align: left;
}
.runner .tune-line input[type="range"] {
  flex: 0 0 150px;
  width: 150px;
  min-width: 150px;
  max-width: 150px;
  box-sizing: border-box;
  padding: 0;
  min-height: 22px;
  margin: 0;
}
.runner .write-tip {
  margin: 0;
  font-size: 12px;
  line-height: 1.35;
}
.runner-write {
  display: grid;
  grid-template-columns: minmax(52ch, 62%) auto;
  gap: 10px 12px;
  align-items: stretch;
  justify-content: start;
  max-width: min(920px, 100%);
}
.runner-write.sliced {
  grid-template-columns: minmax(52ch, 72%) auto;
  align-items: stretch;
}
.runner .copy-box {
  box-sizing: border-box;
  width: 100%;
  min-width: 52ch;
  min-height: 148px;
  height: 168px;
  resize: vertical;
  font-size: 16px;
  letter-spacing: 0.04em;
  padding: 8px 10px;
  line-height: 1.35;
  white-space: pre-wrap;
}
/* 输入外框拉高，底部与左侧栏可视区域底部对齐 */
.slice-answer-board {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: 320px;
  height: calc(100vh - 360px);
  max-height: calc(100vh - 300px);
  overflow: auto;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  min-width: 52ch;
  box-sizing: border-box;
}
.desk-frame.has-dock .slice-answer-board {
  height: calc(100dvh - 2em - 340px);
  max-height: calc(100dvh - 2em - 280px);
}
.slice-answer-row {
  display: grid;
  grid-template-columns: 3.2em 1fr;
  gap: 6px;
  align-items: center;
  margin: 0;
  padding: 2px 4px;
  border-radius: 4px;
}
.slice-answer-row.on {
  background: var(--green-2);
  outline: 1px solid var(--green);
}
.slice-answer-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
}
.slice-answer {
  width: 100%;
  box-sizing: border-box;
  font-size: 15px;
  letter-spacing: 0.04em;
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
}
.slice-answer:focus {
  border-color: var(--blue);
  outline: none;
}
.runner-write .write-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  min-width: 0;
}
.runner-write .write-actions .primary,
.runner-write .write-actions .ghost {
  min-height: 44px;
  padding: 8px 14px;
  width: 100%;
  box-sizing: border-box;
}
.runner-write .write-tip {
  margin: 0;
  font-size: 12px;
  line-height: 1.35;
  max-width: none;
}
.relisten-menu {
  position: relative;
  display: inline-block;
}
.relisten-menu > summary {
  list-style: none;
  cursor: pointer;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  padding: 10px 12px;
  color: var(--gray);
  user-select: none;
}
.relisten-menu > summary::-webkit-details-marker { display: none; }
.relisten-menu[open] > summary {
  border-color: var(--blue);
  color: var(--blue);
  background: var(--blue-2);
}
.relisten-menu-panel {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}
.relisten-menu > .relisten-menu-panel {
  position: absolute;
  left: 0;
  top: calc(100% + 4px);
  z-index: 20;
  min-width: 200px;
  padding: 8px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow);
  flex-direction: column;
}
.relisten-menu-panel button {
  width: 100%;
  text-align: left;
  white-space: nowrap;
}
.submit-preview-actions {
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.submit-preview-actions .preview-relisten-btn {
  white-space: nowrap;
  border: 1px solid var(--blue);
  background: var(--blue-2);
  color: var(--blue);
  font-weight: 600;
}
.submit-preview-actions .preview-relisten-btn:hover {
  background: var(--blue);
  color: #fff;
}
.submit-preview-modal { z-index: 70; align-items: start; padding-top: 28px; overflow: auto; }
.submit-preview-card {
  width: min(920px, 100%);
  max-height: calc(100vh - 56px);
  display: flex;
  flex-direction: column;
  padding: 14px 16px 16px;
}
.submit-preview-body {
  overflow: auto;
  flex: 1;
  min-height: 0;
  padding: 8px 4px 12px;
}
.submit-preview-acc {
  margin: 0 0 8px;
  line-height: 1.5;
  font-size: 14px;
}
.submit-preview-acc .acc-avg {
  color: var(--blue);
  font-style: normal;
  font-weight: 700;
  font-size: inherit;
  line-height: inherit;
  vertical-align: baseline;
}
.slice-row { display: flex; flex-wrap: wrap; gap: 4px; margin: 0; }
.slice-row button { min-width: 2em; padding: 4px 8px; }
.slice-row button.on { background: var(--green-2); color: var(--green); border-color: var(--green); font-weight: 700; }
.copy-grid tr.active-seg td,
.copy-grid tr.active-seg th.seg,
.copy-grid tr.pair-orig.active-seg td,
.copy-grid tr.pair-orig.active-seg th.seg,
.copy-grid tr.pair-orig.active-seg + tr.pair-answer td { background: var(--green-2); }
.copy-grid.pair-grid td { white-space: pre; }
.copy-grid i.space { color: transparent; font-style: normal; font-weight: 400; }
.train-attempt {
  display: grid;
  grid-template-columns: 2.2em 1fr;
  gap: 8px 10px;
  align-items: start;
  margin: 8px 0;
}
.train-no {
  font-family: Arial, sans-serif;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--ink);
  text-align: center;
  padding-top: 2px;
}
.train-body { min-width: 0; }
.slice-block {
  display: grid;
  grid-template-columns: 2.8em 1fr;
  grid-template-areas:
    "tag orig"
    "acc ans";
  gap: 2px 8px;
  align-items: start;
  margin: 0 0 6px;
}
.slice-tag {
  grid-area: tag;
  font-family: Arial, sans-serif;
  font-weight: 700;
  color: var(--muted);
  line-height: 1.2;
  padding-top: 1px;
  text-align: center;
}
.slice-tag b { font-weight: 700; color: var(--ink); }
.slice-acc {
  grid-area: acc;
  font-family: Arial, sans-serif;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--blue);
  text-align: center;
  padding-top: 2px;
  white-space: nowrap;
}
.slice-orig { grid-area: orig; min-width: 0; }
.slice-ans { grid-area: ans; min-width: 0; }
.slice-orig,
.slice-ans {
  font-family: Arial, sans-serif;
  letter-spacing: 0.04em;
  line-height: 1.15;
  white-space: pre-wrap;
  word-break: break-all;
}
.slice-orig .grp,
.slice-ans .grp { display: inline-block; margin-right: 0.7em; }
.slice-ans i { font-style: normal; font-weight: 400; }
.slice-ans .ok { color: var(--green); }
.slice-ans .miss { color: var(--blue); }
.slice-ans .bad { color: var(--red); }
.slice-ans i.space { color: transparent; font-style: normal; font-weight: 400; }
.train-sep {
  border: 0;
  border-top: 1px solid #666;
  margin: 12px 0; /* 分割线上下各增 2px，版面更清晰 */
}
#record-detail .train-no,
#export-preview-sheet .train-no,
#record-detail-print .train-no { font-size: 20px; }
#record-detail .slice-orig,
#record-detail .slice-ans,
#export-preview-sheet .slice-orig,
#export-preview-sheet .slice-ans,
#record-detail-print .slice-orig,
#record-detail-print .slice-ans {
  font-size: 17.6px; /* 常规小段；超长段由 inline style 单独缩小 */
  white-space: nowrap;
  word-break: keep-all;
  overflow: visible;
  letter-spacing: 0.03em;
}
#record-detail .slice-orig .grp,
#record-detail .slice-ans .grp,
#export-preview-sheet .slice-orig .grp,
#export-preview-sheet .slice-ans .grp,
#record-detail-print .slice-orig .grp,
#record-detail-print .slice-ans .grp { margin-right: 0.55em; }
#record-detail .slice-tight .slice-orig .grp,
#record-detail .slice-tight .slice-ans .grp,
#export-preview-sheet .slice-tight .slice-orig .grp,
#export-preview-sheet .slice-tight .slice-ans .grp,
#record-detail-print .slice-tight .slice-orig .grp,
#record-detail-print .slice-tight .slice-ans .grp { margin-right: 0.28em; }
#record-detail .slice-tight .slice-orig,
#record-detail .slice-tight .slice-ans,
#export-preview-sheet .slice-tight .slice-orig,
#export-preview-sheet .slice-tight .slice-ans,
#record-detail-print .slice-tight .slice-orig,
#record-detail-print .slice-tight .slice-ans { letter-spacing: 0.01em; }
#record-detail .slice-ans i.ok,
#export-preview-sheet .slice-ans i.ok,
#record-detail-print .slice-ans i.ok { font-weight: 400; font-style: normal; }
#record-detail .slice-ans i.bad,
#export-preview-sheet .slice-ans i.bad,
#record-detail-print .slice-ans i.bad { font-weight: 700; font-style: normal; }
#record-detail .slice-ans i.miss,
#export-preview-sheet .slice-ans i.miss,
#record-detail-print .slice-ans i.miss { font-weight: 400; font-style: normal; }
#record-detail .train-sep,
#export-preview-sheet .train-sep,
#record-detail-print .train-sep { border-top-color: #666; }
.copy-box { font-size: 22px; letter-spacing: 0.06em; min-height: 120px; }
.grid-wrap { overflow-x: auto; position: relative; margin: 6px 0 12px; }
.grid-wrap::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  border-top: 2px solid #666;
  border-left: 2px solid #666;
  box-sizing: border-box;
  pointer-events: none;
}
.copy-grid { width: 100%; border-collapse: separate; border-spacing: 0; table-layout: fixed; margin: 0; font-size: 14px; }
.copy-grid col.seg-col { width: 1.8em; }
.copy-grid td {
  position: relative;
  border: 0;
  padding: 0.28em 3px 0.22em;
  vertical-align: middle;
  line-height: 1;
  text-align: center;
  font-family: Arial, sans-serif;
  letter-spacing: 0.04em;
  word-break: break-all;
  background: #fff;
}
.copy-grid td::after,
.copy-grid th.seg::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  border-right: 2px solid #666;
  border-bottom: 2px solid #666;
  box-sizing: border-box;
  pointer-events: none;
}
.copy-grid th.seg {
  position: relative;
  width: 1.8em;
  border: 0;
  padding: 0.28em 2px 0.22em;
  vertical-align: middle;
  line-height: 1;
  text-align: center;
  font-weight: 400;
  background: #f4f7fa;
  color: var(--ink);
}
.copy-grid td.pad { background: var(--bg-2); }
.copy-grid i { font-style: normal; font-weight: 400; }
.copy-grid .ok, .legend .ok { color: var(--green); }
.copy-grid .miss, .legend .miss { color: var(--blue); }
.copy-grid .bad, .legend .bad { color: var(--red); }
.legend { display: flex; gap: 14px; font-size: 13px; margin: 0 0 6px; }
.legend i { font-style: normal; font-weight: 700; }
.diff i { font-style: normal; padding: 0 1px; }
.diff .ok { color: var(--green); }
.diff .bad, .diff .miss { color: var(--red); background: var(--red-2); }
.diff .extra { color: var(--gray); text-decoration: line-through; }
.send-setup h3 { margin: 14px 0 8px; font-size: 15px; }
.send-level-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 4px; }
.send-level-actions .ghost { min-width: 120px; text-align: left; }
.send-free-form textarea#send-custom-text {
  min-height: 96px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: 0.04em;
}
.send-txt-line { align-items: center; margin-top: 4px; }
.send-txt-hint { margin: 0; flex: 1; min-width: 180px; }
.send-runner .send-expected {
  margin: 0 0 10px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--blue-2);
  color: var(--ink);
  letter-spacing: 0.12em;
  line-height: 1.55;
  word-break: break-word;
}
.send-slice-board { display: grid; gap: 8px; margin-bottom: 10px; }
.send-slice-row {
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}
.send-slice-row.on {
  border-color: var(--blue);
  background: var(--blue-2);
}
.send-slice-head {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 6px;
}
.send-slice-pick {
  flex: 0 0 auto;
  min-width: 48px;
  font-weight: 700;
}
.send-slice-expected {
  flex: 1;
  min-width: 0;
  letter-spacing: 0.1em;
  line-height: 1.45;
  word-break: break-word;
}
.send-slice-decode {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px;
  align-items: center;
  margin: 0;
}
.send-slice-decode .slice-answer { width: 100%; }
.send-runner .send-keypad { margin: 0 0 8px; }
.send-runner .send-decode {
  margin: 8px 0 4px;
  min-height: 1.4em;
  padding: 8px 10px;
  border-radius: 10px;
  background: var(--bg-2);
  border: 1px solid var(--line);
}
.send-runner .send-playhead { margin-bottom: 8px; }
.send-controls .actions { flex-wrap: wrap; }
.paddles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.paddle {
  min-height: 120px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: #fff;
  font-size: 20px;
  color: var(--ink);
}
.paddle.hot, .paddle:active { background: var(--blue-2); border-color: var(--blue); color: var(--blue); }
.straight {
  min-height: 120px;
  width: 100%;
  border-radius: 18px;
  background: #fff;
  border: 1px solid var(--line);
  font-size: 20px;
}
.straight.hot { background: var(--green-2); border-color: var(--green); color: var(--green); }
.toast {
  position: fixed;
  bottom: 18px;
  right: 18px;
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  padding: 12px 14px;
  border-radius: 12px;
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: 0.2s ease;
  max-width: 320px;
}
.toast.show { opacity: 1; transform: none; }
.cert {
  border: 2px solid var(--blue);
  border-radius: 18px;
  padding: 28px;
  background: #fff;
  text-align: center;
}
.cert h2 { font-weight: 500; letter-spacing: 0.2em; color: var(--blue); }
.search { max-width: 280px; }
.roster-filter { display: flex; gap: 8px; align-items: end; margin-top: 12px; }
.roster-filter label { width: 240px; }
.roster-filter button { flex: none; }
.progress-edit { display: flex; gap: 6px; align-items: center; }
.progress-edit input { width: 72px; }
.standards-card > .muted { margin: 0 0 10px; }
.standard-head,
.standard-row {
  display: grid;
  grid-template-columns: minmax(88px, 1.2fr) 64px 64px 64px auto;
  gap: 8px;
  align-items: center;
  max-width: 420px;
}
.standard-head {
  color: var(--muted);
  font-size: 12px;
  padding: 0 0 6px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 2px;
}
.standard-head span { text-align: center; }
.standard-head .standard-name { text-align: left; }
.standards-list { display: grid; }
.standard-row {
  margin: 0;
  padding: 5px 0;
  border-bottom: 1px solid #e6ebf0;
}
.standard-row:last-child { border-bottom: 0; }
.standard-name {
  min-width: 0;
  font-size: 14px;
  white-space: nowrap;
}
.standard-row input[type="number"] {
  width: 64px;
  padding: 5px 6px;
  border-radius: 8px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.standard-row .primary {
  padding: 5px 10px;
  font-size: 13px;
  white-space: nowrap;
}
.inline { display: flex; gap: 8px; align-items: end; }
.inline > * { flex: 1; }

@media (max-width: 1180px) {
  .assign-metrics { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .assign-line, .assign-form[data-audience="progress"] .assign-line { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 980px) {
  .login-card, .shell, .grid-2, .grid-2.home-lower, .grid-3, .grid-4, .controls, .tune-bar, .detail-meta,
  .class-line, .class-form[data-admin="1"] .class-line { grid-template-columns: 1fr 1fr; max-width: none; }
  .class-form { max-width: none; }
  .class-form-actions { grid-column: 1 / -1; }
  .runner-desk, .runner-write, .home-top, .practice-grid { grid-template-columns: 1fr; }
  .runner-controls { grid-template-columns: 1fr; }
  .runner-controls > .actions,
  .runner-controls > .tune-freq,
  .runner-controls > .slice-row,
  .runner-controls > .tune-vol { grid-column: 1; grid-row: auto; }
  .home-progress { position: static; padding: 16px 18px; }
  .home-progress-fit { position: static; inset: auto; padding: 0; overflow: visible; }
  .side { position: static; height: auto; overflow: visible; }
  .desk-frame.has-dock .shell { overflow: auto; }
  .desk-frame.has-dock .main { height: auto; overflow: visible; }
  .side-ladder { max-height: 420px; }
  .shell { display: block; }
  .main { padding: 16px; }
}

@media (max-width: 720px) {
  .assign-line, .assign-form[data-audience="progress"] .assign-line, .assign-split, .assign-metrics { grid-template-columns: 1fr; }
}

button:disabled { opacity: 0.38; cursor: not-allowed; }

#record-detail { font-family: var(--font); }
#record-detail .copy-grid { font-size: 17.6px; }
#record-detail .report-text { font-size: 11px; }
#record-detail .grid-wrap::before,
#record-detail .copy-grid td::after,
#record-detail .copy-grid th.seg::after { content: none; display: none; }
#record-detail .copy-grid td,
#record-detail .copy-grid th.seg { padding: 0.22em 2px 0.16em 3px; line-height: 1; vertical-align: middle; text-align: left; border: 0; }
#record-detail .copy-grid td { font-family: Arial, sans-serif; font-weight: 400; }
#record-detail .copy-grid i,
#record-detail .copy-grid th.seg { font-family: Arial, sans-serif; font-weight: 400; font-style: normal; }
#record-detail .copy-grid i.ok { font-weight: 400; font-style: normal; }
#record-detail .copy-grid i.bad { font-weight: 700; font-style: normal; }
#record-detail .copy-grid i.miss { font-weight: 400; font-style: italic; }
#record-detail .copy-grid i.space { color: transparent; font-style: normal; font-weight: 400; }
#record-detail .copy-grid.pair-grid td { white-space: pre; }
#record-detail.report-sheet {
  position: relative;
  box-sizing: border-box;
  width: 100%;
  padding-right: 0;
  margin-right: 0;
}
.report-head {
  margin-top: 0;
  margin-bottom: 10px;
  padding: 0;
  border-bottom: 0;
  font-size: 15px;
  width: 100%;
  box-sizing: border-box;
}
.report-system {
  line-height: 1.35;
  font-size: 22.5px;
  font-weight: 700;
  margin: 0;
  flex: none;
}
.report-title {
  line-height: 1.35;
  font-size: 15.6px;
  font-weight: 700;
  margin: 0;
  flex: none;
}
.report-banner {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  box-sizing: border-box;
  min-height: 0;
  margin-bottom: 8px;
}
.report-sub {
  margin: 0 0 4px;
  padding: 0;
  font-size: 1.2em; /* 相对「内容」一行放大 20% */
  font-weight: 400;
  line-height: 1.35;
}
.report-right {
  position: static;
  margin: 0;
  padding: 0;
  text-align: right;
  white-space: nowrap;
  line-height: 1.35;
  max-width: 55%;
  margin-left: auto;
}
.report-who,
.report-when {
  display: block;
  margin: 0;
  padding: 0;
  border: 0;
  text-align: right;
  white-space: nowrap;
  font-weight: 400;
  line-height: 1.35;
}
.report-who {
  font-size: 15.6px; /* 约原大字号的 60% */
  margin-bottom: 2px;
}
.report-when {
  font-size: 13px;
}
#record-detail > h2 { margin-top: 4px; font-weight: 400; }
#record-detail .train-attempt,
#record-detail .train-body {
  max-width: 100%;
  box-sizing: border-box;
}
#record-detail .slice-orig,
#record-detail .slice-ans {
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}
#record-detail .slice-orig .grp:last-child,
#record-detail .slice-ans .grp:last-child {
  margin-right: 0;
}
.report-stats { margin: 8px 0; font-size: 13px; }
.about-card .ok { color: var(--green); }
.about-card .miss { color: var(--blue); }
.about-card .bad { color: var(--red); }
.report-miss-block {
  display: flex;
  align-items: flex-start;
  gap: 0;
  font-size: 12px; /* 与页脚「深圳阿尔法业余无线电俱乐部 BA7MT」一致 */
  color: var(--muted);
}
.report-miss-lead {
  flex: none;
  line-height: 1.45;
}
.report-miss-body { flex: 1; min-width: 0; }
.report-miss-title { margin: 0 0 4px; font-weight: 400; line-height: 1.45; font-size: inherit; }
.report-miss-list {
  margin: 0;
  padding-left: 0;
  list-style-position: inside;
  line-height: 1.45;
  font-size: inherit;
}
.report-miss-list li { margin: 0; }
.report-content { margin: 0 0 4px; line-height: 1.45; overflow-wrap: anywhere; }
.report-metrics { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 0; }
.report-metrics span + span::before { content: "\00a0\00a0\00a0\00a0"; }
.report-metrics .acc-avg,
.runner-result .acc-avg { color: var(--blue); font-style: normal; font-weight: 700; }
.report-metrics .acc-min,
.runner-result .acc-min { color: #111; font-style: normal; font-weight: 700; }
.report-metrics .acc-max,
.runner-result .acc-max { color: var(--red); font-style: normal; font-weight: 700; }
.report-metrics .acc-sep,
.runner-result .acc-sep { color: var(--muted); font-style: normal; font-weight: 400; margin: 0 2px; }
.report-summary { margin: 0; line-height: 1.5; font-size: inherit; }
.report-dash {
  border: 0;
  border-top: 1px dashed #111;
  margin: 12px 0 10px;
}
.report-abstract {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  color: var(--muted);
}
.report-abstract p { margin: 0; font-size: inherit; }
.report-foot {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  padding-top: 6px;
  border-top: 1px solid #222;
  font-size: 12px;
  color: var(--muted);
}
@page {
  size: A4 portrait;
  margin: 16mm 10mm 14mm;
  @bottom-left {
    content: "深圳阿尔法业余无线电俱乐部 BA7MT";
    font-size: 10px;
    font-family: Arial, "Noto Sans SC", "Noto Sans CJK SC", "Microsoft YaHei", sans-serif;
    color: #333;
  }
  @bottom-right {
    content: counter(page);
    font-size: 10px;
    font-family: Arial, "Noto Sans SC", "Noto Sans CJK SC", "Microsoft YaHei", sans-serif;
    color: #333;
  }
}
@media print {
  .side, .topbar, .no-print, .status-dock { display: none !important; }
  html, body, #app, .desk-frame, .desk-frame.has-dock, .desk-frame.has-dock .shell, .desk-frame.has-dock .main, .shell, .main {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: visible !important;
    display: block !important;
  }
  body { background: white; color: black; }
  .main { padding: 0 !important; }
  .card, #report { border: 0; box-shadow: none; padding: 0; background: white; }
  .cert, #report { border-color: black; background: white; box-shadow: none; }
  #record-detail { break-inside: avoid; page-break-inside: avoid; }
  .report-head { margin-top: 0; }
  .report-foot { display: none; }
  #record-detail h2 { font-size: 14px; margin: 6px 0 4px; }
  #record-detail .report-sub {
    margin: 0 0 2px !important;
    padding: 0;
    font-size: 1.2em;
    font-weight: 400;
  }
  #record-detail .report-banner {
    display: flex !important;
    align-items: flex-start !important;
    justify-content: space-between !important;
  }
  #record-detail .report-right {
    position: static !important;
    text-align: right !important;
    margin-left: auto !important;
  }
  #record-detail .report-stats { margin: 2px 0 4px; font-size: 11px; }
  #record-detail .report-content { margin: 0 0 2px; }
  #record-detail .report-metrics { gap: 2px 12px; }
  #record-detail p { margin: 1px 0; font-size: 11px; }
  #record-detail .report-abstract,
  #record-detail .report-abstract p { margin: 0; font-size: 10px; line-height: 1.25; }
  #record-detail .legend { margin: 0; font-size: 10px; }
  #record-detail .grid-wrap { margin: 1px 0 3px; }
  #record-detail .copy-grid { margin: 0; }
  .grid-wrap::before,
  .copy-grid td::after,
  .copy-grid th.seg::after { content: none !important; display: none !important; }
  .copy-grid { border-collapse: collapse; }
  .copy-grid td,
  .copy-grid th.seg {
    border: 2px solid #666 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  #record-detail .copy-grid { font-size: 17.6px; }
  #record-detail .report-text { font-size: 11px; }
  #record-detail .copy-grid td, #record-detail .copy-grid th.seg {
    padding: 0.12em 1px 0.06em 2px;
    text-align: left;
    vertical-align: middle;
    line-height: 1;
    border: 0 !important;
  }
  #record-detail .report-text, #record-detail .report-summary { line-height: 1.15; margin: 0 0 2px; }
  #record-detail .slice-orig,
  #record-detail .slice-ans,
  #export-preview-sheet .slice-orig,
  #export-preview-sheet .slice-ans,
  #record-detail-print .slice-orig,
  #record-detail-print .slice-ans {
    white-space: nowrap !important;
    word-break: keep-all !important;
  }
  #record-detail .slice-orig .grp,
  #record-detail .slice-ans .grp,
  #export-preview-sheet .slice-orig .grp,
  #export-preview-sheet .slice-ans .grp,
  #record-detail-print .slice-orig .grp,
  #record-detail-print .slice-ans .grp { margin-right: 0.4em; }
  #record-detail .slice-tight .slice-orig .grp,
  #record-detail .slice-tight .slice-ans .grp,
  #export-preview-sheet .slice-tight .slice-orig .grp,
  #export-preview-sheet .slice-tight .slice-ans .grp,
  #record-detail-print .slice-tight .slice-orig .grp,
  #record-detail-print .slice-tight .slice-ans .grp { margin-right: 0.28em; }
  #record-detail .train-attempt,
  #export-preview-sheet .train-attempt,
  #record-detail-print .train-attempt { margin: 4px 0; }
  #record-detail .slice-block,
  #export-preview-sheet .slice-block,
  #record-detail-print .slice-block { margin: 0 0 3px; }
}
