/* 识字练习 · 在 forgetting-curve 主题上叠加练习控件 */

.lp-root {
  position: relative;
  /* 错字库专用：更亮的珊瑚红，区别于全局 --fc-warn */
  --lp-wrong: #ff2d55;
  --lp-wrong-rgb: 255, 45, 85;
  --lp-wrong-ink: #ff5c7a;
}

.lp-root.fc-scheme-paper {
  --lp-wrong: #ff1744;
  --lp-wrong-rgb: 255, 23, 68;
  --lp-wrong-ink: #e60f3a;
}

.lp-root.fc-scheme-colorful {
  --lp-wrong: #ff2a4d;
  --lp-wrong-rgb: 255, 42, 77;
  --lp-wrong-ink: #ff6b85;
}

.lp-root.fc-scheme-vivid {
  --lp-wrong: #ff3d6e;
  --lp-wrong-rgb: 255, 61, 110;
  --lp-wrong-ink: #ff7a9a;
}

/* —— 快捷入口 —— */
.lp-shortcuts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.lp-chip {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-start;
  min-height: 64px;
  padding: 12px 12px 14px;
  border: 1px solid var(--fc-line);
  background: var(--fc-glass);
  color: var(--fc-ink);
  text-decoration: none;
  font-family: var(--fc-font);
  cursor: pointer;
  transition: border-color 0.2s ease, transform 0.15s ease;
}
.lp-chip:active {
  transform: scale(0.98);
}
.lp-chip-k {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--fc-muted);
}
.lp-chip-v {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--fc-accent);
  font-variant-numeric: tabular-nums;
}

/* —— 模式 —— */
.lp-modes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
@media (min-width: 560px) {
  .lp-modes {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
.lp-mode {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 14px 12px;
  border: 1px solid var(--fc-line);
  background: transparent;
  color: var(--fc-ink);
  font-family: var(--fc-font);
  cursor: pointer;
  text-align: left;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.lp-mode.active {
  border-color: var(--fc-accent);
  background: var(--fc-glass);
  box-shadow: inset 0 0 0 1px var(--fc-accent);
}
.lp-mode-en {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--fc-muted);
  text-transform: none;
}
.lp-mode-zh {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--fc-ink);
}
.lp-mode.active .lp-mode-zh {
  color: var(--fc-accent);
}

/* —— 筛选 —— */
.lp-filters {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 14px;
}
@media (min-width: 560px) {
  .lp-filters {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
.lp-filter {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.lp-filter--wide {
  width: 100%;
}
.lp-filter-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--fc-muted);
  text-transform: uppercase;
}
.lp-select {
  width: 100%;
  height: 40px;
  padding: 0 10px;
  border: 1px solid var(--fc-line);
  background: var(--fc-chart-bg);
  color: var(--fc-ink);
  font-family: var(--fc-font);
  font-size: 13px;
  font-weight: 500;
  outline: none;
  appearance: none;
  border-radius: 0;
}
.lp-select:focus {
  border-color: var(--fc-accent);
}
.lp-score-wrap {
  margin-top: 14px;
}

/* —— 开始测试：主 CTA，高识别度 —— */
.lp-start-actions {
  margin-top: 4px;
}
.lp-start-btn {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 100%;
  max-width: 420px;
  min-height: 72px;
  padding: 16px 22px;
  border: 2px solid var(--fc-accent);
  background: var(--fc-accent);
  color: #060709;
  font-family: var(--fc-font);
  cursor: pointer;
  line-height: 1.1;
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--fc-accent) 35%, transparent),
    0 10px 36px color-mix(in srgb, var(--fc-accent) 28%, transparent);
  transition: transform 0.15s ease, filter 0.2s ease, box-shadow 0.2s ease;
}
.lp-start-btn .fc-corner {
  color: #060709;
  opacity: 0.55;
}
.lp-start-zh {
  position: relative;
  z-index: 1;
  font-size: clamp(20px, 5.2vw, 26px);
  font-weight: 700;
  letter-spacing: 0.28em;
  text-indent: 0.28em;
}
.lp-start-en {
  position: relative;
  z-index: 1;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  opacity: 0.72;
}
.lp-start-btn:hover {
  filter: brightness(1.06);
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--fc-accent) 45%, transparent),
    0 14px 42px color-mix(in srgb, var(--fc-accent) 36%, transparent);
}
.lp-start-btn:active {
  transform: scale(0.985);
}
.lp-start-btn:disabled {
  opacity: 0.55;
  cursor: wait;
  filter: none;
  box-shadow: none;
}
.fc-root.fc-scheme-mono .lp-start-btn {
  color: #060709;
}
.fc-root.fc-scheme-basic .lp-start-btn {
  color: #031018;
  box-shadow: 0 10px 36px rgba(90, 190, 255, 0.35);
}
.fc-root.fc-scheme-paper .lp-start-btn {
  color: #fff;
  box-shadow: 0 10px 28px rgba(20, 120, 210, 0.28);
}
.fc-root.fc-scheme-paper .lp-start-btn .fc-corner {
  color: #fff;
}
.fc-root.fc-scheme-colorful .lp-start-btn {
  color: #1a0508;
  box-shadow: 0 10px 36px rgba(224, 58, 67, 0.35);
}
.fc-root.fc-scheme-vivid .lp-start-btn {
  color: #041412;
  box-shadow:
    0 0 24px rgba(0, 245, 214, 0.28),
    0 10px 36px rgba(0, 245, 214, 0.22);
}
@keyframes lp-start-pulse {
  0%, 100% {
    box-shadow:
      0 0 0 0 color-mix(in srgb, var(--fc-accent) 0%, transparent),
      0 10px 36px color-mix(in srgb, var(--fc-accent) 28%, transparent);
  }
  50% {
    box-shadow:
      0 0 0 8px color-mix(in srgb, var(--fc-accent) 12%, transparent),
      0 12px 40px color-mix(in srgb, var(--fc-accent) 34%, transparent);
  }
}
@media (prefers-reduced-motion: no-preference) {
  .lp-start-btn:not(:disabled) {
    animation: lp-start-pulse 2.4s ease-in-out infinite;
  }
}

