
.lab__steps { flex: 1; display: flex; align-items: center; justify-content: center; gap: 0; min-width: 0; }
.lab__steps i { position: relative; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--line);
  background: var(--card); font-style: normal; font-size: 15px; line-height: 1; filter: grayscale(1); opacity: .55; transition: all .2s; }
.lab__steps i + i { margin-left: 14px; }
.lab__steps i + i::before { content: ""; position: absolute; right: 100%; top: 50%; width: 16px; height: 2px; margin-right: 0; background: var(--line); }
.lab__steps i.done { filter: none; opacity: 1; border-color: var(--teal); background: var(--teal-soft); }
.lab__steps i.done::before, .lab__steps i.on::before { background: var(--teal); }
.lab__steps i.on { filter: none; opacity: 1; width: 36px; height: 36px; font-size: 19px; border: 3px solid var(--teal); background: var(--card);
  box-shadow: 0 0 0 4px var(--teal-soft); }
.lab__stepname { flex: none; min-width: 44px; max-width: 96px; text-align: right; font-family: var(--display); font-weight: 600; font-size: 14px; color: var(--teal-dark);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 380px) { .lab__stepname { display: none; } }

.lab__filmbtn { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; border: 2px solid var(--line);
  background: var(--card); font-size: 20px; line-height: 1; cursor: pointer; box-shadow: 0 3px 0 var(--line); }
.lab__filmbtn:active { transform: translateY(2px); box-shadow: none; }
.lab__filmbtn[hidden] { display: none; }

.lab__saybtn { color: var(--ink); }
.game__host .lab__bubblesay { float: none; flex: none; margin: 0; }
.lab__frage { position: relative; }
.lab__frage:has(.lab__introsay) { padding-right: 58px; }
.lab__introsay { position: absolute; right: 8px; top: 50%; margin: -22px 0 0; }
.labresult__row .lab__saybtn { background: rgba(255, 255, 255, .55); }
.game__line .lab__saybtn { float: none; display: inline-grid; vertical-align: middle; margin: -4px 8px 0 0; }
.labask__opt.saying { border-color: var(--teal); box-shadow: 0 0 0 3px var(--teal-soft), 0 3px 0 var(--teal); transform: scale(1.03);
  transition: transform .15s, box-shadow .15s; }

.lab__stage { flex: 1; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 4px 16px 16px; display: flex; flex-direction: column; gap: 12px; }
.lab__stage > * { flex: none; width: 100%; max-width: 620px; margin-left: auto; margin-right: auto; }
.lab__bar { flex: none; display: none; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); border-top: 2px solid var(--line); background: var(--bg); }
.lab__bar.on { display: block; }
.lab__bar .btn { max-width: 620px; margin: 0 auto; display: flex; align-items: center; justify-content: center; gap: 6px; }
.lab__bar .btn:disabled { opacity: .45; box-shadow: none; transform: none; }

.lab__intro { margin: auto; }
.lab__frage { display: grid; gap: 2px; margin: 0 auto 12px; max-width: 360px; padding: 10px 14px; border-radius: 16px; border: 2px dashed var(--teal);
  background: var(--teal-soft); text-align: left; }
.lab__frage small { font-weight: 800; font-size: 13px; color: var(--teal-dark); }
.lab__frage b { font-size: 18px; line-height: 1.3; }
.lab__safety { margin: 0 auto 12px; max-width: 360px; padding: 8px 12px; border-radius: 14px; background: var(--orange-soft); font-weight: 700; font-size: 15px; text-align: left; }

