*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: "SF Pro", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
    background: linear-gradient(180deg, #FFCAD6 0%, #E3FFF9 100%);
    color: #595461;
}

.page-first-list {
    min-height: 100vh;
    max-width: 1440px;
    margin: 0 auto;
    padding: 24px 24px 56px;
}

.first-list-header,
.first-layout,
.first-list-empty {
    width: min(1080px, 100%);
    margin-left: auto;
    margin-right: auto;
}

.first-list-header {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 16px;
    align-items: center;
    margin-bottom: 28px;
}

.first-list-back,
.first-list-add {
    width: fit-content;
    font-size: 16px;
    font-weight: 700;
}

.first-list-back {
    color: #ED688D;
    text-decoration: none;
}

.first-list-add {
    border: none;
    cursor: pointer;
    padding: 12px 22px;
    border-radius: 999px;
    color: #4DA39F;
    background: #A5E1D4;
}

.first-list-title-wrap {
    text-align: center;
}

.first-list-kicker {
    margin: 0 0 8px;
    color: #4DA39F;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.first-list-title {
    margin: 0;
    font-size: clamp(28px, 3.4vw, 42px);
    color: #ED688D;
}

.first-list-range {
    margin: 10px 0 0;
    color: #757575;
    font-size: 16px;
}

.first-layout {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr) 260px;
    gap: 22px;
    align-items: start;
}

.first-panel {
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.42);
    box-shadow: 0 18px 36px rgba(148, 124, 137, 0.08);
    backdrop-filter: blur(6px);
}

.first-panel--thumbs,
.first-panel--gallery {
    padding: 18px;
}

.first-panel--timeline {
    padding: 18px 20px;
}

.first-panel-title {
    margin: 0 0 16px;
    color: #5f5964;
    font-size: 28px;
    font-weight: 700;
}

.first-thumb-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.first-thumb-item {
    display: grid;
    grid-template-columns: 26px 1fr auto;
    gap: 10px;
    align-items: center;
    padding: 10px 12px;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(165, 225, 212, 0.72), rgba(255, 255, 255, 0.92));
    color: #54505b;
    text-decoration: none;
}

.first-thumb-dot {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ED688D;
    background: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    font-weight: 700;
}

.first-thumb-title {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 14px;
    font-weight: 600;
}

.first-thumb-arrow {
    color: #5c5963;
    font-size: 16px;
    font-weight: 700;
}

.first-list-grid {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding-left: 26px;
}

.first-list-grid::before {
    content: "";
    position: absolute;
    left: 9px;
    top: 8px;
    bottom: 8px;
    width: 3px;
    border-radius: 99px;
    background: linear-gradient(180deg, rgba(237, 104, 141, 0.5), rgba(77, 163, 159, 0.45));
}

.first-card {
    position: relative;
    padding: 18px 18px 20px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.86);
    box-shadow: 0 14px 30px rgba(148, 124, 137, 0.12);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.first-card-link {
    display: block;
    color: inherit;
    text-decoration: none;
}

.first-card::before {
    content: "";
    position: absolute;
    left: -24px;
    top: 24px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #ED688D;
    box-shadow: 0 0 0 5px rgba(255, 202, 214, 0.75);
}

.first-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 18px 36px rgba(148, 124, 137, 0.16);
}

.first-card-delete {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 2;
    border: none;
    border-radius: 999px;
    padding: 8px 12px;
    background: transparent;
    color: #5b5660;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.first-card-delete:hover {
    opacity: 0.85;
}

.first-card-main {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 14px;
    align-items: start;
}

.first-card-text {
    min-width: 0;
}

.first-card-media {
    flex-shrink: 0;
    width: 130px;
    height: 92px;
    border-radius: 18px;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(255, 202, 214, 0.75), rgba(165, 225, 212, 0.72));
}

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

.first-card-date {
    display: inline-block;
    margin-bottom: 8px;
    color: #4DA39F;
    font-size: 14px;
    font-weight: 700;
}

.first-card-title {
    margin: 0 0 10px;
    font-size: 22px;
    color: #524d58;
}

.first-card-description {
    margin: 10px 0 0;
    color: #757575;
    line-height: 1.7;
}

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

.first-gallery-item {
    display: block;
    aspect-ratio: 1 / 1;
    border-radius: 18px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.88);
    box-shadow: 0 12px 28px rgba(148, 124, 137, 0.12);
}

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

.first-gallery-item--empty {
    background: rgba(255, 255, 255, 0.5);
}

.first-list-empty {
    text-align: center;
    color: #757575;
    font-size: 18px;
    margin-top: 60px;
}

.first-compose-modal {
    position: fixed;
    inset: 0;
    z-index: 30;
    display: grid;
    place-items: center;
    padding: 20px;
    background: rgba(90, 79, 91, 0.32);
}

.first-compose-modal[hidden] {
    display: none;
}

.first-compose-modal-card {
    width: min(620px, 100%);
    max-height: 88vh;
    overflow: auto;
    padding: 22px;
    border-radius: 26px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 24px 48px rgba(84, 80, 91, 0.2);
}

.first-compose-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 12px;
}

.first-compose-modal-title {
    margin: 0;
    color: #ED688D;
    font-size: 28px;
}

.first-compose-modal-close {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    color: #ED688D;
    font-size: 24px;
    background: rgba(255, 202, 214, 0.65);
}

.first-compose-modal-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.first-compose-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.first-compose-field span {
    color: #4DA39F;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.first-compose-field input,
.first-compose-field textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid rgba(237, 104, 141, 0.18);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.98);
    font: inherit;
    color: #544e59;
    outline: none;
}

.first-compose-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.first-compose-btn {
    min-width: 128px;
    padding: 12px 18px;
    border: none;
    border-radius: 999px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
}

.first-compose-btn--ghost {
    color: #757575;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: inset 0 0 0 1px rgba(117, 117, 117, 0.2);
}

.first-compose-btn--mint {
    color: #4DA39F;
    background: #A5E1D4;
}

.first-compose-feedback {
    margin: 0;
    color: #4DA39F;
    font-weight: 700;
}

@media (max-width: 760px) {
    .page-first-list {
        padding: 20px 16px 40px;
    }

    .first-list-header {
        grid-template-columns: 1fr;
        justify-items: center;
    }

    .first-layout {
        grid-template-columns: 1fr;
    }

    .first-list-grid {
        padding-left: 18px;
    }

    .first-card::before {
        left: -17px;
    }

    .first-card-main {
        grid-template-columns: 1fr;
    }

    .first-card-media {
        width: 100%;
        height: 140px;
    }

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