/* —— 列表 / 错字 —— */
.lp-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.lp-hist {
  padding: 0 0 18px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--fc-line);
  cursor: pointer;
}
.lp-hist:last-child {
  border-bottom: 0;
  margin-bottom: 0;
  padding-bottom: 0;
}
.lp-hist-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: baseline;
  margin-bottom: 8px;
}
.lp-hist-time {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--fc-label);
}
.lp-hist-hint {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--fc-muted);
}
.lp-hist-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.lp-hist-retest {
  margin: 0;
  width: auto;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(234, 88, 12, 0.35);
  background: rgba(234, 88, 12, 0.08);
  color: #c2410c;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.5px;
  cursor: pointer;
}
.lp-hist-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--fc-muted);
}
.lp-hist-detail {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.lp-hist-row {
  display: grid;
  grid-template-columns: 2em 4em 1fr;
  gap: 10px;
  align-items: center;
  font-size: 12px;
  font-weight: 700;
}
.lp-hist-char {
  font-size: 18px;
  color: var(--fc-ink);
}
.lp-hist-ok {
  color: var(--fc-accent-3, var(--fc-accent));
}
.lp-hist-bad {
  color: var(--fc-warn);
}
.lp-hist-ans {
  color: var(--fc-muted);
  font-variant-numeric: tabular-nums;
}
.lp-hist-retest:hover {
  background: rgba(234, 88, 12, 0.14);
}

/* —— 错字库：亮珊瑚红网格 + 拼音/次数 —— */
.lp-wrong-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.lp-wrong-count-badge {
  flex-shrink: 0;
  margin: 2px 0 0;
  padding: 5px 10px;
  border: 1px solid rgba(var(--lp-wrong-rgb), 0.55);
  background: rgba(var(--lp-wrong-rgb), 0.16);
  color: var(--lp-wrong-ink);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  font-variant-numeric: tabular-nums;
  box-shadow: 0 0 16px rgba(var(--lp-wrong-rgb), 0.18);
}
.lp-wrong-count-badge[hidden] {
  display: none !important;
}

.lp-wrong-panel {
  border: 1px solid rgba(var(--lp-wrong-rgb), 0.38);
  background:
    linear-gradient(
      180deg,
      rgba(var(--lp-wrong-rgb), 0.14) 0%,
      transparent 56px
    ),
    var(--fc-chart-bg);
  box-shadow: inset 0 1px 0 rgba(var(--lp-wrong-rgb), 0.12);
}
.lp-wrong-panel .nt-vscroll-viewport {
  border: 0;
  background: transparent;
}
.lp-wrong-panel .nt-vscroll-content {
  padding: 10px 18px 10px 10px;
}

.lp-wrong-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
  gap: 8px;
}
.lp-wrong-grid.is-empty {
  display: block;
}

