.lp-trigger {
  display: grid; place-items: center; align-self: center; width: 43px; height: 46px;
  border: 0; padding: 0; border-radius: 5px; background: transparent; cursor: pointer;
}
.lp-trigger svg { width: 36px; height: 43px; display: block; transform-origin: 50% 0; }
.lp-trigger:focus-visible, .lp-tools button:focus-visible { outline: 2px solid #83ddbd; outline-offset: 3px; }
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .lp-trigger:hover svg { transform: rotate(7deg); transition: transform .16s ease-out; }
}
html:has(.lp-overlay[open]) { overflow: hidden; }
dialog.lp-overlay {
  box-sizing: border-box; position: fixed; inset: 0; margin: 0; width: 100%; max-width: none;
  height: 100%; height: 100dvh; max-height: none; padding: 0; border: 0; overflow: hidden;
  color: #e9f2e8; background: transparent; color-scheme: dark;
}
.lp-overlay::backdrop { background: rgba(5, 20, 17, .77); backdrop-filter: blur(7px); }
.lp-scene { display: block; width: 100%; height: 100%; touch-action: none; cursor: grab; }
.lp-scene.is-grabbed { cursor: grabbing; }
.lp-tools {
  position: absolute; bottom: max(18px, env(safe-area-inset-bottom)); left: 50%;
  transform: translateX(-50%); text-align: center; white-space: nowrap;
  font-family: "Microsoft YaHei", sans-serif;
}
.lp-tools p { font-size: 12px; color: #c5d3ca; margin: 0 0 9px; letter-spacing: .035em; }
.lp-tools button {
  font: inherit; font-size: 13px; min-height: 40px; padding: 6px 16px; margin: 0 3px;
  border: 1px solid #77968a; border-radius: 24px; color: #eaf2eb; background: #17332c; cursor: pointer;
}
.lp-tools [data-pass-close] { background: #c6e7d4; color: #173d32; border-color: #c6e7d4; font-weight: 600; }
.lp-details { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.lp-fallback .lp-details {
  width: min(200px, 65vw); height: auto; top: 45%; left: 50%; transform: translate(-50%,-50%);
  clip-path: none; background: #f1f4e8; color: #163b32; padding: 35px 18px;
  border-top: 8px solid #80d9b9; border-radius: 8px; text-align: center;
}
.lp-fallback .lp-details span { display: block; margin-top: 12px; }
.lp-fallback [data-pass-flip], .lp-fallback .lp-tools p { display: none; }
@media (prefers-reduced-motion: reduce) { .lp-tools p { display: none; } .lp-scene { cursor: default; } }
@media (max-height: 400px) { .lp-tools p { display: none; } .lp-tools { bottom: 8px; } }

.lp-overlay[data-mode=edit] .lp-scene { visibility: hidden; }
.lp-overlay[data-mode=edit] .lp-tools, .lp-overlay[data-mode=edit] .lp-details { display: none; }
.lp-editor[hidden], .lp-editor [hidden] { display: none !important; }
.lp-editor {
  box-sizing: border-box;
  position: absolute;
  inset: 0;
  margin: auto;
  width: min(412px, calc(100% - 32px));
  height: fit-content;
  max-height: calc(100% - 32px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 27px;
  border: 1px solid #b4cfbd;
  border-top: 5px solid #80d9b9;
  border-radius: 16px;
  background: #f1f4e8;
  box-shadow: 0 22px 65px #03120e4d;
  color: #163b32;
  color-scheme: light;
  font: 14px/1.65 "Microsoft YaHei", sans-serif;
}
.lp-editor fieldset { padding: 0; margin: 0; border: 0; min-width: 0; }
.lp-edit-kicker { color: #497663; font: 600 10px/1.6 Arial, sans-serif; letter-spacing: .14em; }
.lp-editor h2 { margin: 9px 0 22px; font-size: 25px; font-weight: 600; line-height: 1.45; }
.lp-photo-row { display: flex; align-items: center; gap: 17px; }
.lp-photo {
  position: relative;
  width: 72px;
  height: 72px;
  flex: none;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 3px solid #cee4d1;
  border-radius: 50%;
  background: #24594a;
  color: #f1f4e8;
  font-size: 30px;
  font-weight: 600;
}
.lp-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.lp-photo-controls strong { display: block; margin-bottom: 6px; font-weight: 500; }
.lp-photo-controls > div { display: flex; flex-wrap: wrap; gap: 6px; }
.lp-editor button {
  min-height: 40px;
  padding: 6px 13px;
  border: 1px solid #abc6b3;
  border-radius: 8px;
  background: #f6f8ef;
  color: #234e3f;
  font: inherit;
  cursor: pointer;
}
.lp-editor button:disabled { opacity: .53; cursor: default; }
.lp-editor :is(input, button):focus-visible { outline: 2px solid #267a59; outline-offset: 3px; }
.lp-editor label { display: block; margin: 18px 0 7px; font-weight: 500; }
.lp-editor input[type=text] {
  box-sizing: border-box;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #aac6b2;
  border-radius: 8px;
  background: #fbfcf5;
  color: #163b32;
  line-height: 1.5;
  font-family: inherit;
  font-size: 16px;
}
.lp-edit-help { margin: 8px 0 0; color: #52705e; font-size: 12px; line-height: 1.8; }
.lp-edit-message { margin: 12px 0; color: #664c27; font-size: 13px; overflow-wrap: anywhere; }
.lp-edit-message:empty { margin: 0; }
.lp-edit-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 19px; padding-top: 16px; border-top: 1px solid #cbd8c8; }
.lp-edit-actions [data-pass-save] { background: #245a49; color: #f0f6ed; border-color: #245a49; }
.lp-sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (prefers-reduced-motion: no-preference) {
  .lp-editor:not([hidden]) { animation: lp-edit-unfold 210ms ease-out both; }
}
@keyframes lp-edit-unfold {
  from { opacity: .4; transform: perspective(750px) rotateY(-13deg) translateY(5px); }
  to { opacity: 1; transform: perspective(750px) rotateY(0) translateY(0); }
}
@media (max-width: 420px) {
  .lp-editor { padding: 22px 18px; }
  .lp-tools { width: calc(100% - 16px); white-space: normal; }
  .lp-tools button { margin: 0 2px; padding: 6px 10px; }
}
