.jjm-upload-wrap,
.jjm-grid-wrap {
    max-width: 1180px;
    margin: 32px auto;
    font-family: inherit;
}

.jjm-upload-card {
    background: #fff;
    border-radius: 24px;
    border: 1px solid rgba(0,0,0,.08);
    box-shadow: 0 16px 44px rgba(0, 31, 86, .12);
    padding: 28px;
    max-width: 560px;
    margin: 0 auto 28px;
}

.jjm-upload-card h2,
.jjm-grid-title {
    margin: 0 0 12px;
    color: #204392;
    font-weight: 900;
    line-height: 1.1;
}

.jjm-grid-title {
    color: #ffffff;
}

.jjm-upload-intro {
    margin: 0 0 20px;
    color: #334;
    line-height: 1.45;
}

.jjm-upload-form {
    display: grid;
    gap: 16px;
}

.jjm-field {
    display: grid;
    gap: 7px;
}

.jjm-field label {
    font-weight: 800;
    color: #204392;
}

.jjm-field input[type="file"] {
    width: 100%;
    box-sizing: border-box;
    border: 2px solid rgba(32, 67, 146, .16);
    border-radius: 14px;
    padding: 13px;
    background: #fff;
    font: inherit;
}

.jjm-field small {
    color: #5d6472;
    line-height: 1.35;
}

.jjm-consent {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: #f6f8fb;
    border-radius: 14px;
    padding: 12px;
    font-size: 14px;
    line-height: 1.35;
    color: #334;
}

.jjm-consent input {
    margin-top: 3px;
}

.jjm-submit,
.jjm-load-more {
    appearance: none;
    border: 0;
    background: #204392;
    color: #fff;
    border-radius: 999px;
    padding: 13px 20px;
    font: inherit;
    font-weight: 900;
    cursor: pointer;
    box-shadow: 0 10px 24px rgba(32,67,146,.22);
}

.jjm-submit:disabled,
.jjm-load-more:disabled {
    opacity: .55;
    cursor: not-allowed;
}

.jjm-status {
    min-height: 22px;
    margin: 0;
    font-weight: 700;
    color: #204392;
}

.jjm-status.is-error {
    color: #b42318;
}

.jjm-hp {
    position: absolute;
    left: -9999px;
    opacity: 0;
    pointer-events: none;
}

.jjm-grid-title {
    text-align: center;
    font-size: clamp(28px, 4vw, 48px);
    margin-bottom: 24px;
}

.jjm-grid {
    --jjm-columns: 5;
    display: grid;
    grid-template-columns: repeat(var(--jjm-columns), minmax(0, 1fr));
    gap: 18px;
}

.jjm-item {
    margin: 0;
}

.jjm-item-button {
    display: block;
    width: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: zoom-in;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 12px 34px rgba(0,0,0,.12);
    transition: transform .18s ease, box-shadow .18s ease;
}

.jjm-item-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 44px rgba(0,0,0,.18);
}

.jjm-item img {
    display: block;
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    background: #e8edf7;
}

.jjm-empty {
    grid-column: 1 / -1;
    text-align: center;
    color: #4d5668;
}

.jjm-load-more-wrap {
    text-align: center;
    margin-top: 26px;
}

.jjm-lightbox {
    position: fixed;
    inset: 0;
    z-index: 999999;
    background: rgba(0,0,0,.82);
    display: grid;
    place-items: center;
    padding: 28px;
}

.jjm-lightbox[hidden] {
    display: none;
}

.jjm-lightbox img {
    display: block;
    max-width: min(92vw, 540px);
    max-height: 88vh;
    border-radius: 20px;
    box-shadow: 0 24px 80px rgba(0,0,0,.45);
}

.jjm-lightbox-close {
    position: fixed;
    top: 18px;
    right: 18px;
    width: 44px;
    height: 44px;
    border-radius: 999px;
    border: 0;
    background: #fff;
    color: #111;
    font-size: 30px;
    line-height: 1;
    cursor: pointer;
}

@media (max-width: 1024px) {
    .jjm-grid { grid-template-columns: repeat(min(var(--jjm-columns), 4), minmax(0, 1fr)); }
}

@media (max-width: 760px) {
    .jjm-upload-wrap,
    .jjm-grid-wrap { margin: 22px auto; }

    .jjm-upload-card { padding: 20px; }

    .jjm-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }
}