.lp-wrong-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  width: 100%;
  min-height: 78px;
  padding: 10px 6px 12px;
  border: 1px solid rgba(var(--lp-wrong-rgb), 0.5);
  background:
    radial-gradient(120% 90% at 50% 0%, rgba(var(--lp-wrong-rgb), 0.22), transparent 55%),
    rgba(var(--lp-wrong-rgb), 0.1);
  color: var(--fc-ink);
  text-align: center;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  font: inherit;
  -webkit-tap-highlight-color: transparent;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.12s ease, box-shadow 0.15s ease;
}
.lp-wrong-tile:hover,
.lp-wrong-tile:focus-visible {
  outline: none;
  border-color: var(--lp-wrong);
  background:
    radial-gradient(120% 90% at 50% 0%, rgba(var(--lp-wrong-rgb), 0.32), transparent 55%),
    rgba(var(--lp-wrong-rgb), 0.16);
  box-shadow: 0 0 18px rgba(var(--lp-wrong-rgb), 0.28);
}
.lp-wrong-tile:active {
  transform: scale(0.97);
}
.lp-wrong-char {
  font-size: 28px;
  font-weight: 700;
  line-height: 1;
  color: var(--lp-wrong-ink);
  font-family: "KaiTi", "STKaiti", "Songti SC", "PingFang SC", serif;
  text-shadow: 0 0 18px rgba(var(--lp-wrong-rgb), 0.35);
}
.lp-wrong-py {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--fc-muted);
  font-family: var(--fc-font);
}
.lp-wrong-n {
  position: absolute;
  top: 4px;
  right: 5px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0;
  font-variant-numeric: tabular-nums;
  color: #fff;
  background: var(--lp-wrong);
  box-shadow: 0 0 10px rgba(var(--lp-wrong-rgb), 0.45);
  font-family: var(--fc-font);
}
.lp-wrong-n[hidden] {
  display: none !important;
}

.lp-wrong-empty {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 18px 8px 20px;
}
.lp-wrong-empty-title {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--fc-label);
}
.lp-wrong-empty-desc {
  margin: 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.55;
  color: var(--fc-muted);
}

.fc-root.fc-scheme-paper .lp-wrong-panel {
  background:
    linear-gradient(180deg, rgba(255, 23, 68, 0.1) 0%, transparent 56px),
    #ffffff;
  border-color: rgba(255, 23, 68, 0.32);
  box-shadow: inset 0 1px 0 rgba(255, 23, 68, 0.08);
}
.fc-root.fc-scheme-paper .lp-wrong-tile {
  background:
    radial-gradient(120% 90% at 50% 0%, rgba(255, 23, 68, 0.14), transparent 55%),
    rgba(255, 23, 68, 0.06);
  border-color: rgba(255, 23, 68, 0.38);
}
.fc-root.fc-scheme-paper .lp-wrong-tile:hover,
.fc-root.fc-scheme-paper .lp-wrong-tile:focus-visible {
  background:
    radial-gradient(120% 90% at 50% 0%, rgba(255, 23, 68, 0.2), transparent 55%),
    rgba(255, 23, 68, 0.1);
  box-shadow: 0 6px 16px rgba(255, 23, 68, 0.16);
}
.fc-root.fc-scheme-paper .lp-wrong-char {
  color: #e60f3a;
  text-shadow: none;
}
.fc-root.fc-scheme-paper .lp-wrong-count-badge {
  background: rgba(255, 23, 68, 0.1);
  border-color: rgba(255, 23, 68, 0.4);
  color: #e60f3a;
  box-shadow: none;
}
.fc-root.fc-scheme-paper .lp-wrong-n {
  box-shadow: 0 2px 8px rgba(255, 23, 68, 0.28);
}