.labask { display: grid; gap: 10px; padding: 12px; border-radius: 18px; background: var(--card); border: 2px solid var(--line); animation: fadeIn .2s ease-out; }
.labask__q { margin: 0; font-weight: 800; font-size: 17px; line-height: 1.35; }
.labask__opts { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; }
.labask__opts.is-many { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.labask__opt { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 52px; padding: 8px 10px; border: 2px solid var(--line);
  border-radius: 14px; background: var(--card); color: var(--ink); font: inherit; font-weight: 800; font-size: 16px; line-height: 1.25; text-align: center;
  cursor: pointer; box-shadow: 0 3px 0 var(--line); }
.labask__opt:active { transform: translateY(2px); box-shadow: none; }
.labask.is-done .labask__opt { cursor: default; }
.labask.is-done .labask__opt:not(.is-picked):not(.is-ok) { opacity: .5; }
.labask__opt.is-picked { border-color: var(--teal); background: var(--teal-soft); box-shadow: 0 3px 0 var(--teal); }
.labask__opt.is-ok { border-color: var(--green); background: var(--green-soft); box-shadow: 0 3px 0 var(--green); opacity: 1; }
.labask__opt.is-bad { border-color: var(--red); background: var(--red-soft); box-shadow: 0 3px 0 var(--red); }

.labtable { width: 100%; border-collapse: separate; border-spacing: 0; border: 2px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--card);
  font-size: 15px; }
.labtable th, .labtable td { padding: 7px 8px; text-align: left; border-bottom: 2px solid var(--line); vertical-align: middle; }
.labtable th { font-size: 13px; font-weight: 800; color: var(--muted); background: var(--bg); }
.labtable tr:last-child td { border-bottom: 0; }
.labchip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 999px; background: var(--teal-soft); color: var(--teal-dark);
  font-weight: 800; font-size: 13px; white-space: nowrap; }
.labchip.is-ok { background: var(--green-soft); color: var(--green-dark); }
.labchip.is-bad { background: var(--red-soft); color: var(--red); }
.labchip.is-guess { background: var(--orange-soft); color: var(--ink); }

.labresult { display: grid; gap: 10px; animation: fadeIn .25s ease-out; }
.labresult__row { display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 18px; background: var(--gold); color: var(--edge); }
.labresult__row.is-rhyme { background: var(--teal-soft); color: var(--ink); }
.labresult__fig { flex: none; display: grid; place-items: center; width: 64px; }
.labresult__row p { margin: 0; font-weight: 800; font-size: 17px; line-height: 1.35; }
.labresult__row small { display: block; font-size: 12.5px; font-weight: 800; opacity: .75; margin-bottom: 2px; }

.lab__end { max-width: 460px; overflow-y: auto; max-height: 100%; }
.lab--end { overflow-y: auto; }
.labpage { margin: 0 0 14px; padding: 14px 14px 10px 30px; border-radius: 6px 18px 18px 6px; text-align: left; position: relative;
  background: repeating-linear-gradient(var(--card) 0 27px, var(--line) 27px 29px); border: 2px solid var(--line);
  box-shadow: 4px 4px 0 var(--line); }
.labpage::before { content: ""; position: absolute; left: 14px; top: 0; bottom: 0; width: 2px; background: rgba(217, 87, 126, .45); }
.labpage header { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.labpage header b { flex: 1; font-family: var(--display); font-weight: 600; font-size: 18px; line-height: 1.2; }
.labpage header small { font-weight: 800; color: var(--muted); }
.labpage__emoji { font-size: 22px; }
.labpage dl { margin: 0; display: grid; gap: 6px; }
.labpage__row dt { font-size: 12.5px; font-weight: 800; color: var(--teal-dark); }
.labpage__row dd { margin: 0; font-weight: 700; font-size: 15px; line-height: 1.4; }
.labpage__emoji .ic { display: block; }
.lab__heft { font-weight: 800; color: var(--teal-dark); margin: 0 0 14px; }
.lab__levelup { margin: 0 0 14px; padding: 10px 14px; border-radius: 14px; background: var(--gold); color: var(--edge); font-weight: 800;
  display: flex; align-items: center; gap: 8px; text-align: left; }
.lab__end .btn + .btn { margin-top: 8px; }

@media (prefers-reduced-motion: reduce) {
  .labask, .labresult { animation: none; }
  .lab__steps i { transition: none; }
}

@media (prefers-color-scheme: dark) {
  .labresult__row, .lab__levelup { color: #2a1a0e; }
  .labpage::before { background: rgba(217, 87, 126, .6); }
}

.lab [data-say].saying, .lab [data-say-all].saying, .lab [data-say-tap].saying { outline: 3px solid var(--teal); outline-offset: 3px; border-radius: 10px; }
.lab [data-say]:not(button), .lab [data-say-tap]:not(button) { cursor: pointer; }
