/* Lesson plans (web/js/pages/plans.js): the week planner grid (classes down the side, Monday–Friday across), the plan
   editor in a right-side panel, the review thread and settings. Phones: each class becomes a card with its days stacked. */
.lpl-head { align-items: flex-start; }
.lpl-bar { flex-wrap: wrap; gap: 10px 14px; margin: 16px 0 12px; align-items: center; }
.lpl-weeknav { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.lpl-range { font-size: 15px; color: var(--ink-2); }
.lpl-range b { color: var(--maroon-text); font-weight: 600; }
.lpl-bar .jb-inline { align-items: center; gap: 8px; flex-wrap: wrap; }
.lpl-bar > .jb-inline { flex-shrink: 1; min-width: 0; max-width: 100%; }

/* week tools menu */
.lpl-menu { position: relative; background: none; padding: 0; border: 0; border-radius: 0; margin: 0; color: inherit; }
.lpl-menu > summary { list-style: none; }
.lpl-menu > summary::-webkit-details-marker { display: none; }
.lpl-menu-list { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; width: min(340px, calc(100vw / var(--zf, 1) - 32px)); background: var(--card); border: 1px solid var(--line); border-radius: var(--r); box-shadow: 0 12px 32px rgba(31,26,23,.16); padding: 6px; display: flex; flex-direction: column; }
.lpl-menu-list button { display: flex; align-items: flex-start; gap: 12px; text-align: left; padding: 10px 10px; border: 0; background: transparent; border-radius: 8px; cursor: pointer; font: inherit; color: var(--ink); }
.lpl-menu-list button:hover, .lpl-menu-list button:focus-visible { background: var(--chip-soft); }
.lpl-menu-list .jb-ico { width: 18px; height: 18px; margin-top: 2px; color: var(--maroon-text); flex: none; }
.lpl-menu-list span { display: flex; flex-direction: column; gap: 2px; }
.lpl-menu-list b { font-size: 14px; font-weight: 600; }
.lpl-menu-list small { font-size: 12.5px; color: var(--ink-3); }

/* units */
.lpl-units { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; }
.lpl-unit { display: inline-flex; align-items: center; gap: 10px; padding: 8px 14px 8px 10px; border-radius: 10px; border: 1px solid var(--sage-line); background: var(--sage-mist); cursor: pointer; font: inherit; text-align: left; color: var(--ink); }
.lpl-unit:hover { border-color: var(--sage); }
.lpl-unit .jb-ico { width: 16px; height: 16px; color: var(--sage-text); flex: none; }
.lpl-unit span { display: flex; flex-direction: column; line-height: 1.25; }
.lpl-unit b { font-size: 13.5px; font-weight: 600; }
.lpl-unit small { font-size: 12px; color: var(--ink-3); }

/* the grid */
.lpl-grid { display: grid; grid-template-columns: minmax(150px, 190px) repeat(5, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--r); background: var(--card); overflow: hidden; }
.lpl-corner, .lpl-dhead { background: var(--chip-soft); border-bottom: 1px solid var(--line); }
.lpl-dhead { display: flex; align-items: center; gap: 6px; padding: 10px 8px 10px 12px; border-left: 1px solid var(--line-soft); min-width: 0; }
.lpl-dname { display: flex; align-items: baseline; flex-wrap: wrap; gap: 0 8px; flex: 1 1 auto; min-width: 0; }
.lpl-dhead b { font-size: 14px; font-weight: 700; color: var(--ink); }
.lpl-dhead span { font-size: 13px; color: var(--ink-3); }
.lpl-dhead i { flex: none; font-style: normal; font-size: 10.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--on-maroon); background: var(--maroon); padding: 3px 7px; border-radius: 99px; }
.lpl-dhead.is-today { background: var(--maroon-wash); box-shadow: inset 0 -2px 0 var(--maroon); }
.lpl-dhead.is-off { background: var(--accent-tint); }
.lpl-group { grid-column: 1 / -1; padding: 10px 14px 6px; font-weight: 700; font-size: 13px; letter-spacing: .02em; color: var(--ink-2); background: var(--paper); border-top: 1px solid var(--line); }
.lpl-class { display: flex; flex-direction: column; justify-content: center; gap: 2px; padding: 10px 14px; border-top: 1px solid var(--line-soft); min-width: 0; }
.lpl-class a { color: var(--ink); text-decoration: none; }
.lpl-class a:hover b { color: var(--maroon-text); text-decoration: underline; }
.lpl-class b { font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
.lpl-class span { font-size: 12.5px; color: var(--ink-3); }
.lpl-cell { border-top: 1px solid var(--line-soft); border-left: 1px solid var(--line-soft); padding: 6px; min-height: 92px; min-width: 0; display: flex; }
.lpl-cell > span { margin: auto; font-size: 12.5px; color: var(--ink-4); display: inline-flex; align-items: center; gap: 6px; text-align: center; padding: 6px; }
.lpl-cell.is-off { background: var(--accent-tint); }
.lpl-cell.is-off > span { color: var(--amber-ink); font-weight: 600; }
.lpl-cell.is-off .jb-ico { width: 14px; height: 14px; flex: none; }
.lpl-cell.is-none { background: repeating-linear-gradient(135deg, transparent 0 8px, var(--chip-soft) 8px 9px); }
.lpl-cell.is-drop { background: var(--maroon-wash); box-shadow: inset 0 0 0 2px var(--maroon-line); }
.lpl-card { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 4px; text-align: left; padding: 9px 10px; border-radius: 9px; border: 1px solid var(--line); border-left: 3px solid var(--maroon); background: var(--paper); cursor: pointer; font: inherit; color: var(--ink); transition: box-shadow .15s, border-color .15s; }
.lpl-card:hover, .lpl-card:focus-visible { border-color: var(--maroon-line); border-left-color: var(--maroon); box-shadow: var(--shadow); }
.lpl-card[draggable="true"] { cursor: grab; }
.lpl-card.is-dragging { opacity: .45; }
.lpl-ttl { font-weight: 600; font-size: 13.5px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.lpl-obj { font-size: 12.5px; line-height: 1.35; color: var(--ink-3); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.lpl-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 2px; font-size: 12px; color: var(--ink-3); }
.lpl-meta > span:first-child { margin-right: auto; }
.lpl-flag { display: inline-flex; align-items: center; color: var(--sage-text); }
.lpl-flag .jb-ico { width: 14px; height: 14px; }
.lpl-flag.sub { font-size: 10.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--amber-ink); background: var(--accent-tint); padding: 2px 6px; border-radius: 4px; }
.lpl-add { flex: 1 1 auto; display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1.5px dashed var(--line); border-radius: 9px; background: transparent; color: var(--ink-4); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.lpl-add:hover, .lpl-add:focus-visible { color: var(--maroon-text); border-color: var(--maroon-line); background: var(--maroon-wash); }
.lpl-add .jb-ico { width: 15px; height: 15px; }

/* the editor */
.lpl-form { display: flex; flex-direction: column; gap: 16px; }
.lpl-tools { display: flex; flex-wrap: wrap; gap: 8px; padding-bottom: 14px; border-bottom: 1px solid var(--line-soft); }
/* the editor's Delete (and a unit's Remove) sit at the left of the footer, away from Save */
.jb-sheet footer .lpl-footdel { margin-right: auto; }
/* what the marks on a plan card mean */
.lpl-key { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 10px 2px 0; font-size: 13px; color: var(--ink-3); }
.lpl-key > span { display: inline-flex; align-items: center; gap: 6px; }
.lpl-start { max-width: 360px; }
.lpl-form .jb-field > .jb-row-between { font-weight: 600; }
.lpl-form .jb-field small { font-weight: 400; }
.lpl-hw { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.lpl-hw select { flex: 1 1 220px; width: auto; }
.lpl-res { padding: 8px 0; }
.lpl-res .jb-ico { width: 15px; height: 15px; vertical-align: -2px; color: var(--ink-3); }
.lpl-addres { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.lpl-addres input { flex: 1 1 160px; width: auto; }
.lpl-addres input[name=rurl] { flex-basis: 220px; }
.lpl-fs { border: 0; padding: 0; margin: 0; min-width: 0; }
.lpl-fs legend { font-weight: 600; font-size: 14px; padding: 0; margin-bottom: 6px; }
fieldset.lpl-fs .jb-check { margin: 6px 0; }
.lpl-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.lpl-chip { line-height: 1.3; display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; border: 1px solid var(--line); border-radius: 99px; font-size: 13.5px; cursor: pointer; background: var(--paper); }
.lpl-chip:has(input:checked) { border-color: var(--sage); background: var(--sage-mist); }
.lpl-chip input, .jb-field .lpl-chip input { width: 16px; height: 16px; min-height: 0; padding: 0; margin: 0; flex: none; accent-color: var(--sage); }
.lpl-more { display: flex; flex-wrap: wrap; gap: 6px; margin: -6px 0 0; }
.lpl-switches { display: flex; flex-direction: column; gap: 12px; padding-top: 14px; border-top: 1px solid var(--line-soft); }
.lpl-switches .jb-check, .lpl-fieldlist .jb-check, .jb-check.lpl-two { align-items: flex-start; }
.lpl-switches .jb-check input, .lpl-fieldlist .jb-check input, .jb-check.lpl-two input { margin-top: 2px; flex: none; }
.lpl-switches .jb-check span, .lpl-fieldlist .jb-check span, .jb-check.lpl-two > span { display: flex; flex-direction: column; gap: 2px; }
.lpl-switches b, .lpl-fieldlist b { font-weight: 600; font-size: 14.5px; }
.lpl-switches small, .lpl-fieldlist small { font-size: 13px; }
.lpl-fieldlist { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px 18px; margin: 10px 0 6px; }
.lpl-fieldlist.lpl-one { grid-template-columns: 1fr; }
.lpl-h3 { font-size: 16px; font-weight: 700; margin: 22px 0 6px; }
.lpl-h3:first-child { margin-top: 0; }
.lpl-addstd { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.lpl-addstd select, .lpl-addstd input { min-height: 40px; padding: 6px 10px; border: 1px solid #D5CFC2; border-radius: var(--r-sm); background: #fff; font-size: 15px; }
.lpl-addstd input[name=code] { flex: 0 1 130px; min-width: 0; }
.lpl-addstd input[name=label] { flex: 1 1 240px; min-width: 0; }
.lpl-addstd select { flex: 0 1 200px; min-width: 0; }

/* reading a plan */
.lpl-readlist { margin: 0; display: flex; flex-direction: column; gap: 14px; }
.lpl-read dt { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; font-weight: 700; color: var(--ink-3); margin-bottom: 3px; }
.lpl-read dd { margin: 0; white-space: pre-wrap; line-height: 1.5; }
.lpl-steps { margin: 0; padding-left: 22px; white-space: normal; }
.lpl-steps li { padding: 3px 0; }
.lpl-steps small { margin-left: 8px; color: var(--ink-3); }
.lpl-link { display: inline-flex; align-items: center; gap: 6px; margin: 0 12px 4px 0; color: var(--maroon-text); }
.lpl-link .jb-ico { width: 15px; height: 15px; }
button.lpl-link { background: none; border: 0; padding: 0; font: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.lpl-dhead { position: relative; }
.lpl-dhead .lpl-dprint { flex: none; width: 28px; height: 28px; min-height: 28px; opacity: .55; }
.lpl-dhead .lpl-dprint .jb-ico { width: 15px; height: 15px; }
.lpl-dhead .lpl-dprint:hover, .lpl-dhead .lpl-dprint:focus-visible { opacity: 1; }
.lpl-next { font-size: 13px; color: var(--ink-3); white-space: nowrap; }
@media print { .lpl-dprint { display: none; } }
.lpl-comment { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line-soft); }

/* the review thread */
.lpl-review, .lpl-out { margin-top: 16px; }
.lpl-thread { display: flex; flex-direction: column; gap: 10px; margin: 12px 0; }
.lpl-msg { padding: 10px 14px; border-radius: 12px; background: var(--chip-soft); max-width: 720px; }
.lpl-msg.me { background: var(--sage-mist); margin-left: auto; }
.lpl-msg p { margin: 4px 0 0; white-space: pre-wrap; }
.lpl-reply { display: flex; gap: 10px; align-items: flex-end; margin-top: 8px; }
.lpl-reply textarea { flex: 1 1 auto; min-height: 44px; padding: 10px 12px; border: 1px solid #D5CFC2; border-radius: var(--r-sm); font: inherit; font-size: 15px; resize: vertical; }

/* lists */
.lpl-clamp { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; color: var(--ink-3); margin-top: 2px; }
.lpl-pick { cursor: pointer; }
.lpl-pick input { width: 18px; height: 18px; accent-color: var(--sage); flex: none; }
.lpl-mfile { width: 100%; text-align: left; border: 0; background: transparent; font: inherit; cursor: pointer; border-radius: 8px; padding: 10px 8px; }
.lpl-mfile:hover { background: var(--chip-soft); }
.lpl-mfile .jb-ico { width: 18px; height: 18px; color: var(--ink-3); flex: none; }
.lpl-trow { text-decoration: none; color: inherit; }
.lpl-trow:hover b { color: var(--maroon-text); }
.lpl-leave { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 14px 0 0; }
.lpl-today-card { display: flex; flex-direction: column; gap: 2px; text-decoration: none; color: var(--ink); }
.lpl-today-card:hover b { color: var(--maroon-text); text-decoration: underline; }

/* tablets: a little tighter */
@media (max-width: 1100px) {
  .lpl-grid { grid-template-columns: minmax(120px, 150px) repeat(5, minmax(0, 1fr)); }
  .lpl-obj { display: none; }
}
/* phones: one card per class, its days stacked with their names */
/* phones: the three review numbers side by side */
@media (max-width: 600px) {
  .lpl-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .lpl-kpis .jb-kpi { padding: 10px 12px; }
  .lpl-kpis .jb-kpi .l { font-size: 13px; line-height: 1.25; }
  .lpl-kpis .jb-kpi .jb-muted { display: none; }
}
@media (max-width: 760px) {
  .lpl-grid { display: block; border: 0; background: transparent; overflow: visible; }
  .lpl-corner, .lpl-dhead { display: none; }
  .lpl-group { border: 0; padding: 14px 2px 4px; background: transparent; }
  .lpl-class { background: var(--card); border: 1px solid var(--line); border-bottom: 0; border-radius: var(--r) var(--r) 0 0; margin-top: 12px; padding: 12px 14px; }
  .lpl-cell { background: var(--card); border: 1px solid var(--line); border-top: 1px solid var(--line-soft); min-height: 0; flex-direction: column; gap: 6px; padding: 8px 10px 10px; }
  .lpl-cell::before { content: attr(data-dow); font-size: 12px; font-weight: 700; color: var(--ink-3); }
  .lpl-cell > span { margin: 0; padding: 0; text-align: left; }
  .lpl-class + .lpl-cell + .lpl-cell + .lpl-cell + .lpl-cell + .lpl-cell { border-radius: 0 0 var(--r) var(--r); }
  .lpl-add { min-height: 40px; }
  .lpl-obj { display: -webkit-box; }
  .lpl-reply { flex-direction: column; align-items: stretch; }
}

/* ---- the time bar on a plan card: each block's share of the period, in its kind's colour (pages/plans.js grid) */
.lpl-tbar { display: flex; gap: 1px; height: 5px; border-radius: 3px; overflow: hidden; background: var(--line-soft); margin-top: 2px; }
.lpl-tbar.is-over { background: #FBD5D5; box-shadow: inset 0 0 0 1px #E8A3A3; }
.lpl-over { color: #A4262C; font-weight: 600; }

/* ---- block kinds: one colour family each (shared by the builder, the card bars and the AI drafts) */
.t-amber { --t: #B45309; --t-bg: #FEF3C7; --t-bar: #F59E0B; }
.t-indigo { --t: var(--maroon-text); --t-bg: var(--maroon-wash); --t-bar: var(--maroon); }
.t-teal { --t: #0F6B63; --t-bg: #D7F3EE; --t-bar: #14897E; }
.t-sky { --t: #0B5C8A; --t-bg: #DDF0FB; --t-bar: #2A8BC4; }
.t-violet { --t: #6B3FA0; --t-bg: #EFE7FA; --t-bar: #8B5CC9; }
.t-pink { --t: #9D174D; --t-bg: #FCE7F3; --t-bar: #D2508A; }
.t-slate { --t: #3F4A5A; --t-bg: #E8ECF1; --t-bar: #6B7A8F; }
.t-stone { --t: #5B5348; --t-bg: #F1EEE8; --t-bar: #A39886; }
.lpl-tbar i, .lpb-bar i { display: block; height: 100%; background: var(--t-bar); min-width: 2px; }

/* ---- the Lesson Plan Builder (pages/planbuilder.js): a window of its own over the platform's header and menu */
html.lpb-open { overflow: hidden; }
.lpb { position: fixed; inset: 0; z-index: 40; display: flex; flex-direction: column; background: var(--page, #F6F6F9); color: var(--ink); font-family: var(--sans); --jb-head: 0px; }
.lpb-top { display: flex; align-items: center; gap: 14px; padding: 12px 20px; background: var(--card); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.lpb-back { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 6px; color: var(--ink-2); text-decoration: none; font-weight: 600; font-size: 14px; border-right: 1px solid var(--line); padding-right: 14px; }
.lpb-back:hover { color: var(--maroon-text); }
.lpb-head { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.lpb-title { font: 700 20px/1.25 var(--sans); color: var(--ink); border: 1px solid transparent; border-radius: 8px; padding: 4px 8px; margin-left: -8px; background: transparent; width: 100%; box-sizing: border-box; }
.lpb-title:hover { border-color: var(--line); }
.lpb-title:focus { outline: none; border-color: var(--maroon-line); background: var(--paper); box-shadow: 0 0 0 3px var(--maroon-wash); }
.lpb-meta { font-size: 13px; color: var(--ink-3); }
.lpb-saved { font-size: 13px; color: var(--ink-3); white-space: nowrap; }
.lpb-err { color: #A4262C; font-weight: 600; }
.lpb-linkbtn { border: 0; background: none; padding: 0; font: inherit; color: var(--maroon-text); text-decoration: underline; cursor: pointer; }
.lpb-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.lpb-ai .jb-ico { color: var(--maroon); }
.lpb-more { position: relative; }
.lpb-more > summary { list-style: none; cursor: pointer; }
.lpb-more > summary::-webkit-details-marker { display: none; }
.lpb-menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 5; min-width: 230px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lg, 0 12px 32px rgba(20,20,40,.16)); padding: 6px; display: flex; flex-direction: column; }
.lpb-menu button { display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 0 12px; border: 0; background: none; border-radius: 8px; font: 500 14px var(--sans); color: var(--ink); text-align: left; cursor: pointer; }
.lpb-menu button:hover:not([disabled]) { background: var(--chip-soft, #F2F2F6); }
.lpb-menu button[disabled] { color: var(--ink-4); cursor: default; }
.lpb-menu .is-danger { color: #A4262C; }
.lpb-body { flex: 1; min-height: 0; display: grid; grid-template-columns: 240px minmax(0, 1fr) 360px; }
.lpb-rail { overflow: auto; padding: 18px 14px; background: var(--card); border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 20px; }
.lpb-cap { display: block; font: 700 11px/1.2 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 6px; }
.lpb-unit { display: flex; flex-direction: column; gap: 3px; }
.lpb-unit b { font-size: 15px; line-height: 1.3; }
.lpb-days { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.lpb-day { display: flex; flex-direction: column; gap: 2px; padding: 9px 11px; border-radius: 10px; border: 1px solid var(--line); text-decoration: none; color: var(--ink); background: var(--paper); }
a.lpb-day:hover { border-color: var(--maroon-line); }
.lpb-day.is-here { background: var(--maroon-wash); border-color: var(--maroon-line); }
.lpb-day.is-empty { border-style: dashed; color: var(--ink-3); background: transparent; }
.lpb-day.is-off { border-style: dashed; color: var(--ink-3); background: transparent; font-size: 13px; }
.lpb-dd { font-size: 12px; font-weight: 600; color: var(--ink-3); }
.lpb-day.is-here .lpb-dd { color: var(--maroon-text); }
.lpb-dt { font-size: 14px; font-weight: 600; line-height: 1.3; }
.lpb-day.is-empty .lpb-dt { font-weight: 500; }
.lpb-dm { font-size: 12px; color: var(--ink-3); }
.lpb-last { border-top: 1px solid var(--line-soft); padding-top: 14px; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.lpb-quote { margin: 0; font-size: 13px; line-height: 1.45; color: var(--ink-2); font-style: italic; }
.lpb-main { overflow: auto; padding: 22px 28px 60px; display: flex; flex-direction: column; gap: 14px; }
.lpb-obj { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px 18px; display: flex; flex-direction: column; gap: 6px; }
.lpb-obj label { display: flex; align-items: center; gap: 6px; }
.lpb-obj .lpb-cap { margin: 0; }
.lpb-obj textarea, .lpb-bb, .lpb-diff textarea { width: 100%; box-sizing: border-box; border: 1px solid transparent; border-radius: 8px; padding: 6px 8px; margin: 0 -8px; font: 400 15px/1.5 var(--sans); color: var(--ink); background: transparent; resize: none; overflow: hidden; }
.lpb-obj textarea { font-size: 16px; }
.lpb-obj textarea:hover, .lpb-bb:hover { border-color: var(--line-soft); }
.lpb-obj textarea:focus, .lpb-bb:focus, .lpb-diff textarea:focus, .lpb-bt:focus { outline: none; border-color: var(--maroon-line); background: var(--paper); box-shadow: 0 0 0 3px var(--maroon-wash); }
.lpb-stds { display: flex; gap: 6px; flex-wrap: wrap; }
.lpb-std { font: 600 12px var(--sans); color: var(--maroon-text); background: var(--maroon-wash); border-radius: 6px; padding: 3px 8px; }
.lpb-time { display: flex; flex-direction: column; gap: 6px; }
.lpb-time-txt { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; color: var(--ink-2); flex-wrap: wrap; }
.lpb-time-txt b { color: var(--ink); }
.lpb-time.is-over .lpb-time-txt b { color: #A4262C; }
.lpb-bar { display: flex; gap: 2px; height: 12px; border-radius: 6px; overflow: hidden; background: var(--line-soft); }
.lpb-time.is-over .lpb-bar { box-shadow: inset 0 0 0 1.5px #D9534F; }
.lpb-blocks { display: flex; flex-direction: column; gap: 10px; }
.lpb-block { position: relative; display: grid; grid-template-columns: 20px 64px minmax(0, 1fr); gap: 10px; align-items: start; background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--t-bar); border-radius: 14px; padding: 12px 14px 10px 8px; }
.lpb-block:focus-within { border-color: var(--maroon-line); border-left-color: var(--t-bar); box-shadow: 0 2px 14px rgba(30,30,70,.07); }
.lpb-block.is-dragging { opacity: .45; }
.lpb-block.is-drop-before::before, .lpb-block.is-drop-after::after { content: ''; position: absolute; left: 10px; right: 10px; height: 3px; border-radius: 2px; background: var(--maroon); }
.lpb-block.is-drop-before::before { top: -7px; }
.lpb-block.is-drop-after::after { bottom: -7px; }
.lpb-grip { color: var(--ink-4); cursor: grab; padding-top: 8px; display: flex; justify-content: center; }
.lpb-grip .jb-ico { width: 16px; height: 16px; }
.lpb-when { display: flex; flex-direction: column; align-items: center; gap: 4px; padding-top: 6px; }
.lpb-at { font-size: 14px; }
.lpb-min { display: flex; align-items: center; gap: 3px; font-size: 12px; color: var(--ink-3); }
.lpb-min input { width: 40px; height: 30px; box-sizing: border-box; border: 1px solid var(--line); border-radius: 7px; text-align: center; font: 500 13px var(--sans); color: var(--ink); background: var(--paper); -moz-appearance: textfield; }
.lpb-min input::-webkit-outer-spin-button, .lpb-min input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.lpb-bmain { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.lpb-bhead { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.lpb-kind select { appearance: none; -webkit-appearance: none; border: 0; border-radius: 7px; padding: 5px 24px 5px 9px; font: 700 11px/1.2 var(--sans); letter-spacing: .05em; text-transform: uppercase; color: var(--t); background: var(--t-bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23666' stroke-width='1.5'/%3E%3C/svg%3E") no-repeat right 8px center; cursor: pointer; min-height: 28px; }
.lpb-kind select:focus-visible { outline: 2px solid var(--maroon); outline-offset: 2px; }
.lpb-bt { flex: 1 1 220px; min-width: 0; border: 1px solid transparent; border-radius: 8px; padding: 5px 8px; font: 600 15px var(--sans); color: var(--ink); background: transparent; }
.lpb-bt:hover { border-color: var(--line-soft); }
.lpb-bb { font-size: 14px; color: var(--ink-2); }
.lpb-diff { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 4px; }
.lpb-diff label { display: flex; flex-direction: column; gap: 2px; border-radius: 10px; padding: 8px 10px; }
.lpb-diff label:first-child { background: #ECF8F5; }
.lpb-diff label:last-child { background: #F7EEFB; }
.lpb-diff label > span { display: flex; align-items: center; gap: 4px; font: 700 12px var(--sans); color: var(--ink-2); }
.lpb-diff textarea { margin: 0 -6px; font-size: 13px; }
.lpb-bfoot { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 2px; }
.lpb-spacer { flex: 1; }
.lpb-mini { display: inline-flex; align-items: center; gap: 5px; min-height: 30px; padding: 0 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--paper); font: 500 12px var(--sans); color: var(--ink-2); cursor: pointer; }
.lpb-mini .jb-ico { width: 14px; height: 14px; }
.lpb-mini:hover, .lpb-mini[aria-expanded="true"] { border-color: var(--maroon-line); color: var(--maroon-text); }
.lpb-bfoot .jb-iconbtn { width: 34px; height: 34px; }
.lpb-stdpick { border: 1px solid var(--line-soft); border-radius: 10px; padding: 8px 12px; margin: 4px 0 0; display: flex; flex-direction: column; gap: 4px; }
.lpb-emptyblocks { border: 1.5px dashed var(--line); border-radius: 14px; padding: 28px 20px; text-align: center; display: flex; flex-direction: column; gap: 6px; align-items: center; color: var(--ink-2); }
.lpb-emptyblocks b { font-size: 16px; color: var(--ink); }
.lpb-emptyacts { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-top: 8px; }
.lpb-add { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; border: 1px dashed var(--line); border-radius: 14px; padding: 10px 12px; }
.lpb-add > span { font: 600 13px var(--sans); color: var(--ink-2); margin-right: 4px; }
.lpb-pill { min-height: 36px; padding: 0 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--paper); font: 500 13px var(--sans); color: var(--ink); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.lpb-pill::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--t-bar); }
.lpb-pill:hover { border-color: var(--t-bar); background: var(--t-bg); }
.lpb-side { overflow: auto; background: var(--card); border-left: 1px solid var(--line); display: flex; flex-direction: column; }
.lpb-tabs { display: flex; gap: 2px; padding: 8px 12px 0; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--card); z-index: 1; }
.lpb-tabs button { min-height: 42px; padding: 0 11px; border: 0; border-bottom: 2px solid transparent; background: none; font: 500 14px var(--sans); color: var(--ink-3); cursor: pointer; display: inline-flex; align-items: center; gap: 5px; }
.lpb-tabs button[aria-selected="true"] { color: var(--ink); font-weight: 600; border-bottom-color: var(--maroon); }
.lpb-badge { font: 700 11px var(--sans); background: var(--accent-tint, #FCEBD2); color: #7A4A06; border-radius: 999px; padding: 1px 7px; }
.lpb-tabbody { padding: 16px; display: flex; flex-direction: column; gap: 14px; }
.lpb-tabbody .jb-field textarea { width: 100%; box-sizing: border-box; }
.lpb-row { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; align-items: center; }
.lpb-row select, .lpb-row input { flex: 1 1 160px; min-width: 0; min-height: 36px; }
.lpb-reslist { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.lpb-res { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line-soft); border-radius: 10px; padding: 6px 6px 6px 10px; font-size: 13px; }
.lpb-res .jb-grow { display: flex; flex-direction: column; min-width: 0; }
.lpb-res .jb-grow span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lpb-stdlist { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.lpb-comments { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.lpb-comments li { background: #FFFBEB; border: 1px solid #F5E2A8; border-radius: 12px; padding: 10px 12px; font-size: 14px; }
.lpb-comments p { margin: 4px 0 0; white-space: pre-wrap; }
.lpb-draft { margin: 6px 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.lpb-dk { font: 700 10px var(--sans); letter-spacing: .05em; text-transform: uppercase; color: var(--t); background: var(--t-bg); border-radius: 5px; padding: 2px 6px; }
.lpb-undo { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 1200; display: flex; align-items: center; gap: 12px; background: #1F1E2E; color: #fff; border-radius: 12px; padding: 10px 12px 10px 16px; font-size: 14px; box-shadow: 0 10px 30px rgba(0,0,0,.25); }
.lpb-undo .jb-btn { background: #fff; color: #1F1E2E; border-color: #fff; }
@media (max-width: 1180px) { .lpb-body { grid-template-columns: 210px minmax(0, 1fr) 320px; } .lpb-main { padding: 18px 18px 60px; } }
@media (max-width: 980px) {
  .lpb-body { display: flex; flex-direction: column; overflow: auto; }
  .lpb-rail, .lpb-main, .lpb-side { overflow: visible; border: 0; }
  .lpb-main { order: 1; } .lpb-side { order: 2; border-top: 1px solid var(--line); } .lpb-rail { order: 3; border-top: 1px solid var(--line); }
  .lpb-tabs { position: static; }
}
@media (max-width: 600px) {
  .lpb-top { padding: 10px 12px; gap: 8px; } .lpb-back span { display: none; } .lpb-back { border: 0; padding-right: 0; }
  .lpb-saved { order: 3; width: 100%; } .lpb-actions { width: 100%; }
  .lpb-main { padding: 14px 12px 60px; }
  .lpb-block { grid-template-columns: 52px minmax(0, 1fr); padding-left: 10px; } .lpb-grip { display: none; }
  .lpb-diff { grid-template-columns: minmax(0, 1fr); }
}
