.lp-customizer { position: sticky; top: var(--lp-customizer-top, 0px); z-index: 9998; background: #fff; border-bottom: 1px solid #cbdac8; box-shadow: 0 3px 14px rgba(24,72,40,.12); padding: .65rem 1rem; }
.lp-customizer, .lp-customizer *, .lp-editor-tools, .lp-editor-tools *, .lp-modal, .lp-modal * { box-sizing: border-box; }
.lp-customizer[hidden], .lp-editor-tools[hidden], .lp-modal[hidden] { display: none; }
.lp-customizer__inner { max-width: 1200px; margin: auto; display: flex; align-items: center; gap: .55rem; flex-wrap: wrap; }
.lp-customizer__title { font-weight: 800; color: #194f2d; margin-right: auto; }
.lp-customizer button, .lp-customizer select, .lp-editor-tools button, .lp-modal button { font: inherit; border: 1px solid #a8bda4; border-radius: .45rem; background: #fff; color: #173b26; min-height: 42px; padding: .45rem .7rem; cursor: pointer; touch-action: manipulation; }
.lp-customizer button.lp-primary, .lp-modal button.lp-primary { background: #267d3e; color: #fff; border-color: #267d3e; }
.lp-customizer button:disabled { opacity: .5; cursor: not-allowed; }
.lp-editor-tools { position: fixed; left: 50%; bottom: 1rem; transform: translateX(-50%); z-index: 9999; display: flex; gap: .35rem; flex-wrap: wrap; justify-content: center; background: #fff; border: 1px solid #b9cbb6; border-radius: .65rem; padding: .45rem; box-shadow: 0 5px 24px rgba(0,0,0,.18); }
.lp-editing [data-lp-editable] { outline: none; cursor: text; }
.lp-editing [data-lp-editable]:focus { outline: 2px solid #65bd67; outline-offset: 2px; background: rgba(238,248,236,.65); }
.lp-editing [data-lp-editable] { overflow-wrap: anywhere; word-break: normal; }
.lp-editing .notebook-toc[data-lp-card] { position: relative; }
.lp-card-controls { position: absolute; right: 1rem; top: .5rem; z-index: 20; display: none; gap: .3rem; }
.lp-editing .lp-card-controls { display: flex; }
.lp-card-controls button, .lp-list-control { border: 1px solid #aed0aa; background: #fff; color: #17622e; border-radius: .4rem; min-width: 36px; min-height: 36px; padding: .25rem .45rem; cursor: pointer; touch-action: manipulation; }
.lp-drag-handle { cursor: grab!important; touch-action: none!important; user-select: none; -webkit-user-select: none; }
.lp-drag-handle:active { cursor: grabbing!important; }
.lp-touch-dragging, .lp-touch-dragging * { user-select: none!important; -webkit-user-select: none!important; }
.lp-touch-dragging { overscroll-behavior: contain; }
.lp-touch-dragging .lp-dragging { opacity: .72; box-shadow: 0 0 0 3px #65bd67, 0 8px 24px rgba(22,89,42,.22); }
.lp-editing li[data-lp-draggable] { position: relative; }
.lp-list-control { display: none; margin-right: .25rem; font-size: .75rem; line-height: 1; }
.lp-editing .lp-list-control { display: inline-block; }
.lp-insert-line { display: none; position: relative; width: 100%; height: 18px; margin: -7px 0; padding: 0; border: 0; background: transparent; cursor: pointer; z-index: 4; }
.lp-editing .lp-insert-line { display: block; }
.lp-insert-line:before { content: ''; position: absolute; left: 0; right: 0; top: 50%; border-top: 2px solid transparent; }
.lp-insert-line span { position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%) scale(.75); display: grid; place-items: center; width: 26px; height: 26px; border: 1px solid transparent; border-radius: 50%; background: transparent; color: transparent; font-weight: 800; transition: .12s ease; }
.lp-insert-line:hover:before, .lp-insert-line:focus:before { border-color: #65bd67; }
.lp-insert-line:hover span, .lp-insert-line:focus span { transform: translate(-50%,-50%) scale(1); border-color: #65bd67; background: #fff; color: #267d3e; }
.lp-editing li > .lp-insert-line { margin-bottom: -9px; }
.lp-placing-media .lp-insert-line:before { border-color: #35a64b!important; border-width: 3px; }
.lp-placing-media .lp-insert-line span { transform: translate(-50%,-50%) scale(1.12); border-color: #267d3e; background: #267d3e; color: #fff; box-shadow: 0 0 0 4px rgba(101,189,103,.25); }
.lp-user-media { display: block; width: auto; max-width: 100%; height: auto; margin: .75rem auto; object-fit: contain; }
.lp-media-block { width: 100%; }
.lp-media-preview { position: fixed; right: 1rem; bottom: 5.5rem; z-index: 10001; width: min(220px,42vw); padding: .5rem; border: 2px solid #35a64b; border-radius: .7rem; background: #fff; box-shadow: 0 8px 28px rgba(0,0,0,.28); cursor: grab; touch-action: none; user-select: none; }
.lp-media-preview__content { display: grid; place-items: center; max-height: 150px; overflow: hidden; }
.lp-media-preview img { display: block; max-width: 100%; max-height: 145px; width: auto; height: auto; object-fit: contain; }
.lp-media-preview > span { display: block; padding: .35rem 1.8rem 0 0; color: #215c32; font-size: .8rem; font-weight: 700; }
.lp-media-preview > button { position: absolute; right: .3rem; bottom: .25rem; width: 32px; height: 32px; border: 1px solid #9dbb9e; border-radius: 50%; background: #fff; color: #285e37; }
.lp-media-preview--dragging { pointer-events: none; opacity: .78; cursor: grabbing; transform: scale(.96); }
.lp-media-drop-target:before { border-color: #176f31!important; border-width: 4px!important; }
.lp-dragging { opacity: .4; }
.lp-drop-target { outline: 3px solid #4eb659!important; }
.lp-locked-card { position: relative; }
.lp-locked-card:before { content: 'Locked certification standards'; display: none; position: absolute; right: 1rem; top: .5rem; background: #eef6ff; color: #275987; border: 1px solid #bcd6f1; border-radius: 1rem; padding: .25rem .65rem; font-size: .8rem; z-index: 3; }
.lp-editing .lp-locked-card:before { display: block; }
.lp-modal { position: fixed; inset: 0; z-index: 10000; background: rgba(9,24,14,.62); display: flex; align-items: center; justify-content: center; padding: 1rem; }
.lp-modal__panel { background: #fff; border-radius: .8rem; max-width: 780px; width: 100%; max-height: 88vh; overflow: auto; padding: 1.25rem; box-shadow: 0 20px 60px rgba(0,0,0,.35); }
.lp-modal__panel h2 { margin-top: 0; }
.lp-modal__actions { display: flex; justify-content: flex-end; gap: .55rem; margin-top: 1rem; flex-wrap: wrap; }
.lp-change-list { padding-left: 1.4rem; }
.lp-change-list li { margin: .4rem 0; }
.lp-history-row, .lp-recycle-row { display: flex; align-items: center; gap: .7rem; justify-content: space-between; border-bottom: 1px solid #e3e9e1; padding: .7rem 0; }
.lp-status { font-size: .9rem; color: #526b58; }
.lp-photo-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(145px,1fr)); gap: .7rem; }
.lp-photo-grid button { padding: .35rem; }
.lp-photo-grid img { display: block; width: 100%; height: 105px; object-fit: cover; border-radius: .35rem; }
.lp-new-card { border: 2px dashed #8bc28d!important; }
.lp-schedule-incomplete { color: #a54b13; font-weight: 700; }
@media (max-width: 700px) {
  .lp-customizer { position: relative; padding: .65rem; }
  .lp-customizer__inner { align-items: stretch; gap: .45rem; }
  .lp-customizer__title { width: 100%; }
  .lp-customizer select { flex: 1 1 100%; width: 100%; min-height: 44px; }
  .lp-customizer button { flex: 1 1 calc(50% - .45rem); min-width: 0; overflow-wrap: anywhere; }
  .lp-customizer button, .lp-modal button { min-height: 44px; }
  .lp-status { flex-basis: 100%; }
  .lp-editor-tools { left: .5rem; right: .5rem; width: auto; max-width: none; bottom: max(.5rem, env(safe-area-inset-bottom)); transform: none; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); max-height: 42vh; overflow-y: auto; overflow-x: hidden; }
  .lp-editor-tools button { min-width: 0; min-height: 44px; padding: .45rem .25rem; }
  .lp-editing { padding-bottom: 12rem; }
  .lp-card-controls { position: static; justify-content: flex-end; flex-wrap: wrap; margin: .65rem; }
  .lp-card-controls button { min-height: 44px; min-width: 44px; }
  .lp-list-control { min-width: 44px; min-height: 44px; margin: .1rem .15rem .1rem 0; }
  .lp-drag-handle { font-size: 1.15rem; font-weight: 800; }
  .lp-insert-line { height: 36px; margin: -8px 0; touch-action: manipulation; }
  .lp-insert-line:before { border-color: #8fca8f; }
  .lp-insert-line span { width: 32px; height: 32px; transform: translate(-50%,-50%) scale(1); border-color: #65bd67; background: #fff; color: #267d3e; box-shadow: 0 1px 4px rgba(22,89,42,.14); }
  .lp-insert-line:active span { background: #eaf7e9; }
  .lp-modal { align-items: flex-end; padding: 0; }
  .lp-modal__panel { width: 100%; max-width: none; max-height: calc(100dvh - env(safe-area-inset-top)); border-radius: .85rem .85rem 0 0; padding: 1rem; padding-bottom: max(1rem, env(safe-area-inset-bottom)); }
  .lp-modal__actions { position: sticky; bottom: 0; background: #fff; padding-top: .65rem; }
  .lp-modal__actions button { flex: 1 1 45%; min-height: 44px; }
  .lp-photo-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .lp-photo-grid img { height: 120px; }
  .lp-history-row, .lp-recycle-row { align-items: flex-start; flex-direction: column; }
  .lp-history-row button, .lp-recycle-row button { width: 100%; }
  .lp-media-preview { right: .6rem; bottom: calc(42vh + 1rem); width: min(150px,38vw); }
  .lp-media-preview__content { max-height: 100px; }
  .lp-media-preview img { max-height: 96px; }
}
@media (max-width: 390px) {
  .lp-editor-tools { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .lp-editing { padding-bottom: 17rem; }
}
@media print { .lp-customizer, .lp-editor-tools, .lp-card-controls, .lp-list-control, .lp-insert-line, .lp-media-preview, .lp-modal { display: none!important; } }