.lp-empty {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--fc-muted);
}

/* —— 绑定 —— */
.lp-bind {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: color-mix(in srgb, var(--fc-bg) 88%, transparent);
  backdrop-filter: blur(8px);
}
.lp-bind[hidden] {
  display: none !important;
}
.lp-bind-card {
  width: min(420px, 100%);
  padding: 28px 22px;
  border: 1px solid var(--fc-line);
  background: var(--fc-chart-bg);
}
.lp-bind-title {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--fc-accent);
}
.lp-bind-hint {
  margin: 0 0 20px;
  font-size: 12px;
  line-height: 1.6;
  color: var(--fc-muted);
}
.lp-bind-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.lp-bind-error {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  color: var(--fc-warn);
}

/* —— 测试层 —— */
.lp-test {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding:
    max(24px, env(safe-area-inset-top))
    20px
    max(28px, env(safe-area-inset-bottom));
  background:
    radial-gradient(rgba(255, 255, 255, 0.06) 0.55px, transparent 0.7px) 0 0 / 28px 28px,
    var(--fc-bg);
  color: var(--fc-ink);
}
.lp-test[hidden] {
  display: none !important;
}
.fc-root.fc-scheme-paper .lp-test {
  background:
    radial-gradient(rgba(20, 90, 150, 0.1) 0.55px, transparent 0.7px) 0 0 / 28px 28px,
    var(--fc-bg);
}
.lp-test-close {
  position: absolute;
  top: max(16px, env(safe-area-inset-top));
  right: 16px;
  min-width: 72px;
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--fc-line);
  background: transparent;
  color: var(--fc-ink);
  font-family: var(--fc-font);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2px;
  cursor: pointer;
}
.lp-test-pinyin {
  margin: 0;
  min-height: 1.2em;
  font-size: 22px;
  font-weight: 500;
  letter-spacing: 0.12em;
  color: var(--fc-muted);
}
.lp-test-pinyin.is-hidden {
  visibility: hidden;
}

.lp-tianzi {
  position: relative;
  width: min(72vw, 280px);
  height: min(72vw, 280px);
  border: 1px solid var(--fc-line);
  background: var(--fc-glass);
}
.lp-tianzi-h,
.lp-tianzi-v,
.lp-tianzi-d1,
.lp-tianzi-d2 {
  position: absolute;
  pointer-events: none;
  opacity: 0.35;
}
.lp-tianzi-h {
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
  background: var(--fc-line);
}
.lp-tianzi-v {
  top: 0;
  bottom: 0;
  left: 50%;
  width: 1px;
  background: var(--fc-line);
}
.lp-tianzi-d1,
.lp-tianzi-d2 {
  inset: 0;
  background:
    linear-gradient(
      to bottom right,
      transparent calc(50% - 0.5px),
      var(--fc-line) calc(50% - 0.5px),
      var(--fc-line) calc(50% + 0.5px),
      transparent calc(50% + 0.5px)
    );
  opacity: 0.22;
}
.lp-tianzi-d2 {
  background:
    linear-gradient(
      to bottom left,
      transparent calc(50% - 0.5px),
      var(--fc-line) calc(50% - 0.5px),
      var(--fc-line) calc(50% + 0.5px),
      transparent calc(50% + 0.5px)
    );
}
.lp-test-char {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(96px, 28vw, 168px);
  font-weight: 500;
  line-height: 1;
  font-family: "KaiTi", "STKaiti", "Songti SC", "SimSun", serif;
  color: var(--fc-ink);
  user-select: none;
}

.lp-pinyin-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--fc-muted);
  cursor: pointer;
}
.lp-pinyin-toggle input {
  accent-color: var(--fc-accent);
}

