/* Discreet, fixed private entry; modal styles deliberately isolated from the portfolio. */
.lm-lab-trigger {
 position: fixed; right: max(18px, env(safe-area-inset-right)); bottom: max(18px, env(safe-area-inset-bottom));
 z-index: 800; display: grid; place-items: center; width: 34px; height: 34px;
 padding: 0; border: 1px solid #e7e7e7; border-radius: 50%; background: #fff; color: #111;
 box-shadow: 0 2px 12px #0000000d; cursor: pointer; transition: transform .35s cubic-bezier(.22,1,.36,1), box-shadow .35s ease;
}
.lm-lab-trigger:hover, .lm-lab-trigger:focus-visible { transform: scale(1.09); box-shadow: 0 5px 22px #00000018; }
.lm-lab-trigger svg { display: block; }
.lm-lock[hidden] { display: none !important; }
.lm-lock {
 position: fixed; inset: 0; z-index: 11000; display: grid; place-items: center; padding: 18px;
 opacity: 0; visibility: hidden; pointer-events: none;
 transition: opacity .32s ease, visibility .32s;
}
.lm-lock.is-open { opacity: 1; visibility: visible; pointer-events: auto; }
.lm-lock-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.92); }
.lm-lock-dialog {
 position: relative; width: min(344px, calc(100vw - 36px), calc((100dvh - 36px) * .6470588235));
 aspect-ratio: 55 / 85; border-radius: 18px;
 padding: 28px 24px 43px; background: white; color: #151515;
 box-shadow: 0 20px 90px #0005; outline: none;
 display: flex; flex-direction: column; justify-content: center;
 transform: translateY(12px) scale(.985);
 transition: transform .36s cubic-bezier(.22,1,.36,1);
}
.lm-lock.is-open .lm-lock-dialog { transform: translateY(0) scale(1); }
.lm-lock-close { position: absolute; right: 15px; top: 12px; color: #222 !important; font: 300 26px/1 Arial,sans-serif; text-decoration: none !important; padding: 8px 12px; }
.lm-lock .lab-pattern-form { display: flex; flex-direction: column; justify-content: center; gap: 0; width: 100%; }
.lm-lock .pattern-grid {
 position: relative; width: min(100%, 270px); aspect-ratio: 1; margin: 0 auto;
 display: grid; grid-template-columns: repeat(3,1fr); grid-template-rows: repeat(3,1fr);
 touch-action: none; user-select: none; -webkit-user-select: none;
}
.lm-lock .pattern-path { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.lm-lock .pattern-path polyline { fill: none; stroke: #202020; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; opacity: .8; }
.lm-lock .pattern-node { position: relative; z-index: 1; display: grid; place-items: center; border: 0; padding: 0; background: transparent; cursor: pointer; }
.lm-lock .pattern-node span { width: 12px; height: 12px; border-radius: 50%; background: #232323; pointer-events: none; transition: transform .16s ease, box-shadow .16s ease; }
.lm-lock .pattern-node.selected span { transform: scale(1.35); box-shadow: 0 0 0 8px #eee; }
.lm-lock .pattern-node:focus-visible span { outline: 2px solid #888; outline-offset: 8px; }
.lm-lock .pattern-hint { color: #a42b25; min-height: 19px; margin: 8px 0 0; text-align: center; font: 12px/19px Arial,sans-serif; }
.lm-lock .lab-actions { display: flex; align-items: center; justify-content: center; gap: 9px; margin: 16px 0 0; }
.lm-lock .lm-lock-submit, .lm-lock .lm-lock-reset {
 min-width: 98px; height: 37px; display: inline-flex; align-items: center; justify-content: center; border-radius: 30px;
 padding: 0 16px; border: 1px solid #222; background: #222; color: white; font: 400 12px/1 Arial,sans-serif; cursor: pointer;
 transition: background .24s ease, color .24s ease, border-color .24s ease;
}
.lm-lock .lm-lock-reset { background: transparent; color: #222; border-color: #ddd; }
.lm-lock .lm-lock-submit:hover { background: #444; }
.lm-lock .lm-lock-reset:hover { background: #f2f2f2; }
body.lm-lock-open { overflow: hidden; }
@media (max-height: 520px) { .lm-lock-dialog { padding: 25px 18px 25px; border-radius: 13px; } .lm-lock .pattern-hint { margin-top: 0; } .lm-lock .lab-actions { margin-top: 5px; } .lm-lock .lm-lock-submit, .lm-lock .lm-lock-reset { height: 31px; } }
@media (prefers-reduced-motion: reduce) { .lm-lab-trigger, .lm-lock, .lm-lock-dialog, .lm-lock .pattern-node span, .lm-lock .lm-lock-submit, .lm-lock .lm-lock-reset { transition: none; } }

/* Wrong pattern: a brief localized shake, no modal flash or navigation. */
.lm-lock .pattern-grid.lm-pattern-error { animation: lm-pattern-shake .29s ease-in-out both; }
@keyframes lm-pattern-shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-5px); }
  40% { transform: translateX(4px); }
  60% { transform: translateX(-3px); }
  80% { transform: translateX(2px); }
}
@media (prefers-reduced-motion: reduce) {
  .lm-lock .pattern-grid.lm-pattern-error { animation: none; }
}
