/* «Устат» → Конструктор урока (builder.html) и проигрыватель (play.html) */

/* ================= Конструктор ================= */
.lb-hero { padding-bottom: 18px; }
.lb-top { display: flex; flex-direction: column; gap: 16px; position: sticky; top: calc(var(--header-h) + 8px); z-index: 20; padding: 18px 20px; }
.lb-top-row { display: flex; gap: 14px; flex-wrap: wrap; }
.lb-field { display: flex; flex-direction: column; gap: 5px; font-weight: 600; font-size: .9rem; min-width: 0; }
.lb-field > span:first-child { color: var(--text-muted); font-size: .82rem; font-weight: 800; text-transform: uppercase; letter-spacing: .03em; }
.lb-title-f { flex: 1 1 320px; }
.lb-title-f .input { font-size: 1.15rem; font-weight: 700; }
.lb-len-f { flex: 0 0 160px; }
.lb-time-h { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: baseline; margin-bottom: 6px; }
.lb-warn { font-weight: 700; font-size: .92rem; }
.lb-warn.over { color: var(--red); }
.lb-warn.under { color: var(--text-muted); }
.lb-warn.exact { color: var(--primary-strong); }
.lb-bar { position: relative; display: flex; height: 14px; border-radius: 999px; overflow: hidden; background: var(--bg-alt); }
.lb-bar span { display: block; height: 100%; border-right: 2px solid var(--surface); }
.lb-bar span:last-of-type { border-right: 0; }
.lb-bar-sm { height: 8px; margin: 4px 0 10px; }
.lb-bar-limit { position: absolute; top: -2px; bottom: -2px; width: 3px; background: var(--red); border-radius: 2px; }
.lb-toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.lb-status { font-size: .86rem; color: var(--text-muted); font-weight: 600; margin-left: 4px; }
.lb-status.ok { color: var(--primary-strong); }
.lb-play { margin-left: auto; }