.lp-test-actions {
  display: flex;
  gap: 14px;
  width: min(360px, 100%);
}
.lp-btn-know,
.lp-btn-unknown {
  flex: 1;
  height: 48px;
  border: 1px solid var(--fc-line);
  background: transparent;
  color: var(--fc-ink);
  font-family: var(--fc-font);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.2em;
  cursor: pointer;
}
.lp-btn-know {
  border-color: var(--fc-accent-3, var(--fc-accent));
  color: var(--fc-accent-3, var(--fc-accent));
}
.lp-btn-unknown {
  border-color: var(--fc-warn);
  color: var(--fc-warn);
}
.lp-btn-know:active,
.lp-btn-unknown:active {
  transform: scale(0.98);
}
.lp-btn-know:disabled,
.lp-btn-unknown:disabled {
  opacity: 0.45;
  cursor: wait;
}
.lp-test-progress {
  margin: 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--fc-muted);
  font-variant-numeric: tabular-nums;
}

/* —— 汉字详情（错字库） —— */
.lp-detail {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.lp-detail[hidden] {
  display: none !important;
}
.lp-detail-scrim {
  position: absolute;
  inset: 0;
  border: 0;
  padding: 0;
  margin: 0;
  background: color-mix(in srgb, var(--fc-bg) 72%, transparent);
  backdrop-filter: blur(6px);
  cursor: pointer;
}
.lp-detail-sheet {
  position: relative;
  z-index: 1;
  width: min(480px, 100%);
  max-height: min(88dvh, 720px);
  display: flex;
  flex-direction: column;
  border: 1px solid var(--fc-line);
  border-bottom: 0;
  background: var(--fc-chart-bg);
  color: var(--fc-ink);
  box-shadow: 0 -16px 48px rgba(0, 0, 0, 0.28);
  border-radius: 18px 18px 0 0;
  padding: 0 0 calc(12px + env(safe-area-inset-bottom, 0px));
  overflow: hidden;
}
.lp-detail-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px 10px;
  border-bottom: 1px solid var(--fc-line);
}
.lp-detail-kicker {
  margin: 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--fc-muted);
}
.lp-detail-sub {
  margin: 3px 0 0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--fc-ink-soft);
}
.lp-detail-close {
  width: 36px;
  height: 36px;
  border: 1px solid var(--fc-line);
  background: transparent;
  color: var(--fc-ink);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
.lp-detail-body {
  flex: 1;
  min-height: 0;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  padding: 16px 16px 8px;
}
.lp-detail-loading,
.lp-detail-err {
  margin: 24px 0;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--fc-muted);
}
.lp-detail-err {
  color: var(--fc-warn);
}
.lp-detail-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}
.lp-detail-pinyin {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--fc-accent);
  font-variant-numeric: tabular-nums;
}
.lp-detail-rice {
  position: relative;
  width: min(220px, 62vw);
  aspect-ratio: 1;
  border: 1px solid rgba(var(--lp-wrong-rgb), 0.42);
  background: rgba(var(--lp-wrong-rgb), 0.08);
}
.lp-detail-rice-lines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.35;
}
.lp-detail-rice-lines line {
  stroke: var(--fc-line);
  stroke-width: 1;
}
.lp-detail-writer {
  position: absolute;
  inset: 8%;
  z-index: 1;
}
.lp-detail-writer-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(64px, 22vw, 96px);
  font-weight: 700;
  line-height: 1;
  color: var(--lp-wrong-ink);
  font-family: "KaiTi", "STKaiti", "Songti SC", "PingFang SC", serif;
}
.lp-detail-writer-hint {
  margin: 0;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--fc-muted);
}
.lp-detail-actions {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}
.lp-detail-btn {
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--fc-line);
  background: transparent;
  color: var(--fc-ink);
  font-family: var(--fc-font);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  cursor: pointer;
}
.lp-detail-btn:hover {
  border-color: var(--fc-accent);
  color: var(--fc-accent);
}
.lp-detail-meta {
  display: grid;
  grid-template-columns: 4.5em minmax(0, 1fr);
  gap: 8px 12px;
  margin: 0 0 14px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.lp-detail-meta dt {
  margin: 0;
  color: var(--fc-muted);
}
.lp-detail-meta dd {
  margin: 0;
  color: var(--fc-ink);
  word-break: break-word;
}
.lp-detail-meaning-title {
  margin: 0 0 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--fc-muted);
}
.lp-detail-meaning {
  margin: 0;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.65;
  letter-spacing: 0.02em;
  color: var(--fc-ink);
}
.lp-detail-tags {
  margin: 14px 0 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.lp-detail-tag {
  margin: 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.45;
  color: var(--fc-ink-soft);
}

.fc-root.fc-scheme-paper .lp-detail-sheet {
  background: #ffffff;
  box-shadow: 0 -16px 48px rgba(30, 70, 120, 0.18);
}
.fc-root.fc-scheme-paper .lp-detail-rice {
  background: rgba(255, 23, 68, 0.06);
  border-color: rgba(255, 23, 68, 0.3);
}

@media (min-width: 640px) {
  .lp-detail {
    align-items: center;
    padding: 24px;
  }
  .lp-detail-sheet {
    border-radius: 0;
    border-bottom: 1px solid var(--fc-line);
    max-height: min(84vh, 680px);
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.32);
  }
}

