
.media_page {
    width: 100%;
    padding: 12px 0 60px 0;
}

.media_page_inner {
    width: min(1380px, calc(100% - 32px));
    margin: 0 auto;
}

.media_header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

.media_kicker {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 12px;
    border-radius: 9px;
    background: #111827;
    color: #ffffff;
    font-size: 11px;
    font-weight: 100;
    letter-spacing: 0.08em;
    margin-bottom: 12px;
}

.media_header_text h2 {
    margin: 0 0 10px 0;
    font-size: 33px;
    line-height: 1.05;
    color: #15263d;
    font-weight: 900;
    letter-spacing: -0.03em;
}

.media_header_text p {
    margin: 0;
    color: #627487;
    font-size: 15px;
    line-height: 1.8;
}

.media_add_btn {
    min-width: 160px;
    min-height: 48px;
    padding: 0 18px;
    border-radius: 12px;
    border: 0;
    cursor: pointer;
}

.media_masonry {
    column-count: 5;
    column-gap: 18px;
}

.media_card {
    break-inside: avoid;
    -webkit-column-break-inside: avoid;
    page-break-inside: avoid;
    margin-bottom: 18px;
}

.media_card_button {
    display: block;
    width: 100%;
    text-align: left;
    border: 1px solid #d9dee5;
    border-radius: 18px;
    background: #ffffff;
    overflow: hidden;
    box-shadow: 0 8px 22px rgba(0,0,0,0.06);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
    cursor: pointer;
    padding: 0;
}

.media_card_button:hover {
    transform: translateY(-4px);
    border-color: #bfd4ec;
    box-shadow: 0 16px 34px rgba(0,0,0,0.11);
}

.media_card_visual {
    position: relative;
    overflow: hidden;
    background: #eef3f8;
}

.media_visual_square {
    aspect-ratio: 1 / 1;
}

.media_visual_landscape {
    aspect-ratio: 16 / 10;
}

.media_visual_portrait {
    aspect-ratio: 4 / 5.8;
}

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

.media_type_badge {
    position: absolute;
    top: 12px;
    right: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    background: rgba(12,20,31,0.82);
    color: #ffffff;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.04em;
}

.media_card_body {
    padding: 16px 16px 18px 16px;
}

.media_card_body h3 {
    margin: 0 0 8px 0;
    font-size: 20px;
    line-height: 1.3;
    color: #16263d;
    font-weight: 800;
    word-break: keep-all;
}

.media_card_body p {
    margin: 0;
    font-size: 14px;
    color: #627487;
    line-height: 1.75;
    word-break: keep-all;
}

.media_card_meta {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 12px;
    color: #7a8796;
    font-size: 12px;
    font-weight: 600;
}

.media_card_meta span {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
}

.media_card_tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 12px;
}

.media_card_tags span {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 0 10px;
    border-radius: 999px;
    background: #eef5ff;
    color: #24508d;
    font-size: 12px;
    font-weight: 700;
}

.floating_layer {
    position: fixed;
    inset: 0;
    z-index: 5000;
    display: none;
}

.floating_layer.is_open {
    display: block;
}

.floating_layer_dim {
    position: absolute;
    inset: 0;
    background: rgba(10, 16, 26, 0.58);
    backdrop-filter: blur(3px);
}

.floating_layer_dialog {
    position: absolute;
    top: 50%;
    left: 50%;
    width: min(1120px, calc(100vw - 40px));
    height: 74vh;
    max-height: 74vh;
    transform: translate(-50%, -50%);
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 24px 50px rgba(0,0,0,0.22);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.floating_layer_dialog_wide {
    width: min(980px, calc(100vw - 40px));
}

.floating_layer_close {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 5;
    width: 42px;
    height: 42px;
    border-radius: 999px;
    background: rgba(12,20,31,0.08);
    color: #18283b;
    font-size: 28px;
    line-height: 1;
    border: 0;
    cursor: pointer;
}

.floating_layer_header {
    padding: 26px 28px 18px 28px;
    border-bottom: 1px solid #edf1f5;
}

.floating_layer_kicker {
    margin-bottom: 8px;
    font-size: 12px;
    font-weight: 800;
    color: #4f79b0;
    letter-spacing: 0.08em;
}

.floating_layer_header h3 {
    margin: 0 0 8px 0;
    font-size: 28px;
    line-height: 1.25;
    color: #15263d;
    font-weight: 800;
}

.floating_layer_header p {
    margin: 0;
    font-size: 15px;
    color: #627487;
}

.floating_layer_body {
    padding: 24px 28px 28px 28px;
    overflow: auto;
    flex: 1 1 auto;
    min-height: 0;
}

.floating_detail_layout {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.8fr);
    gap: 24px;
    align-items: stretch;
    min-height: 100%;
    height: 100%;
}

.floating_detail_media {
    border: 1px solid #e2e8ef;
    border-radius: 14px;
    background: #f6f8fb;
    overflow: hidden;
    min-height: 0;
    height: 100%;
}

.floating_detail_media img,
.floating_detail_media iframe,
.floating_detail_media video {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 100%;
    border: 0;
    background: #000;
}

.floating_detail_media img {
    object-fit: contain;
    background: #f6f8fb;
}

.floating_detail_media iframe,
.floating_detail_media video {
    background: #000;
}

.floating_detail_text {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-height: 0;
    height: 100%;
}

.floating_detail_meta {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    color: #5b6f84;
    font-size: 14px;
    font-weight: 600;
}

.floating_detail_meta span {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 12px;
    border-radius: 999px;
    background: #f0f5fb;
}

.floating_detail_tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.floating_detail_tags span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    background: #eef5ff;
    color: #24508d;
    font-size: 12px;
    font-weight: 700;
}

