/* Loading layout follows prototype/loading.html and the shared design tokens. */
.practice-loading {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  flex-direction: column;
  overflow: auto;
  color: #f5f6f8;
  background: radial-gradient(1000px 480px at 70% -10%, #e106001f, transparent 60%), linear-gradient(180deg, #0d0e13, #07080b);
  font: 16px/1.5 "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
}
.practice-loading.hidden { display: none; }
.practice-load-main { flex: 1; display: grid; place-items: center; padding: 48px; }
.practice-load-box { width: min(760px, 100%); }
.practice-load-title { display: flex; align-items: baseline; justify-content: space-between; gap: 24px; margin-bottom: 20px; }
.practice-load-title > div { display: flex; align-items: baseline; flex-wrap: wrap; gap: 10px; min-width: 0; }
.practice-load-title h1 { margin: 0; font: italic 700 clamp(22px, 3vw, 34px)/1.35 "Chakra Petch", "Noto Sans SC", "PingFang SC", sans-serif; letter-spacing: 0; }
#load-session { font: 500 14px/1.5 "JetBrains Mono", "Noto Sans SC", sans-serif; color: #6b7280; }
#load-pct { flex: none; font: 400 clamp(22px, 3vw, 34px)/1.3 "JetBrains Mono", monospace; color: #ff2a1f; font-variant-numeric: tabular-nums; }
.practice-load-bar { height: 10px; background: #ffffff12; transform: skewX(-18deg); overflow: hidden; margin-bottom: 24px; }
.practice-load-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #8f0400, #ff2a1f); transition: width 160ms linear; }
.practice-load-steps { display: grid; gap: 8px; list-style: none; padding: 0; margin: 0; }
.practice-load-steps li { display: grid; grid-template-columns: 20px minmax(0, 1fr) 90px; align-items: center; gap: 12px; min-height: 42px; padding: 8px 12px; background: #ffffff05; clip-path: polygon(6px 0, 100% 0, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0 100%, 0 6px); color: #6b7280; }
.load-step-copy small { font: 400 11px/1.5 "JetBrains Mono", "Noto Sans SC", sans-serif; color: #6b7280; }
.load-mark { width: 12px; height: 12px; border: 1px solid #ffffff29; transform: rotate(45deg); }
.load-mini { height: 4px; background: #ffffff14; transform: skewX(-18deg); overflow: hidden; }
.load-mini i { display: block; height: 100%; width: 0; background: #6b7280; transition: width 160ms linear; }
.load-step-state { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.practice-load-steps .is-active { color: #f5f6f8; }
.is-active .load-mark { border-color: #ff2a1f; background: #e106004d; }
.is-active .load-mini i { background: #ff2a1f; }
.practice-load-steps .is-done { color: #a7aeb9; }
.is-done .load-mark, .is-done .load-mini i { background: #2fd05a; border-color: #2fd05a; }
.is-error .load-mark { border-color: #ff2a1f; background: #ff2a1f; }
.practice-load-tip { margin: 24px 0 0; padding: 12px 16px; background: #4aa8ff0f; box-shadow: inset 0 0 0 1px #4aa8ff2e; clip-path: polygon(6px 0, 100% 0, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0 100%, 0 6px); font-size: 12px; line-height: 1.6; color: #a7aeb9; overflow-wrap: anywhere; }
.has-error .practice-load-tip { background: #e1060014; box-shadow: inset 0 0 0 1px #ff2a1f66; color: #f5b2ad; }
.practice-load-actions { display: flex; justify-content: flex-end; gap: 12px; margin-top: 24px; }
.practice-load-actions a, .practice-load-actions button { display: inline-flex; justify-content: center; align-items: center; min-height: 44px; padding: 10px 24px; background: #12141c; border: 1px solid #ffffff29; color: #f5f6f8; font: 700 16px/1.4 "Noto Sans SC", "PingFang SC", sans-serif; text-decoration: none; cursor: pointer; }
.practice-load-actions #practice-retry { background: #e10600; border-color: #e10600; }
.practice-load-actions a:hover { background: #1b1e29; border-color: #ffffff66; }
.practice-load-actions button:hover { background: #ff2a1f; }
.practice-load-actions :focus-visible { outline: 2px solid #f5f6f8; outline-offset: 4px; }
.practice-load-foot { display: flex; justify-content: space-between; gap: 16px; padding: 16px 48px; border-top: 1px solid #ffffff14; color: #6b7280; font: 400 11px/1.5 "JetBrains Mono", "Noto Sans SC", sans-serif; letter-spacing: .08em; }
body:has(.practice-loading:not(.hidden)) #sound-toggle { display: none; }
@media (max-width: 700px) {
  .practice-load-main { padding: 32px 20px; }
  .practice-load-title { gap: 12px; }
  .practice-load-title > div { gap: 6px; }
  #load-session { width: 100%; font-size: 12px; }
  .practice-load-steps li { grid-template-columns: 16px minmax(0, 1fr) 48px; gap: 8px; min-height: 56px; padding: 10px; font-size: 14px; }
  .load-step-copy small { display: block; font-size: 10px; }
  .practice-load-foot { padding: 14px 20px; font-size: 9px; }
  .practice-load-foot > span:last-child { text-align: right; }
}
@media (max-height: 540px) and (orientation: landscape) {
  .practice-load-main { padding: 12px 24px; }
  .practice-load-title { margin-bottom: 10px; }
  .practice-load-title h1, #load-pct { font-size: 24px; line-height: 1.2; }
  .practice-load-title > div { flex-wrap: nowrap; }
  #load-session { width: auto; font-size: 11px; }
  .practice-load-bar { height: 8px; margin-bottom: 14px; }
  .practice-load-steps { gap: 5px; }
  .practice-load-steps li { min-height: 28px; padding: 4px 12px; font-size: 13px; }
  .load-step-copy small { display: inline; font-size: 10px; }
  .practice-load-tip { margin-top: 14px; padding: 8px 12px; font-size: 10px; }
  .practice-load-actions { margin-top: 14px; }
  .practice-load-actions a, .practice-load-actions button { min-height: 32px; padding: 6px 18px; font-size: 12px; }
  .practice-load-foot { padding: 10px 24px; font-size: 9px; }
}
@media (prefers-reduced-motion: reduce) {
  .practice-loading * { transition: none; }
}