.lb-sec-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 26px; }
.lb-sec-h h2 { margin: 0; font-size: 1.4rem; }
.lb-templates[hidden] { display: none; }
.lb-tpl-grid { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.lb-tpl { display: flex; flex-direction: column; padding: 18px; }
.lb-tpl-h { display: flex; align-items: center; gap: 10px; }
.lb-tpl-h h3 { margin: 0; font-size: 1.08rem; }
.lb-tpl-ico { width: 40px; height: 40px; border-radius: 12px; background: var(--primary-soft); display: grid; place-items: center; font-size: 1.3rem; flex: none; }
.lb-tpl p { font-size: .9rem; margin: 10px 0 4px; }
.lb-tpl-stages { list-style: none; margin: 0 0 14px; padding: 0; font-size: .88rem; flex: 1; }
.lb-tpl-stages li { display: flex; justify-content: space-between; gap: 8px; padding: 3px 0; border-bottom: 1px dashed var(--border); }
.lb-tpl .btn { align-self: flex-start; }

.lb-empty { text-align: center; color: var(--text-muted); padding: 30px 16px; border: 2px dashed var(--border); border-radius: var(--radius); margin: 22px 0 0; }
.lb-empty[hidden] { display: none; }
.lb-blocks { list-style: none; margin: 22px 0 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.lb-block { background: var(--surface); border: 1px solid var(--border); border-left: 6px solid var(--tc, var(--primary)); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 12px 14px; }
.lb-block.dragging { opacity: .85; box-shadow: var(--shadow-lg); transform: scale(1.01); outline: 2px dashed var(--primary); position: relative; z-index: 3; }
body.lb-dragging { user-select: none; cursor: grabbing; }
.lb-bhead { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.lb-handle { border: 0; background: var(--bg-alt); color: var(--text-muted); width: 34px; height: 40px; border-radius: 10px; cursor: grab; font-size: 1.2rem; touch-action: none; flex: none; }
.lb-handle:focus-visible, .lb-icon:focus-visible, .lb-add-b:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }
.lb-num { display: flex; flex-direction: column; align-items: center; min-width: 46px; line-height: 1.1; }
.lb-num b { font-size: 1.15rem; }
.lb-when { color: var(--text-muted); font-size: .74rem; font-weight: 700; white-space: nowrap; }
.lb-stage { flex: 1 1 200px; width: auto; font-weight: 700; }
.lb-type { flex: 0 1 230px; width: auto; }
.lb-min { display: flex; align-items: center; gap: 4px; }
.lb-min-in { width: 64px; text-align: center; padding: 8px 4px; font-weight: 800; -moz-appearance: textfield; }
.lb-min-in::-webkit-outer-spin-button, .lb-min-in::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.lb-min-u { font-size: .85rem; color: var(--text-muted); font-weight: 700; }
.lb-acts { display: flex; gap: 4px; margin-left: auto; }
.lb-icon { border: 1px solid var(--border); background: var(--surface); width: 36px; height: 36px; border-radius: 10px; cursor: pointer; font-weight: 800; font-size: 1rem; display: grid; place-items: center; color: var(--text); flex: none; }
.lb-icon:hover:not(:disabled) { border-color: var(--primary); background: var(--primary-soft); }
.lb-icon:disabled { opacity: .35; cursor: default; }
.lb-icon.danger:hover { border-color: var(--red); background: var(--red-soft); }
.lb-fold { transition: transform var(--transition); }
.lb-block.collapsed .lb-fold { transform: rotate(-90deg); }
.lb-sum { display: none; color: var(--text-muted); font-size: .92rem; padding: 6px 0 0 92px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lb-block.collapsed .lb-sum { display: block; }
.lb-block.collapsed .lb-body { display: none; }
.lb-body { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px 16px; padding: 14px 0 2px 92px; }
.lb-body .wide { grid-column: 1 / -1; }
.lb-body .textarea { resize: vertical; min-height: 90px; }
.lb-note .textarea { min-height: 54px; font-size: .92rem; background: var(--surface-2); }
.lb-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.lb-row .input { flex: 1 1 220px; width: auto; }
.lb-img-prev { max-height: 160px; max-width: 100%; width: auto; border-radius: 12px; border: 1px solid var(--border); margin-top: 6px; object-fit: contain; background: var(--bg-alt); }
.lb-img-prev[hidden] { display: none; }
.lb-err { color: var(--red); font-weight: 700; }
.lb-err[hidden], .lb-soon[hidden] { display: none; }
.lb-check { display: flex; gap: 10px; align-items: flex-start; font-weight: 600; font-size: .95rem; cursor: pointer; padding: 4px 0; }
.lb-check input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--primary); flex: none; }
.lb-check.disabled { opacity: .55; cursor: not-allowed; }
.lb-soon { background: var(--yellow-soft); border-radius: 999px; padding: 1px 10px; font-weight: 800; font-size: .78rem; margin-left: 6px; align-self: center; }
.lb-link { font-weight: 700; font-size: .92rem; }
.lb-mmss { display: flex; gap: 6px; align-items: center; }
.lb-mmss .input { width: 76px; text-align: center; font-weight: 800; }
.lb-file { font-size: .92rem; word-break: break-all; }
.lb-ref { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; }
.lb-ref-card { display: flex; flex-direction: column; gap: 4px; border: 1.5px solid var(--border); border-radius: var(--radius-sm); padding: 10px 12px 10px 38px; position: relative; cursor: pointer; background: var(--surface-2); }
.lb-ref-card input { position: absolute; left: 12px; top: 13px; width: 18px; height: 18px; accent-color: var(--primary); }
.lb-ref-card small { color: var(--text-muted); font-size: .82rem; line-height: 1.35; }
.lb-ref-card:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); }

.lb-add { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 16px 0 10px; padding: 14px; border: 2px dashed var(--border); border-radius: var(--radius); }
.lb-add-l { font-weight: 800; color: var(--text-muted); margin-right: 4px; }
.lb-add-b { display: inline-flex; gap: 6px; align-items: center; border: 1.5px solid var(--border); border-bottom: 3px solid var(--tc); background: var(--surface); border-radius: 12px; padding: 8px 12px; cursor: pointer; font-weight: 700; font-size: .92rem; }
.lb-add-b:hover { background: var(--bg-alt); transform: translateY(-1px); }

