/* ============================================
   PAMUSHA EDIT — Fluid Mood Board Canvas
   Organic, draggable, imperfect, tactile
   ============================================ */

/* --- Page base --- */
.edit-page {
    background-color: var(--ivory);
}

/* --- Editorial header --- */
.edit-header {
    padding: 110px var(--edge) 0;
    max-width: 1600px;
    margin: 0 auto;
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: var(--space-lg);
}

.edit-wordmark {
    font-family: var(--font-header);
    font-size: clamp(1.6rem, 3vw, 2.6rem);
    font-weight: 300;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--ivory);
    line-height: 1;
}

.edit-wordmark em {
    font-style: italic;
    letter-spacing: 0.06em;
    color: var(--seasonal-two);
}

.edit-tagline {
    display: block;
    font-family: var(--font-body);
    font-size: 0.62rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--seasonal-four);
    line-height: 1.6;
    text-align: right;
    max-width: none;
    margin-left: auto;
    text-decoration: none;
    transition: opacity var(--transition-fast);
}

a.edit-tagline:hover {
    opacity: 0.7;
}

/* --- Divider line --- */
.edit-rule {
    max-width: 1600px;
    margin: var(--space-lg) auto 0;
    padding: 0 var(--edge);
}

.edit-rule hr {
    border: none;
    border-top: 1px solid rgba(191, 184, 175, 0.18);
    margin: 0;
}

/* --- Grid wrapper (now a canvas container) --- */
.edit-grid-wrap {
    padding: var(--space-lg) var(--edge) var(--space-xl);
    max-width: 1600px;
    margin: 0 auto;
    position: relative;
}

/* Single-line "Follow Us on Instagram" link centered beneath the collage.
   Matches the top-right tagline font (.edit-tagline). */
.edit-follow {
    display: flex;
    justify-content: center;
    text-align: center;
    width: 100%;
    margin: var(--space-xl) 0 var(--space-md);
}

.edit-follow a {
    font-family: var(--font-body);
    font-size: 0.62rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--seasonal-four);
    text-decoration: none;
    transition: opacity var(--transition-fast);
}

.edit-follow a:hover {
    opacity: 0.7;
}

/* Mobile/tablet only: left-align the "Follow Us on Instagram" link so it lines
   up with the .edit-tagline keyword list at the top (same left edge/padding).
   Vertical position is unchanged. Desktop (≥1025px) stays centered. */
@media (max-width: 1024px) {
    .edit-follow.edit-follow {
        justify-content: flex-start !important;
        text-align: left !important;
    }
}

/* --- Mood board canvas ---
   Fixed 5-up grid at every screen size. A real grid (rather than CSS
   column-count masonry) keeps every row exactly 5 tiles wide and removes the
   ragged bottom gaps that column balancing produced when the window widened. */
.edit-masonry {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    width: 100%;
    background: transparent;
    user-select: none;
}

/* --- Individual tile --- */
.edit-tile {
    overflow: hidden;
    cursor: pointer;
    background-color: #4a3f3f;
    box-sizing: border-box;
    will-change: transform;
    transition: box-shadow 0.2s ease;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    display: block;
}

.edit-tile:active,
.edit-tile.dragging {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
}

.edit-tile img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    pointer-events: none;
    user-select: none;
    background: #fff;
}

.edit-tile-link {
    display: block;
    height: 100%;
}

.edit-instagram-embed {
    height: 100%;
    width: 100%;
    background: #fff;
    overflow: hidden;
    pointer-events: none;
}

.edit-instagram-embed .instagram-media {
    margin: 0 !important;
    min-width: 100% !important;
    max-width: 100% !important;
    width: 100% !important;
}

/* Placeholder tone palette — warm neutrals matching site palette */
.edit-tile {
    background-color: var(--seasonal-one);
}

.edit-tile:nth-child(3n) {
    background-color: var(--seasonal-two);
}

.edit-tile:nth-child(5n) {
    background-color: var(--seasonal-three);
}

.edit-tile:nth-child(7n) {
    background-color: #d9d5ce;
}

.edit-tile:nth-child(11n) {
    background-color: var(--seasonal-four);
    opacity: 0.8;
}

.edit-tile:nth-child(13n) {
    background-color: var(--seasonal-one);
}

/* --- Tile sizing variations --- */
.edit-tile--square,
.edit-tile--portrait,
.edit-tile--tall {
    aspect-ratio: 9 / 16;
}

/* --- Responsive ---
   The grid stays 5-up at every width (per design), so only the header layout
   changes on small screens. */
@media (max-width: 768px) {
    .edit-header {
        flex-direction: column;
        gap: var(--space-xs);
    }
    .edit-tagline {
        text-align: left;
    }
}

/* Mobile/tablet only: the keyword tagline reads too large, gets justified by a
   global `body :is(p, …)` rule in responsive.css, and `margin-left:auto` (from
   its desktop styling) pushes it off the left edge. The doubled-class selector
   `.edit-tagline.edit-tagline` (0,0,2,0) beats that :is() rule (0,0,1,1) even
   with both !important, so these win. Desktop (≥1025px) is untouched. */
@media (max-width: 767px) {
    .edit-tagline.edit-tagline {
        font-size: 0.36rem !important;   /* ~50% of the current ~11.52px */
        text-align: left !important;
        margin-left: 0 !important;
        margin-right: auto !important;
        margin-bottom: 48px !important;  /* clear gap before #music-bar-mount */
    }
}
@media (min-width: 768px) and (max-width: 1024px) {
    .edit-tagline.edit-tagline {
        font-size: 0.4rem !important;    /* ~50% of the current ~12.8px */
        text-align: left !important;
        margin-left: 0 !important;
        margin-right: auto !important;
        margin-bottom: 48px !important;
    }
}

/* --- Music Bar --- */
.music-bar {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    background: none;
    border-radius: 0 !important;
    box-shadow: none !important;
    padding: 0.09rem 0.55rem 0.09rem 0.25rem;
    font-family: var(--font-body);
    font-size: 0.64rem;
    color: var(--chestnut);
    min-width: 0;
    transition: box-shadow 0.2s;
    transform: scale(0.7);
    transform-origin: left top;
}

.music-bar:hover {
    box-shadow: 0 4px 18px 0 rgba(0, 0, 0, 0.13);
}

.music-btn {
    background: none;
    border: none;
    outline: none;
    font-size: 1.2rem;
    color: var(--chestnut);
    cursor: pointer;
    margin-right: 0.1rem;
    padding: 0.1rem 0.2rem;
    border-radius: 50%;
    transition: background 0.2s;
}

.music-btn:hover {
    background: rgba(0, 0, 0, 0.06);
}

.music-title {
    font-family: var(--font-body);
    font-weight: 400;
    font-size: 0.48rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--seasonal-four);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 8rem;
}

.music-progress {
    flex: 1 1 60px;
    min-width: 60px;
    max-width: 120px;
    accent-color: var(--chestnut);
    height: 2px;
    margin: 0 0.5rem;
}

.music-time {
    font-size: 0.85em;
    color: var(--seasonal-three);
    min-width: 2.2em;
    text-align: right;
}

@media (max-width: 600px) {
    .music-bar {
        font-size: 0.8rem;
        padding: 0.12rem 0.5rem;
    }

    .music-title {
        max-width: 5.5rem;
    }

    .music-bar {
        right: 8px !important;
        top: 8px !important;
    }
}