/* —— Toast —— */
.lp-toast {
  position: fixed;
  left: 50%;
  bottom: max(28px, env(safe-area-inset-bottom));
  z-index: 60;
  transform: translateX(-50%);
  max-width: min(92vw, 420px);
  padding: 12px 16px;
  border: 1px solid var(--fc-line);
  background: var(--fc-chart-bg);
  color: var(--fc-ink);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: 0.02em;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
}
.lp-toast[hidden] {
  display: none !important;
}

body.lp-testing,
body.lp-detail-open {
  overflow: hidden;
}

/* —— H5 移动端：收紧左右留白，入口更紧凑 —— */
@media (max-width: 639.98px) {
  .lp-root.fc-root {
    padding-left: 8px;
    padding-right: 8px;
  }
  .lp-root .fc-entry-side {
    display: none;
  }
  .lp-root .fc-entry-body {
    padding-left: 0;
    width: 100%;
  }

  .lp-shortcuts {
    gap: 8px;
  }
  .lp-chip {
    min-height: 56px;
    padding: 10px 8px 12px;
  }
  .lp-chip-v {
    font-size: 15px;
  }

  .lp-modes {
    gap: 8px;
  }
  .lp-mode {
    padding: 12px 8px;
  }
  .lp-mode-zh {
    font-size: 16px;
    letter-spacing: 0.12em;
  }
  .lp-mode-en {
    font-size: 10px;
  }

  .lp-filters {
    gap: 10px 10px;
  }
  .lp-select {
    height: 38px;
  }

  .lp-start-btn {
    max-width: none;
    min-height: 60px;
    padding: 14px 16px;
  }
  .lp-start-zh {
    letter-spacing: 0.14em;
    text-indent: 0.1em;
    font-size: clamp(18px, 4.8vw, 22px);
  }
  .lp-start-en {
    font-size: 11px;
  }

  .lp-hist {
    padding-bottom: 12px;
    margin-bottom: 10px;
  }

  .lp-wrong-grid {
    grid-template-columns: repeat(auto-fill, minmax(64px, 1fr));
    gap: 6px;
  }
  .lp-wrong-tile {
    min-height: 72px;
    padding: 8px 4px 10px;
  }
  .lp-wrong-char {
    font-size: 26px;
  }
  .lp-wrong-count-badge {
    padding: 4px 8px;
    font-size: 10px;
  }

  .lp-bind {
    padding: 16px 8px;
    align-items: flex-end;
  }
  .lp-bind-card {
    width: 100%;
    padding: 22px 14px;
  }

  .lp-test {
    padding-left: 12px;
    padding-right: 12px;
  }
  .lp-test-close {
    right: 10px;
  }
  .lp-detail-bar {
    padding-left: 12px;
    padding-right: 12px;
  }
  .lp-detail-body {
    padding-left: 12px;
    padding-right: 12px;
  }
}
