.leaf-lab {
  --ll-bg: #111b2e;
  --ll-line: #344059;
  --ll-main: #eff1eb;
  --ll-dim: #b8c3d6;
  --ll-accent: #ceec93;
  --ll-violet: #bdc4f7;
  width: 100%;
  min-width: 0;
  color: var(--ll-main);
  color-scheme: dark;
  font-family: "DM Sans", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}
.leaf-lab *, .leaf-lab *::before, .leaf-lab *::after { box-sizing: border-box; }
.leaf-lab h2, .leaf-lab p, .leaf-lab figure, .leaf-lab ul { margin: 0; }
.leaf-lab h2 {
  margin: 7px 0 12px;
  color: var(--ll-main);
  font-size: clamp(29px, 5vw, 49px);
  font-weight: 790;
  letter-spacing: -.055em;
  line-height: 1.18;
}
.leaf-lab h2:focus { outline: none; }
.leaf-lab button { font: inherit; touch-action: manipulation; }
.leaf-lab button:focus-visible {
  outline: 3px solid var(--ll-violet);
  outline-offset: 3px;
}
.ll-intro, .ll-play, .ll-finish {
  margin: 0 auto;
  padding: clamp(19px, 3vw, 32px);
  border: 1px solid var(--ll-line);
  border-radius: 18px;
  background: var(--ll-bg);
}
.ll-intro { max-width: 760px; display: grid; gap: 22px; align-items: center; }
.ll-meta, .ll-overall, .ll-specimen figcaption, .ll-best, .ll-progress, .ll-legend {
  font-size: 12px;
  line-height: 1.45;
  font-weight: 600;
}
.ll-meta { display:flex; align-items:center; gap:7px; color: var(--ll-violet); }
.ll-copy p { color: var(--ll-main); font-size: 15px; line-height: 1.8; }
.ll-copy .ll-fine { margin-top: 12px; color: var(--ll-dim); font-size: 13px; line-height: 1.65; }
.leaf-lab .ll-primary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  width: 100%;
  min-height: 46px;
  margin-top: 15px;
  padding: 10px 17px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: var(--ll-accent);
  color: #19251c;
  font-size: 15px;
  font-weight: 750;
  line-height: 1.4;
  text-align: left;
  cursor: pointer;
}
.leaf-lab .ll-primary span { font-size: 21px; line-height: 1; }
.leaf-lab .ll-primary:hover:enabled { background: #dff7ae; }
.leaf-lab .ll-primary:active:enabled { transform: translateY(1px); }
.leaf-lab .ll-primary:disabled {
  background: #27364a;
  border-color: var(--ll-line);
  color: #b5c1cf;
  cursor: default;
}
.ll-board {
  position: relative;
  width: 100%;
  aspect-ratio: 7 / 6;
  overflow: hidden;
  border: 1px solid #4e5d72;
  border-radius: 4px;
  background: repeating-linear-gradient(0deg, #152137 0 30px, #354259 30px 31px);
}
.ll-board canvas, .ll-pad { position: absolute; inset: 0; display: block; width: 100%; height: 100%; }
.ll-pad { display: grid; grid-template-columns: repeat(7, 1fr); grid-template-rows: repeat(6, 1fr); }
.leaf-lab .ll-cell {
  min-width: 0;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  cursor: crosshair;
  -webkit-tap-highlight-color: transparent;
}
.leaf-lab .ll-cell:focus-visible { outline-offset: -3px; outline-color: #f4eccb; }
@media (hover:hover) {
  .leaf-lab .ll-cell:hover { background: rgba(255,255,255,.09); }
}
.ll-specimen figcaption { display: flex; justify-content: space-between; gap: 12px; margin-top: 8px; color: var(--ll-dim); }
.ll-specimen figcaption span:first-child { color: var(--ll-main); }
.ll-play, .ll-finish { width: min(100%, 490px); }
.ll-top, .ll-progress, .ll-feedback, .ll-best { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ll-overall, .ll-rule { color: var(--ll-dim); }
.ll-play h2 { margin-bottom: 5px; font-size: 30px; }
.ll-rule { font-size: 13px; line-height: 1.55; }
.leaf-lab .ll-chart { margin: 13px 0 8px; }
.ll-progress { min-height: 35px; color: var(--ll-accent); font-size: 14px; }
.leaf-lab .ll-reset {
  min-width: 48px;
  min-height: 36px;
  padding: 0 3px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--ll-violet);
  font-size: 13px;
  cursor: pointer;
}
.leaf-lab .ll-reset:disabled { color: #9aa6bb; cursor: default; }
.ll-play .ll-primary { margin-top: 6px; }
.ll-feedback { flex-wrap: wrap; gap: 2px 10px; margin: 11px 0 5px; }
.ll-feedback strong { color: var(--ll-accent); font-size: 17px; }
.ll-feedback span { color: var(--ll-dim); font-size: 12px; }
.ll-legend { display: flex; gap: 13px; flex-wrap: wrap; margin-bottom: 10px; font-size: 11px; color: var(--ll-dim); }
.ll-legend b { display: inline-grid; width: 16px; height: 16px; place-items: center; border: 1px solid; border-radius: 50%; font: 700 11px/1 system-ui; }
.ll-legend span:nth-child(1) b { color: #d7f991; }
.ll-legend span:nth-child(2) b { color: #bfc5ff; }
.ll-legend span:nth-child(3) b { color: #ffbbab; }
.leaf-lab .ll-total { margin: 10px 0 16px; color: var(--ll-accent); font: 650 clamp(50px,10vw,76px)/1.1 "DM Sans", system-ui, sans-serif; letter-spacing: -.06em; }
.ll-total span { color: var(--ll-dim); font: 500 15px/1.5 system-ui,sans-serif; letter-spacing: normal; }
.leaf-lab .ll-results { padding: 0; border-top: 1px solid var(--ll-line); list-style: none; }
.ll-results li { display: grid; grid-template-columns: 20px 1fr auto; gap: 10px; align-items: center; padding: 11px 0; border-bottom: 1px solid var(--ll-line); font-size:15px; }
.ll-order { color: var(--ll-violet); font: 500 11px/1.5 ui-monospace, monospace; }
.ll-results small, .ll-best { color: var(--ll-dim); }
.leaf-lab .ll-best { margin: 14px 0 2px; }
@media (min-width:650px) {
  .ll-intro { grid-template-columns: 1fr 1fr; gap: 30px; }
}
@media (max-width:649px) {
  .ll-intro { max-width: 490px; }
  .ll-intro .ll-specimen { grid-row: 1; width: min(100%, 240px); justify-self: center; }
}
@media (max-height:720px) and (max-width:649px) {
  .ll-intro .ll-specimen { width: min(100%, 178px); }
  .ll-intro { gap: 15px; }
}
@media (max-width:380px) {
  .ll-intro, .ll-play, .ll-finish { padding: 14px; }
}