.floating_detail_body {
    font-size: 15px;
    line-height: 1.8;
    color: #34475b;
    white-space: pre-line;
    overflow: auto;
    min-height: 0;
}

.posting_create_form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

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

.posting_form_row {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.posting_form_row_full {
    grid-column: 1 / -1;
}

.posting_form_row label {
    font-size: 14px;
    font-weight: 700;
    color: #213349;
}

.posting_form_row input[type="text"],
.posting_form_row input[type="file"],
.posting_form_row select,
.posting_form_row textarea {
    width: 100%;
    min-height: 48px;
    padding: 12px 14px;
    border: 1px solid #d6dee8;
    border-radius: 10px;
    background: #ffffff;
    color: #1b2d40;
    outline: none;
    box-sizing: border-box;
}

.posting_form_row textarea {
    min-height: 130px;
    resize: vertical;
}

.posting_form_row input:focus,
.posting_form_row select:focus,
.posting_form_row textarea:focus {
    border-color: #8fb5ea;
    box-shadow: 0 0 0 4px rgba(18, 89, 195, 0.08);
}

.posting_form_actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.btn_primary,
.btn_secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 140px;
    min-height: 48px;
    padding: 0 18px;
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
}

.btn_primary {
    background: #1259c3;
    color: #ffffff;
    box-shadow: 0 8px 18px rgba(18, 89, 195, 0.18);
    border: 0;
}

.btn_secondary {
    background: #ffffff;
    color: #23364b;
    border: 1px solid #d3dce7;
}

.floating_detail_actions {
    margin-top: 10px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

@media (max-width: 1400px) {
    .media_masonry {
        column-count: 4;
    }
}

@media (max-width: 1100px) {
    .media_masonry {
        column-count: 3;
    }
}

@media (max-width: 920px) {
    .media_masonry {
        column-count: 2;
    }

    .floating_detail_layout {
        grid-template-columns: repeat(1, minmax(0, 1fr));
    }

    .posting_create_grid {
        grid-template-columns: repeat(1, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .media_page_inner {
        width: min(100%, calc(100% - 20px));
    }

    .media_masonry {
        column-count: 2;
        column-gap: 14px;
    }

    .media_card {
        margin-bottom: 14px;
    }

    .floating_layer_dialog,
    .floating_layer_dialog_wide {
        width: calc(100vw - 20px);
        height: 78vh;
        max-height: 78vh;
    }

    .floating_layer_header {
        padding: 20px 20px 14px 20px;
    }

    .floating_layer_body {
        padding: 18px 20px 20px 20px;
    }

    .floating_layer_header h3 {
        font-size: 24px;
    }

    .posting_form_actions {
        flex-direction: column;
    }

    .btn_primary,
    .btn_secondary,
    .media_add_btn {
        width: 100%;
    }
}

@media (max-width: 460px) {
    .media_masonry {
        column-count: 1;
    }
}













.media_edit_page {
    width: 100%;
    padding: 12px 0 20px 0;
}

.media_edit_intro {
    width: min(1380px, calc(100% - 32px));
    margin: 0 auto;
}

.media_edit_kicker {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 12px;
    border-radius: 9px;
    background: #111827;
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    margin-bottom: 12px;
}

.media_edit_intro h2 {
    margin: 0 0 10px 0;
    font-size: 33px;
    line-height: 1.05;
    color: #15263d;
    font-weight: 900;
    letter-spacing: -0.03em;
}

.media_edit_intro p {
    margin: 0;
    color: #627487;
    font-size: 15px;
    line-height: 1.8;
}

.media_edit_window_layer {
    position: relative;
    width: min(1380px, calc(100% - 32px));
    margin: 0 auto 60px auto;
}

.media_edit_window_dim {
    position: absolute;
    inset: 0;
    border-radius: 28px;
    background: linear-gradient(180deg, rgba(18,89,195,0.06), rgba(18,89,195,0.02));
    pointer-events: none;
}

.media_edit_window {
    position: relative;
    min-height: 72vh;
    background: #ffffff;
    border-radius: 24px;
    box-shadow: 0 24px 50px rgba(0,0,0,0.12);
    border: 1px solid #e5ebf2;
    overflow: hidden;
}

.media_edit_window_header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 22px 24px;
    border-bottom: 1px solid #edf1f5;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.media_edit_window_title_group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.media_edit_window_kicker {
    font-size: 12px;
    font-weight: 800;
    color: #4f79b0;
    letter-spacing: 0.08em;
}

.media_edit_window_title_group h3 {
    margin: 0;
    font-size: 24px;
    line-height: 1.25;
    color: #15263d;
    font-weight: 800;
}

.media_edit_window_controls {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.media_edit_window_btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 14px;
    border-radius: 10px;
    background: #ffffff;
    color: #23364b;
    border: 1px solid #d3dce7;
    font-weight: 700;
}

.media_edit_window_body {
    padding: 24px;
}

.media_edit_form {
    gap: 22px;
}

.media_edit_notice_box {
    border: 1px solid #e0e7ef;
    border-radius: 16px;
    background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
    padding: 24px;
    box-shadow: 0 8px 22px rgba(0,0,0,0.04);
}

.media_edit_notice_box p {
    margin: 0 0 18px 0;
    font-size: 15px;
    color: #34475b;
    line-height: 1.8;
}

@media (max-width: 920px) {
    .media_edit_window_layer,
    .media_edit_intro {
        width: min(100%, calc(100% - 20px));
    }

    .media_edit_window_header {
        flex-direction: column;
        align-items: flex-start;
    }

    .media_edit_window_body {
        padding: 18px;
    }

    .media_edit_window {
        min-height: auto;
    }
}