:root {
    --lpa-ink: #112b31;
    --lpa-muted: #687c80;
    --lpa-line: #dfe8e7;
    --lpa-paper: #fffdf9;
    --lpa-aqua: #0a9e91;
    --lpa-coral: #ff6b57;
    --lpa-sun: #f8c95b;
}

.lpa-profile-gallery {
    position: relative;
    width: 100%;
    margin: 18px 0 24px;
    padding: clamp(20px, 3vw, 34px) !important;
    overflow: hidden;
    border: 1px solid var(--lpa-line) !important;
    border-radius: 28px !important;
    background:
        radial-gradient(circle at 94% 8%, rgba(248, 201, 91, .22), transparent 24%),
        linear-gradient(135deg, #fffdf9 0%, #f3faf8 100%) !important;
    box-shadow: 0 18px 55px rgba(17, 43, 49, .08) !important;
    color: var(--lpa-ink);
}

.lpa-heading,
.lpa-summary,
.lpa-card__top,
.lpa-album-toolbar,
.lpa-form__actions,
.lpa-comment__heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.lpa-heading h2 { margin: 3px 0 5px; font-size: clamp(25px, 3vw, 38px); line-height: 1; color: var(--lpa-ink); }
.lpa-heading p { margin: 0; color: var(--lpa-muted); font-size: 14px; }
.lpa-eyebrow { color: var(--lpa-coral); font-size: 10px; font-weight: 900; letter-spacing: .18em; }
.lpa-summary { margin: 25px 0 14px; }
.lpa-summary span { font-weight: 850; font-size: 16px; }
.lpa-summary small { color: var(--lpa-muted); }

.lpa-button {
    min-height: 42px;
    padding: 0 18px;
    border: 0;
    border-radius: 13px;
    font: inherit;
    font-size: 13px;
    font-weight: 850;
    text-decoration: none;
    cursor: pointer;
    transition: transform .2s ease, box-shadow .2s ease, opacity .2s ease;
}
.lpa-button:hover { transform: translateY(-2px); }
.lpa-button:disabled { opacity: .55; cursor: wait; transform: none; }
.lpa-button--primary { color: #fff; background: linear-gradient(135deg, #0c393d, #0a9e91); box-shadow: 0 10px 25px rgba(10, 158, 145, .2); }
.lpa-button--soft { color: #0b6d66; background: #e3f5f1; }
.lpa-button--ghost { color: var(--lpa-ink); background: #eef2f1; }
.lpa-button--danger { color: #b93131; background: #fff0ef; }

.lpa-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.lpa-card {
    position: relative;
    min-width: 0;
    aspect-ratio: 1.3 / 1;
    padding: 0;
    overflow: hidden;
    border: 0;
    border-radius: 21px;
    background: #dbe7e5;
    text-align: left;
    cursor: pointer;
    box-shadow: inset 0 0 0 1px rgba(17, 43, 49, .08);
    animation: lpa-rise .45s both;
    animation-delay: calc(var(--lpa-order) * 55ms);
}
.lpa-card > img { width: 100%; height: 100%; object-fit: cover; transition: transform .45s ease; }
.lpa-card:hover > img { transform: scale(1.045); }
.lpa-card.is-empty { display: grid; place-items: center; background: linear-gradient(145deg, #dff3ef, #fff3d8); }
.lpa-card.is-empty > .lpa-icon { width: 54px; height: 54px; color: rgba(10, 92, 86, .42); }
.lpa-card__shade { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end; padding: 16px; color: #fff; background: linear-gradient(180deg, rgba(3, 20, 25, .06) 25%, rgba(3, 20, 25, .86) 100%); }
.lpa-card__top { position: absolute; inset: 12px 12px auto; }
.lpa-privacy, .lpa-count { display: inline-flex; align-items: center; gap: 5px; padding: 6px 9px; border: 1px solid rgba(255,255,255,.2); border-radius: 99px; background: rgba(9, 29, 32, .62); backdrop-filter: blur(10px); font-size: 10px; font-weight: 800; }
.lpa-icon { display: inline-flex; width: 16px; height: 16px; }
.lpa-icon svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.8; }
.lpa-card__title { display: block; font-size: 18px; line-height: 1.15; }
.lpa-card__meta { margin-top: 5px; color: rgba(255,255,255,.74); font-size: 11px; }

.lpa-empty { display: grid; place-items: center; min-height: 235px; padding: 28px; border: 1px dashed #b8d1cd; border-radius: 22px; text-align: center; background: rgba(255,255,255,.55); }
.lpa-empty > .lpa-icon { width: 44px; height: 44px; margin-bottom: 12px; color: var(--lpa-aqua); }
.lpa-empty strong { font-size: 19px; }
.lpa-empty p { max-width: 440px; margin: 7px auto 17px; color: var(--lpa-muted); }
.lpa-skeleton { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 24px; }
.lpa-skeleton span { aspect-ratio: 1.3; border-radius: 21px; background: linear-gradient(100deg, #edf2f1 25%, #fff 45%, #edf2f1 65%); background-size: 200% 100%; animation: lpa-shimmer 1.3s infinite; }

.lpa-modal-open { overflow: hidden; }
.lpa-overlay { position: fixed; z-index: 100050; inset: 0; display: grid; place-items: center; padding: 22px; background: rgba(5, 20, 25, .72); backdrop-filter: blur(8px); opacity: 0; transition: opacity .2s ease; }
.lpa-overlay.is-open { opacity: 1; }
.lpa-modal { width: min(620px, 100%); max-height: min(88vh, 920px); overflow: hidden; border: 1px solid rgba(255,255,255,.6); border-radius: 26px; background: var(--lpa-paper); color: var(--lpa-ink); box-shadow: 0 35px 100px rgba(0,0,0,.35); transform: translateY(14px); transition: transform .25s ease; }
.lpa-overlay.is-open .lpa-modal { transform: translateY(0); }
.lpa-modal--album { width: min(1080px, 100%); }
.lpa-modal__header { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; padding: 22px 24px 18px; border-bottom: 1px solid var(--lpa-line); background: linear-gradient(135deg, #f9fffd, #fff7e7); }
.lpa-modal__title { margin: 0; color: var(--lpa-ink); font-size: 24px; line-height: 1.15; }
.lpa-modal__subtitle { margin: 5px 0 0; color: var(--lpa-muted); font-size: 13px; }
.lpa-modal__close { flex: 0 0 40px; width: 40px; height: 40px; border: 0; border-radius: 50%; color: var(--lpa-ink); background: #eaf1ef; font-size: 26px; line-height: 1; cursor: pointer; }
.lpa-modal__body { max-height: calc(88vh - 88px); overflow: auto; padding: 24px; overscroll-behavior: contain; }

.lpa-form { display: grid; gap: 17px; }
.lpa-form label > span, .lpa-form legend { display: block; margin-bottom: 7px; color: var(--lpa-ink); font-size: 12px; font-weight: 850; }
.lpa-form input[type="text"], .lpa-form textarea, .lpa-comment-form textarea { box-sizing: border-box; width: 100%; border: 1px solid #cad9d7; border-radius: 14px; outline: 0; color: var(--lpa-ink); background: #fff; font: inherit; }
.lpa-form input[type="text"] { min-height: 48px; padding: 0 14px; }
.lpa-form textarea, .lpa-comment-form textarea { padding: 13px 14px; resize: vertical; }
.lpa-form input:focus, .lpa-form textarea:focus, .lpa-comment-form textarea:focus { border-color: var(--lpa-aqua); box-shadow: 0 0 0 3px rgba(10,158,145,.12); }
.lpa-form fieldset { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0; padding: 0; border: 0; }
.lpa-choice { position: relative; display: flex; gap: 10px; padding: 14px; border: 1px solid var(--lpa-line); border-radius: 15px; background: #fff; }
.lpa-choice input { margin-top: 3px; accent-color: var(--lpa-aqua); }
.lpa-choice span { margin: 0 !important; }
.lpa-choice strong, .lpa-choice small { display: block; }
.lpa-choice small { margin-top: 3px; color: var(--lpa-muted); font-weight: 500; line-height: 1.35; }
.lpa-upload { display: grid; place-items: center; min-height: 130px; padding: 18px; border: 1px dashed #9cc9c2; border-radius: 18px; background: #effaf7; text-align: center; cursor: pointer; }
.lpa-upload input { position: absolute; opacity: 0; pointer-events: none; }
.lpa-upload__icon { display: grid !important; place-items: center; width: 38px; height: 38px; margin: 0 0 7px !important; border-radius: 50%; color: #fff !important; background: var(--lpa-aqua); font-size: 23px !important; }
.lpa-upload small { color: var(--lpa-muted); }
.lpa-file-summary, .lpa-form__message { color: var(--lpa-aqua); font-size: 12px; font-weight: 750; }
.lpa-form__message.is-error, .lpa-notice.is-error { color: #b93131; }

.lpa-album-description { margin-bottom: 15px; padding: 15px 17px; border-left: 4px solid var(--lpa-sun); border-radius: 0 14px 14px 0; color: #3a5256; background: #fff8e8; white-space: pre-wrap; }
.lpa-album-toolbar { justify-content: flex-end; margin-bottom: 15px; }
.lpa-photo-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; }
.lpa-photo { position: relative; min-width: 0; aspect-ratio: 1; padding: 0; overflow: hidden; border: 0; border-radius: 14px; background: #e5edeb; cursor: zoom-in; }
.lpa-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.lpa-photo:hover img { transform: scale(1.05); }
.lpa-photo span { position: absolute; inset: auto 0 0; padding: 15px 8px 8px; overflow: hidden; color: #fff; background: linear-gradient(transparent, rgba(0,0,0,.75)); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.lpa-comments { margin-top: 25px; padding-top: 20px; border-top: 1px solid var(--lpa-line); }
.lpa-comments h3 { margin: 0 0 14px; font-size: 18px; }
.lpa-comment-list { display: grid; gap: 10px; }
.lpa-comment { display: grid; grid-template-columns: 38px 1fr; gap: 10px; padding: 12px; border-radius: 14px; background: #f3f7f6; }
.lpa-comment > img { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; }
.lpa-comment__heading strong { font-size: 12px; }
.lpa-comment__heading time { color: var(--lpa-muted); font-size: 10px; }
.lpa-comment p { margin: 4px 0 0; color: #334b50; font-size: 13px; white-space: pre-wrap; }
.lpa-comment-form { display: grid; grid-template-columns: 1fr auto; gap: 9px; margin-top: 13px; align-items: end; }
.lpa-notice { padding: 18px; border-radius: 15px; color: var(--lpa-muted); background: #f1f5f4; text-align: center; }

.lpa-lightbox { position: fixed; z-index: 100060; inset: 0; display: grid; place-items: center; padding: 55px; background: rgba(2, 11, 14, .94); }
.lpa-lightbox img { max-width: 100%; max-height: calc(100vh - 110px); object-fit: contain; }
.lpa-lightbox p { position: absolute; inset: auto 70px 18px; color: #fff; text-align: center; }
.lpa-lightbox button { position: absolute; border: 0; color: #fff; background: rgba(255,255,255,.13); cursor: pointer; }
.lpa-lightbox__close { top: 18px; right: 18px; width: 44px; height: 44px; border-radius: 50%; font-size: 28px; }
.lpa-lightbox__nav { top: 50%; width: 48px; height: 68px; border-radius: 15px; font-size: 38px; transform: translateY(-50%); }
.lpa-lightbox__nav.is-prev { left: 18px; }
.lpa-lightbox__nav.is-next { right: 18px; }
.lpa-admin-presence { display: inline-flex; align-items: center; gap: 6px; width: max-content; margin-top: 7px; padding: 5px 9px; border-radius: 99px; color: #9d5719; background: #fff2d9; font-size: 10px; font-weight: 850; }
.lpa-admin-presence::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: #d18b3c; }
.lpa-admin-presence.is-online { color: #087b58; background: #dff8ee; }
.lpa-admin-presence.is-online::before { background: #13b77d; box-shadow: 0 0 0 4px rgba(19,183,125,.14); }

body.lacorn-theme-dark .lpa-profile-gallery,
html[data-theme="dark"] .lpa-profile-gallery { --lpa-ink: #edf8f7; --lpa-muted: #93aaa9; --lpa-line: #294349; --lpa-paper: #10242a; background: radial-gradient(circle at 94% 8%, rgba(248,201,91,.12), transparent 24%), linear-gradient(135deg, #10252b, #0b1b22) !important; }
body.lacorn-theme-dark .lpa-modal, html[data-theme="dark"] .lpa-modal { --lpa-ink: #edf8f7; --lpa-muted: #93aaa9; --lpa-line: #294349; --lpa-paper: #10242a; }
body.lacorn-theme-dark .lpa-modal__header, html[data-theme="dark"] .lpa-modal__header { background: linear-gradient(135deg, #132d32, #292a20); }
body.lacorn-theme-dark .lpa-form input[type="text"], body.lacorn-theme-dark .lpa-form textarea, body.lacorn-theme-dark .lpa-comment-form textarea, body.lacorn-theme-dark .lpa-choice, html[data-theme="dark"] .lpa-form input[type="text"], html[data-theme="dark"] .lpa-form textarea, html[data-theme="dark"] .lpa-comment-form textarea, html[data-theme="dark"] .lpa-choice { color: #edf8f7; border-color: #355158; background: #0b1b22; }
body.lacorn-theme-dark .lpa-comment, html[data-theme="dark"] .lpa-comment { background: #132a31; }
body.lacorn-theme-dark .lpa-comment p, html[data-theme="dark"] .lpa-comment p { color: #c5d7d6; }

@keyframes lpa-rise { from { opacity: 0; transform: translateY(9px); } }
@keyframes lpa-shimmer { to { background-position: -200% 0; } }

@media (max-width: 760px) {
    .lpa-profile-gallery { margin: 12px 0 18px; padding: 17px !important; border-radius: 22px !important; }
    .lpa-heading { align-items: flex-start; }
    .lpa-heading p { display: none; }
    .lpa-heading .lpa-button { min-height: 38px; padding: 0 12px; font-size: 11px; }
    .lpa-summary { align-items: flex-start; margin-top: 19px; }
    .lpa-summary small { max-width: 190px; text-align: right; font-size: 10px; }
    .lpa-grid, .lpa-skeleton { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
    .lpa-card { border-radius: 16px; }
    .lpa-card__shade { padding: 11px; }
    .lpa-card__top { inset: 8px 8px auto; }
    .lpa-privacy { max-width: 88px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .lpa-count { display: none; }
    .lpa-card__title { font-size: 14px; }
    .lpa-card__meta { font-size: 9px; }
    .lpa-overlay { align-items: end; padding: 0; }
    .lpa-modal, .lpa-modal--album { width: 100%; max-height: 94dvh; border-radius: 24px 24px 0 0; }
    .lpa-modal__header { padding: 17px; }
    .lpa-modal__title { font-size: 21px; }
    .lpa-modal__body { max-height: calc(94dvh - 78px); padding: 16px; padding-bottom: max(20px, env(safe-area-inset-bottom)); }
    .lpa-form fieldset { grid-template-columns: 1fr; }
    .lpa-form__actions { position: sticky; bottom: 0; margin: 0 -16px -16px; padding: 12px 16px max(12px, env(safe-area-inset-bottom)); background: var(--lpa-paper); box-shadow: 0 -8px 22px rgba(0,0,0,.08); }
    .lpa-photo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .lpa-comment-form { grid-template-columns: 1fr; }
    .lpa-comment-form .lpa-button { width: 100%; }
    .lpa-lightbox { padding: 60px 12px 75px; }
    .lpa-lightbox__nav { width: 40px; height: 55px; }
    .lpa-lightbox__nav.is-prev { left: 7px; }
    .lpa-lightbox__nav.is-next { right: 7px; }
}
