/* みんなの巨木｜写真3枠セレクター */
.mkps-original-input {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0 0 0 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.mkps-hide-legacy-preview,
.mkps-hide-legacy-picker {
    display: none !important;
}

.mkps-widget {
    --mkps-green: #2f7d48;
    --mkps-green-dark: #174a2c;
    --mkps-soft: #f3f8f1;
    --mkps-line: #dfe9dc;
    --mkps-muted: #7e887d;
    width: 100%;
    margin: 14px 0 6px;
    color: #233228;
    box-sizing: border-box;
}

.mkps-intro {
    margin-bottom: 12px;
}

.mkps-intro-title {
    display: block;
    margin-bottom: 4px;
    color: var(--mkps-green-dark);
    font-size: 15px;
    font-weight: 800;
    line-height: 1.4;
}

.mkps-intro-text {
    margin: 0 !important;
    color: var(--mkps-muted);
    font-size: 13px;
    line-height: 1.65;
}

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

.mkps-slot {
    position: relative;
    min-width: 0;
    min-height: 196px;
    padding: 12px;
    overflow: hidden;
    border: 1px solid var(--mkps-line);
    border-radius: 15px;
    background: #fff;
    box-shadow: 0 6px 18px rgba(31, 66, 40, .045);
    box-sizing: border-box;
}

.mkps-slot.is-filled {
    padding-bottom: 11px;
}

.mkps-slot-head {
    display: flex;
    margin-bottom: 9px;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.mkps-slot-number {
    color: #a6b5a5;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .08em;
}

.mkps-slot-hint {
    overflow: hidden;
    color: #607162;
    font-size: 11px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mkps-preview {
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: 10px;
    background: var(--mkps-soft);
}

.mkps-preview img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mkps-file-meta {
    display: flex;
    min-width: 0;
    margin-top: 8px;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    color: #7d867d;
    font-size: 11px;
}

.mkps-file-name {
    overflow: hidden;
    min-width: 0;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mkps-file-size {
    flex: 0 0 auto;
}

.mkps-actions {
    display: grid;
    margin-top: 9px;
    grid-template-columns: 1fr 1fr;
    gap: 7px;
}

.mkps-btn,
.mkps-add {
    appearance: none;
    border: 0;
    font-family: inherit;
    cursor: pointer;
}

.mkps-btn {
    min-height: 36px;
    padding: 7px 8px;
    border-radius: 9px;
    font-size: 12px;
    font-weight: 750;
}

.mkps-btn-change {
    color: var(--mkps-green-dark);
    background: #edf6eb;
}

.mkps-btn-remove {
    color: #795d57;
    background: #f7f1ef;
}

.mkps-add {
    display: flex;
    width: 100%;
    min-height: 112px;
    padding: 16px;
    align-items: center;
    justify-content: center;
    border: 1px dashed #b9cdb8;
    border-radius: 11px;
    color: var(--mkps-green);
    background: linear-gradient(180deg, #fbfdf9 0%, #f2f8ef 100%);
    font-size: 14px;
    font-weight: 800;
}

.mkps-add:hover,
.mkps-add:focus-visible,
.mkps-btn:hover,
.mkps-btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(47, 125, 72, .14);
}

.mkps-slot-note {
    display: block;
    margin-top: 8px;
    color: #99a198;
    font-size: 10px;
    line-height: 1.5;
    text-align: center;
}

.mkps-slot-picker {
    display: none !important;
}

.mkps-error {
    margin-top: 10px;
    padding: 10px 12px;
    border: 1px solid #ead7d2;
    border-radius: 9px;
    color: #8a4236;
    background: #fff7f4;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.55;
}

/* 口コミフォーム内では既存の幅を超えない */
.single-kyoboku .mkps-widget {
    max-width: 100%;
}

@media (max-width: 720px) {
    .mkps-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .mkps-slot {
        min-height: 0;
    }

    .mkps-slot:not(.is-filled) {
        padding: 10px;
    }

    .mkps-add {
        min-height: 72px;
    }

    .mkps-preview {
        aspect-ratio: 16 / 10;
    }
}
