#lesson-studio {
  --lp-ink: #392d34;
  --lp-muted: #786771;
  --lp-line: #e8dce2;
  --lp-rose: #984263;
  --lp-pale: #fbedf3;
  display: grid;
  gap: 24px;
  color: var(--lp-ink);
  min-width: 0;
}
#lesson-studio * {box-sizing:border-box}
.lp-head,.lp-summary,.lp-section-head,.lp-stage-head,.lp-title-line {
  display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap;
}
.lp-head {padding:3px 0 2px}
.lp-head h1 {margin:0;font-size:1.85rem;line-height:1.25;letter-spacing:.02em;color:#432e3b}
.lp-head p,.lp-title p,.lp-muted {margin:7px 0 0;color:var(--lp-muted);line-height:1.6;font-size:.91rem}
.lp-head h1::before {content:"";display:inline-block;width:4px;height:1.3rem;background:#c7658e;border-radius:4px;vertical-align:-1px;margin-right:11px}
.lp-grid {display:grid;grid-template-columns:minmax(210px, .36fr) minmax(0,1fr);gap:18px;align-items:start}
.lp-detail {display:grid;gap:16px;min-width:0}
.lp-paper {min-width:0;background:#fff;border:1px solid var(--lp-line);border-radius:16px;padding:clamp(16px,1.7vw,26px);box-shadow:0 3px 14px #63384d09}
.lp-paper h2,.lp-paper h3 {color:var(--lp-ink);font-weight:700;overflow-wrap:anywhere}
.lp-paper h2 {font-size:1.13rem;margin:0;line-height:1.5}
.lp-title h2 {font-size:1.45rem;line-height:1.3}
.lp-section-head {margin-bottom:15px}
.lp-actions {display:flex;flex-wrap:wrap;align-items:center;gap:7px}
#lesson-studio .lp-btn {
  cursor:pointer;background:white;color:#604853;border:1px solid #ddcbd3;font:inherit;font-size:.88rem;font-weight:600;
  line-height:1.4;padding:7px 12px;border-radius:8px;min-height:33px;box-shadow:none;
}
#lesson-studio .lp-btn:hover {color:#823252;border-color:#b77791;background:#fffbfd}
#lesson-studio .lp-btn:focus-visible,.lp-list-item:focus-visible {outline:3px solid #d895ae;outline-offset:2px}
#lesson-studio .lp-btn.lp-primary {color:#fff;background:#9b4369;border-color:#9b4369}
#lesson-studio .lp-btn.lp-primary:hover {color:#fff;background:#803453;border-color:#803453}
#lesson-studio .lp-btn.lp-danger {color:#934f58}
#lesson-studio .lp-btn:disabled {opacity:.42;cursor:default}
#lesson-studio .lp-btn.lp-small {min-height:27px;padding:3px 8px;font-size:.79rem}
.lp-directory {position:sticky;top:12px;padding:19px 16px 14px}
.lp-search,.lp-directory .lp-field {margin:8px 0 12px}
.lp-search {position:relative;display:block}
.lp-search span {position:absolute;left:11px;top:50%;transform:translateY(-50%);font-size:1.27rem;color:#986c82;pointer-events:none}
#lesson-studio .lp-search input {width:100%;padding-left:32px}
.lp-list {display:grid;gap:4px;max-height:58vh;overflow:auto;scrollbar-width:thin;scrollbar-color:#dcc1ce transparent}
#lesson-studio .lp-list-item {
  border:1px solid transparent;border-radius:9px;box-shadow:none;display:grid;gap:4px;width:100%;background:transparent;
  color:var(--lp-ink);text-align:left;justify-content:stretch;align-items:start;padding:10px 10px;cursor:pointer;line-height:1.45;font-weight:400;word-break:break-word;
}
#lesson-studio .lp-list-item:hover {background:#faf5f7}
#lesson-studio .lp-list-item.is-selected {background:var(--lp-pale);border-color:#edd2de}
.lp-list-item strong {font-weight:650}
.lp-list-item small,.lp-directory footer {font-size:.82rem;color:var(--lp-muted)}
.lp-directory footer {margin-top:15px;padding-top:12px;border-top:1px solid var(--lp-line)}
.lp-summary {align-items:flex-start;padding-bottom:16px;border-bottom:1px solid var(--lp-line)}
.lp-title {flex:1 1 175px;min-width:0}
.lp-title-line {justify-content:flex-start;gap:7px}
.lp-summary>.lp-actions {display:grid;grid-template-columns:repeat(2,auto);justify-content:end}
.lp-state,.lp-duration,.lp-minutes {font-size:.78rem;line-height:1.4;border-radius:20px;background:#f4edf1;padding:4px 9px;color:#785969;white-space:nowrap}
.lp-state.is-done,.lp-duration.is-balanced {color:#416753;background:#eaf3ec}
.lp-duration.is-over {color:#935025;background:#f8ebde}
.lp-duration strong {font-weight:700}
.lp-facts {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px 24px;margin:18px 0}
.lp-facts dt {font-weight:650;margin-bottom:4px;color:#513d48}
.lp-facts dd,.lp-stage-facts dd,.lp-stage-note {margin:0;color:#5b5056;line-height:1.65;white-space:pre-wrap;overflow-wrap:anywhere}
.lp-secondary {border-top:1px solid #f2e9ee;padding-top:12px}
#lesson-studio .lp-secondary .lp-btn {border-color:transparent;background:transparent;padding:3px 6px;min-height:25px;font-size:.81rem}
.lp-stage {border:1px solid var(--lp-line);border-radius:11px;padding:15px 17px;margin-top:9px;background:#fff}
.lp-stage h3 {margin:0;font-size:1rem;display:flex;align-items:baseline;gap:8px}
.lp-stage h3 span {color:#a65778;font-size:.86em;font-variant-numeric:tabular-nums}
.lp-stage-facts {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px 16px;margin:11px 0 0;font-size:.88rem}
.lp-stage-facts dt {font-size:.82rem;font-weight:650;color:#806a76}
.lp-stage-note {padding-top:7px;font-size:.84rem}
.lp-notes {margin:2px 0}
.lp-empty {display:grid;align-content:center;justify-items:center;text-align:center;min-height:305px;background:linear-gradient(145deg,#fff,#fff9fb)}
.lp-empty h2 {font-size:1.24rem}
.lp-empty p {line-height:1.75;color:var(--lp-muted);max-width:26em;margin:8px 0 14px}
.lp-notebook {position:relative;border:2px solid #bc819b;border-radius:4px 10px 10px 4px;width:45px;height:48px;transform:rotate(-5deg);background:#fff1f6;margin-bottom:23px;box-shadow:4px 4px #f6dfe9}
.lp-notebook::before {content:"";position:absolute;left:6px;top:0;bottom:0;border-left:2px solid #deb1c4}
.lp-notebook i {position:absolute;width:17px;height:8px;left:15px;top:13px;border-top:2px solid #bc819b;border-bottom:2px solid #bc819b}
.lp-form-grid {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:13px 17px}
.lp-wide {grid-column:1/-1}
.lp-field {display:grid;gap:4px;min-width:0;font-size:.89rem}
.lp-field>span {font-weight:600;color:#634b58}
#lesson-studio input,#lesson-studio select,#lesson-studio textarea {width:100%;min-width:0;border:1px solid #ddcdd5;border-radius:8px;background:#fff;padding:8px 10px;font:inherit;color:var(--lp-ink)}
#lesson-studio textarea {resize:vertical;line-height:1.55}
.lp-teaching-fields {padding-top:16px;margin-top:16px;border-top:1px solid var(--lp-line)}
.lp-minor {margin-top:9px}
.lp-minor summary {color:var(--lp-muted);cursor:pointer;font-size:.85rem}
.lp-stage-editor .lp-stage-head {margin-bottom:12px}
#lp-stage-list + .lp-btn {margin-top:12px}
.lp-form-footer {justify-content:flex-end}
@media(max-width:1100px){.lp-grid{grid-template-columns:minmax(180px,.35fr) minmax(0,1fr);gap:12px}.lp-summary>.lp-actions{max-width:none;justify-content:flex-start}.lp-paper{padding:16px}.lp-directory{padding:14px 12px}}
@media(max-width:780px){#lesson-studio{gap:15px}.lp-grid{grid-template-columns:1fr}.lp-directory{position:static}.lp-list{max-height:220px}.lp-directory .lp-field{max-width:15rem}.lp-head h1{font-size:1.55rem}.lp-paper{border-radius:12px}.lp-directory footer{margin-top:8px;padding-top:8px}}
@media(max-width:510px){.lp-form-grid,.lp-facts,.lp-stage-facts{grid-template-columns:1fr}.lp-paper{padding:13px}.lp-stage{padding:11px 12px}.lp-stage-facts{gap:6px}.lp-facts{gap:12px}.lp-actions{gap:5px}.lp-duration{white-space:normal}}