.lb-modal { max-width: 620px; }
.lb-confirm { font-size: 1.05rem; margin: 4px 0 18px; }
.lb-modal-acts { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; margin-top: 14px; }
.lb-mine h2 { font-size: 1.4rem; }
.lb-mine h3 { font-size: 1rem; margin: 16px 0 8px; }
.lb-mine-row { display: flex; gap: 10px; align-items: center; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.lb-mine-t { display: flex; flex-direction: column; min-width: 0; flex: 1 1 200px; }
.lb-mine-t b { overflow-wrap: anywhere; }
.lb-mine-a { display: flex; gap: 6px; flex-wrap: wrap; }

.lb-print { display: none; }

@media (max-width: 760px) {
  .lb-top { position: static; padding: 14px; }
  .lb-play { margin-left: 0; width: 100%; }
  .lb-bhead { gap: 6px; }
  .lb-num { min-width: 34px; }
  .lb-stage { flex: 1 1 calc(100% - 90px); order: 1; }
  .lb-type { flex: 1 1 100%; order: 2; }
  .lb-min { order: 3; }
  .lb-acts { order: 4; }
  .lb-body { padding-left: 0; grid-template-columns: 1fr; }
  .lb-sum { padding-left: 0; }
  .lb-len-f { flex: 1 1 100%; }
}

@media print {
  .lb > *:not(.lb-print) { display: none !important; }
  .lb-print { display: block !important; color: #000; }
  .lb-print h1 { font-size: 20pt; margin: 0 0 4pt; }
  .lb-print p { margin: 0 0 6pt; }
  .lb-print table { width: 100%; border-collapse: collapse; font-size: 11pt; }
  .lb-print th, .lb-print td { border: 1px solid #888; padding: 5pt 7pt; vertical-align: top; text-align: left; }
  .lb-print th { background: #eee; }
  .lb-print td.c { text-align: center; white-space: nowrap; }
  .lb-print tfoot td { font-weight: 800; }
  .lb-print tr { break-inside: avoid; }
  .lb-print .lp-desc { color: #333; font-size: 10pt; }
  .lb-print .lp-note { color: #555; font-size: 9.5pt; font-style: italic; white-space: pre-line; margin-top: 2pt; }
  @page { margin: 14mm; }
}

/* ================= Проигрыватель ================= */
body.lp { margin: 0; height: 100vh; height: 100dvh; overflow: hidden; display: flex; flex-direction: column; background: var(--bg); }
.lp-bar { flex: none; display: flex; align-items: center; gap: 12px; padding: 10px 16px; background: var(--surface); border-bottom: 1px solid var(--border); box-shadow: var(--shadow-sm); z-index: 5; }
.lp-stage { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 12px; }
.lp-n { flex: none; background: var(--primary-soft); color: var(--primary-strong); font-weight: 800; border-radius: 999px; padding: 4px 12px; font-size: .95rem; white-space: nowrap; }
.lp-stage-t { min-width: 0; display: flex; flex-direction: column; line-height: 1.15; }
.lp-stage-t b { font-family: var(--font-display); font-size: clamp(1.1rem, 2.2vw, 1.8rem); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lp-stage-t small { color: var(--text-muted); font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: .9rem; }
.lp-timers { flex: none; display: flex; gap: 10px; align-items: stretch; }
.lp-t { display: flex; flex-direction: column; align-items: center; justify-content: center; border-radius: 14px; padding: 3px 14px; background: var(--bg-alt); min-width: 96px; line-height: 1.05; }
.lp-t small { font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted); }
.lp-t b { font-variant-numeric: tabular-nums; font-size: clamp(1.25rem, 2.4vw, 2rem); font-weight: 800; }
.lp-t-stage.ok { background: var(--primary-soft); color: var(--primary-strong); }
.lp-t-stage.warn { background: var(--yellow-soft); color: #8c6527; animation: lpPulse 1.6s ease-in-out infinite; }
.lp-t-stage.over { background: var(--red-soft); color: var(--red); }
[data-theme="dark"] .lp-t-stage.warn { color: var(--yellow); }
.lp-t-lesson.over b { color: var(--red); }
.lp-paused .lp-t { opacity: .55; }
@keyframes lpPulse { 50% { box-shadow: 0 0 0 4px color-mix(in srgb, var(--yellow) 45%, transparent); } }
.lp-ctrls { flex: none; display: flex; gap: 6px; align-items: center; }
.lp-btn { border: 1px solid var(--border); background: var(--surface); color: var(--text); height: 44px; min-width: 44px; padding: 0 12px; border-radius: 12px; font-weight: 800; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 6px; font-size: 1rem; text-decoration: none; }
.lp-btn:hover { background: var(--bg-alt); text-decoration: none; }
.lp-btn:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }
.lp-btn:disabled { opacity: .4; cursor: default; }
.lp-btn.primary { background: var(--primary); border-color: var(--primary); color: #fff; padding: 0 18px; }
.lp-btn.primary:hover { background: var(--primary-strong); }
.lp-btn.on { background: var(--primary-soft); border-color: var(--primary); }
.lp-btn[hidden] { display: none; }
.lp-sep { width: 1px; align-self: stretch; background: var(--border); margin: 4px 2px; }

/* Компактная полоска поверх встроенной страницы */
body.lp-framed .lp-bar { padding: 5px 10px; gap: 10px; }
body.lp-framed .lp-stage-t b { font-size: 1.05rem; }
body.lp-framed .lp-stage-t small { display: none; }
body.lp-framed .lp-t { padding: 1px 10px; min-width: 78px; border-radius: 10px; }
body.lp-framed .lp-t b { font-size: 1.15rem; }
body.lp-framed .lp-t small { font-size: .62rem; }
body.lp-framed .lp-btn { height: 36px; min-width: 36px; border-radius: 10px; font-size: .92rem; }

.lp-main { flex: 1 1 auto; position: relative; overflow: auto; min-height: 0; }
.lp-view { position: absolute; inset: 0; overflow: auto; }
body.lp-remote-on .lp-remote { position: absolute; inset: 0; overflow: auto; }
.lp-frame { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: var(--bg); }
.lp-center { min-height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: clamp(16px, 4vw, 48px); text-align: center; gap: 18px; }

/* Слайд */
.lp-slide { min-height: 100%; display: flex; flex-direction: column; justify-content: center; padding: clamp(18px, 4vw, 56px) clamp(16px, 6vw, 90px); gap: clamp(12px, 2vw, 26px); }
.lp-slide.has-img { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); align-items: center; column-gap: clamp(16px, 4vw, 56px); }
.lp-slide.has-img.no-text { grid-template-columns: 1fr; justify-items: center; }
.lp-slide h1 { font-size: clamp(2rem, 5.4vw, 4.6rem); margin: 0; line-height: 1.1; overflow-wrap: break-word; hyphens: auto; }
.lp-slide-text { font-size: clamp(1.25rem, 2.9vw, 2.5rem); line-height: 1.35; white-space: pre-line; overflow-wrap: break-word; }
.lp-slide-text.long { font-size: clamp(1.05rem, 2vw, 1.7rem); }
.lp-slide img { max-width: 100%; max-height: 68vh; width: auto; margin: 0 auto; border-radius: 18px; box-shadow: var(--shadow); object-fit: contain; }

/* Таймер */
.lp-timer { position: relative; width: min(70vmin, 520px); aspect-ratio: 1; }
.lp-timer svg { width: 100%; height: 100%; transform: rotate(-90deg); max-width: none; }
.lp-timer circle { fill: none; stroke-width: 9; }
.lp-timer .bg { stroke: var(--bg-alt); }
.lp-timer .fg { stroke: var(--primary); stroke-linecap: round; transition: stroke-dashoffset .3s linear, stroke .3s; }
.lp-timer.warn .fg { stroke: var(--yellow); }
.lp-timer.done .fg { stroke: var(--red); }
.lp-timer-num { position: absolute; inset: 0; display: grid; place-items: center; font-variant-numeric: tabular-nums; font-weight: 800; font-size: min(17vmin, 128px); }
.lp-timer.done .lp-timer-num { color: var(--red); }
.lp-row { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.lp-big { font-size: 1.2rem; padding: 14px 26px; }

/* Рефлексия */
.lp-ref-h { font-size: clamp(1.8rem, 4.4vw, 3.6rem); margin: 0; }
.lp-ref-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: clamp(10px, 2vw, 22px); width: min(1300px, 100%); }
.lp-ref-card { background: var(--surface); border: 1px solid var(--border); border-radius: 22px; padding: clamp(16px, 2.6vw, 30px); font-size: clamp(1.2rem, 2.5vw, 2.2rem); font-weight: 800; box-shadow: var(--shadow-sm); text-align: left; }
.lp-ref-card:nth-child(6n+1) { background: var(--primary-soft); } .lp-ref-card:nth-child(6n+2) { background: var(--accent-soft); }
.lp-ref-card:nth-child(6n+3) { background: var(--blue-soft); } .lp-ref-card:nth-child(6n+4) { background: var(--yellow-soft); }
.lp-ref-card:nth-child(6n+5) { background: var(--purple-soft); } .lp-ref-card:nth-child(6n+6) { background: var(--red-soft); }
.lp-sig { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(10px, 2vw, 26px); width: min(1200px, 100%); }
.lp-sig button { border: 0; border-radius: 26px; padding: clamp(14px, 2.4vw, 30px); cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 12px; font: inherit; color: var(--text); background: var(--surface); box-shadow: var(--shadow); }
.lp-sig .dot { width: clamp(70px, 14vmin, 150px); aspect-ratio: 1; border-radius: 50%; box-shadow: inset 0 -8px 0 rgba(0,0,0,.12); }
.lp-sig .g .dot { background: #4caf63; } .lp-sig .y .dot { background: #f2c35b; } .lp-sig .r .dot { background: #e0574e; }
.lp-sig span { font-size: clamp(1rem, 2vw, 1.6rem); font-weight: 800; line-height: 1.25; }
.lp-sig b { font-size: clamp(1.6rem, 3.6vw, 3rem); font-variant-numeric: tabular-nums; }
.lp-pmi { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(10px, 2vw, 22px); width: min(1300px, 100%); }
.lp-pmi div { border-radius: 22px; padding: clamp(16px, 2.6vw, 34px); text-align: left; min-height: 34vh; }
.lp-pmi div:nth-child(1) { background: var(--primary-soft); } .lp-pmi div:nth-child(2) { background: var(--red-soft); } .lp-pmi div:nth-child(3) { background: var(--blue-soft); }
.lp-pmi h3 { font-size: clamp(1.6rem, 3.6vw, 3rem); margin: 0 0 10px; }
.lp-pmi p { font-size: clamp(1rem, 2vw, 1.6rem); margin: 0; color: var(--text-muted); font-weight: 700; }

/* Старт / конец / план */
.lp-hello h1 { font-size: clamp(2rem, 5vw, 4.2rem); margin: 0; overflow-wrap: anywhere; }
.lp-plan-list { list-style: none; margin: 0; padding: 0; width: min(860px, 100%); text-align: left; display: flex; flex-direction: column; gap: 6px; }
.lp-plan-list li { display: flex; align-items: center; gap: 12px; padding: 10px 16px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); font-size: clamp(1rem, 1.8vw, 1.35rem); cursor: pointer; }
.lp-plan-list li .ic { width: 1.6em; text-align: center; flex: none; }
.lp-plan-list li .nm { flex: 1; min-width: 0; font-weight: 700; overflow-wrap: anywhere; }
.lp-plan-list li .nm small { display: block; color: var(--text-muted); font-weight: 600; font-size: .78em; }
.lp-plan-list li .mn { font-weight: 800; color: var(--text-muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.lp-plan-list li.done { opacity: .55; }
.lp-plan-list li.cur { border-color: var(--primary); background: var(--primary-soft); box-shadow: 0 0 0 2px var(--primary); }
.lp-keys { color: var(--text-muted); font-size: .9rem; }
.lp-overlay { position: absolute; inset: 0; background: color-mix(in srgb, var(--bg) 94%, transparent); backdrop-filter: blur(4px); z-index: 4; overflow: auto; }
.lp-overlay[hidden] { display: none; }
.lp-overlay .lp-center { justify-content: flex-start; padding-top: 30px; }
.lp-overlay h2 { margin: 0; font-size: clamp(1.6rem, 3.4vw, 2.6rem); }

/* Видео / ссылки */
.lp-card { background: var(--surface); border: 1px solid var(--border); border-radius: 24px; padding: clamp(18px, 3vw, 40px); box-shadow: var(--shadow); max-width: 820px; width: 100%; display: flex; flex-direction: column; gap: 14px; align-items: center; }
.lp-card h1 { font-size: clamp(1.6rem, 4vw, 3rem); margin: 0; overflow-wrap: anywhere; }
.lp-card .ico { font-size: clamp(3rem, 8vw, 5rem); line-height: 1; }
.lp-host { font-weight: 700; color: var(--text-muted); word-break: break-all; }
.lp-video { max-width: 100%; max-height: 70vh; border-radius: 16px; background: #000; }

/* Прогресс этапов */
.lp-prog { flex: none; display: flex; gap: 3px; padding: 6px 10px 8px; background: var(--surface); border-top: 1px solid var(--border); }
.lp-prog button { flex: 1 1 0; min-width: 6px; height: 14px; border: 0; border-radius: 6px; background: var(--bg-alt); cursor: pointer; padding: 0; position: relative; overflow: hidden; }
.lp-prog button.done { background: color-mix(in srgb, var(--primary) 55%, var(--bg-alt)); }
.lp-prog button.cur { background: var(--bg-alt); box-shadow: 0 0 0 2px var(--primary); }
.lp-prog button.cur i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--primary); }
.lp-prog button.cur.over i { background: var(--red); }
body.lp-framed .lp-prog { padding: 4px 8px 5px; }
body.lp-framed .lp-prog button { height: 8px; }

/* Пульт (телефон) */
.lp-remote { display: none; }
body.lp-remote-on .lp-main > :not(.lp-remote) { display: none !important; }
body.lp-remote-on .lp-remote { display: flex; flex-direction: column; gap: 14px; padding: 16px; min-height: 100%; }
.lp-remote .rs { font-family: var(--font-display); font-size: 1.6rem; font-weight: 700; line-height: 1.2; overflow-wrap: anywhere; }
.lp-remote .rd { color: var(--text-muted); font-weight: 700; }
.lp-remote .rt { font-variant-numeric: tabular-nums; font-weight: 800; font-size: clamp(3.4rem, 18vw, 7rem); text-align: center; border-radius: 22px; background: var(--bg-alt); line-height: 1.2; }
.lp-remote .rt.ok { background: var(--primary-soft); color: var(--primary-strong); }
.lp-remote .rt.warn { background: var(--yellow-soft); }
.lp-remote .rt.over { background: var(--red-soft); color: var(--red); }
.lp-remote .rn { background: var(--surface-2); border: 1px dashed var(--border); border-radius: 14px; padding: 10px 14px; white-space: pre-line; font-size: .95rem; }
.lp-remote .rn[hidden] { display: none; }
.lp-remote .rnext { color: var(--text-muted); font-weight: 700; }
.lp-remote .rbtns { display: grid; grid-template-columns: 1fr 2fr; gap: 10px; margin-top: auto; }
.lp-remote .rbtns .lp-btn { height: 84px; font-size: 1.5rem; border-radius: 20px; }

@media (max-width: 900px) {
  .lp-bar { flex-wrap: wrap; gap: 8px; padding: 8px 10px; }
  .lp-stage { flex: 1 1 100%; order: 1; }
  .lp-timers { order: 2; }
  .lp-ctrls { order: 3; margin-left: auto; flex-wrap: wrap; justify-content: flex-end; }
  .lp-hide-m { display: none !important; }
  .lp-slide.has-img { grid-template-columns: 1fr; }
  .lp-sig, .lp-pmi { grid-template-columns: 1fr; }
  .lp-pmi div { min-height: 0; }
}
@media (max-width: 520px) {
  .lp-t { min-width: 0; padding: 3px 10px; }
  .lp-timers { flex: 1 1 100%; }
  .lp-timers .lp-t { flex: 1; }
  .lp-ctrls { flex: 1 1 100%; justify-content: space-between; }
  .lp-ctrls .lp-btn { flex: 1 1 0; padding: 0 6px; }
  .lp-ctrls .lp-btn.primary { flex: 1 1 100%; order: 10; height: 52px; font-size: 1.15rem; }
  body.lp-framed .lp-ctrls .lp-btn.primary { height: 40px; }
  .lp-t-lesson small, .lp-t-stage small { font-size: .62rem; }
}
@media print { body.lp { display: none; } }
body.lp .fb-fab { display: none !important; }
@media (max-height: 900px) { .lb-top { position: static; } }
