/* Longform: a magazine page on paper. Focus, title, standfirst and byline, then the
   cover as a full-width plate, the piece, and after it the record it's about, the
   writer and their other longform. In the app the header takes the cover's colour. */
body.curator-longform-page {
    background: var(--longform-paper);
    color: var(--entry-ink, var(--rh-ink));
}

body.curator-longform-page > main {
    width: 100%;
    max-width: none;
    flex: 0 0 auto;
    margin: 0;
}

.curator-longform-shell {
    --longform-gutter: 20px;
    --longform-column: 680px;
    --longform-note-paper: var(--rh-note-paper);
    position: relative;
    box-sizing: border-box;
    width: 100%;
    margin: 0 auto;
    padding: 0 0 3rem;
    text-align: left;
}

.curator-longform-article,
.curator-longform-footer {
    box-sizing: border-box;
    width: 100%;
    max-width: calc(var(--longform-column) + var(--longform-gutter) * 2);
    margin: 0 auto;
    padding: 0 var(--longform-gutter);
}

/* Heading */
.curator-longform-shell :is(.curator-longform-heading, .curator-longform-heading *, .curator-longform-footer, .curator-longform-footer *) { text-align: left; }
.curator-longform-shell .curator-longform-heading {
    display: grid;
    justify-items: start;
    padding: 20px 0 0;
}

.curator-longform-focus {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    max-width: 100%;
    min-height: 32px;
    box-sizing: border-box;
    margin: 0;
    padding: 0 12px;
    border: 0;
    border-radius: 16px;
    background: color-mix(in srgb, var(--entry-ink) 7%, transparent);
    color: var(--entry-ink);
    font: 500 13px/1.2 var(--rh-sans);
    letter-spacing: -0.02em;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
}
/* With art, the chip's corners follow the cover's, 4px out. */
.curator-longform-focus:has(.curator-longform-focus-art:not([hidden])) { padding-left: 4px; border-radius: 8px; }
.curator-longform-focus-art { flex: none; width: 24px; height: 24px; overflow: hidden; border-radius: 4px; background: var(--entry-art); }
.curator-longform-focus-art[hidden] { display: none; }
.curator-longform-focus-art img { display: block; width: 100%; height: 100%; object-fit: cover; }
.curator-longform-focus-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.curator-longform-focus-subtitle { flex: none; color: var(--entry-muted); font-weight: 400; }
.curator-longform-focus-subtitle[hidden] { display: none; }
.curator-longform-focus-subtitle::before { content: "· "; }
button.curator-longform-focus { cursor: pointer; }
button.curator-longform-focus:not(.is-edit) { color: var(--entry-muted); }
button.curator-longform-focus.is-updating .curator-longform-focus-name { opacity: 0.55; }

.curator-longform-heading h1 {
    margin: 20px 0 0;
    color: var(--entry-ink);
    font: 500 44px/0.98 var(--rh-sans);
    letter-spacing: -0.055em;
    overflow-wrap: anywhere;
    text-wrap: balance;
}

.curator-longform-shell .curator-longform-deck {
    margin: 16px 0 0;
    color: color-mix(in srgb, var(--entry-ink) 82%, var(--entry-muted));
    font: 400 25px/1.16 var(--rh-editorial-statement-font);
    letter-spacing: -0.005em;
    overflow-wrap: anywhere;
    text-wrap: pretty;
}

.curator-longform-byline-row {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    margin-top: 22px;
    padding-bottom: 22px;
    border-bottom: 1px solid var(--rh-line);
}

.curator-longform-byline {
    display: flex;
    flex: 1;
    align-items: center;
    gap: 10px;
    min-width: 0;
    color: inherit;
    text-decoration: none;
}

.curator-longform-byline-avatar,
.curator-longform-author-avatar {
    position: relative;
    display: grid;
    flex: none;
    place-items: center;
    overflow: hidden;
    border-radius: 50%;
    background: var(--avatar-tone, var(--entry-art));
    color: #f4f1ea;
    font: 500 15px/1 var(--rh-sans);
}
.curator-longform-byline-avatar { width: 40px; height: 40px; }
.curator-longform-byline-avatar img,
.curator-longform-author-avatar img { display: block; width: 100%; height: 100%; object-fit: cover; }

.curator-longform-byline-copy { display: grid; gap: 2px; min-width: 0; }
.curator-longform-byline-copy strong { overflow: hidden; color: var(--entry-ink); font: 500 15px/1.25 var(--rh-sans); letter-spacing: -0.02em; text-overflow: ellipsis; white-space: nowrap; }
.curator-longform-byline-copy > span { color: var(--entry-muted); font: 400 14px/1.3 var(--rh-sans); letter-spacing: -0.01em; }

.curator-longform-heart { flex: none; margin-right: -11px; font-size: 15px; }
.curator-longform-heart svg { width: 22px; height: 22px; }
.curator-longform-heart:disabled { cursor: default; }

/* Cover: the plate between the heading and the piece. */
.curator-longform-cover {
    position: relative;
    display: grid;
    place-items: center;
    width: auto;
    /* The cover keeps the 1.82:1 the app's cropper gives it, so nothing is cut. */
    aspect-ratio: 1.82;
    margin: 22px calc(-1 * var(--longform-gutter)) 0;
    overflow: hidden;
    background: var(--entry-art);
}
.curator-longform-cover:not(.has-image) { aspect-ratio: auto; }
.curator-longform-cover figure { position: absolute; inset: 0; margin: 0; }
.curator-longform-cover figure[hidden] { display: none; }
.curator-longform-cover img { display: block; width: 100%; height: 100%; object-fit: cover; opacity: 1; transition: opacity 0.42s ease; }
.curator-longform-cover figure.is-loading img { opacity: 0; }
.curator-longform-cover figure.is-revealing img { animation: curator-longform-artwork-reveal 0.42s ease-out both; transition: none; }
.curator-longform-cover figure > .curator-artwork-loading { opacity: 0; }
.curator-longform-cover figure.is-loading > .curator-artwork-loading { opacity: 1; }
/* Readers without a cover see no plate at all. */
.curator-longform-cover:not(.has-image):not(:has(> button)) { display: none; }

.curator-longform-cover > button {
    position: relative;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--entry-muted);
    font: 500 15px/1.2 var(--rh-sans);
    letter-spacing: -0.02em;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}
.curator-longform-cover:not(.has-image) > button { min-height: 168px; width: 100%; justify-content: center; }
.curator-longform-cover-add-mark { display: grid; width: 20px; height: 20px; place-items: center; }
.curator-longform-cover-add-mark svg { display: block; width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.curator-longform-cover.has-image > button {
    position: absolute;
    right: 12px;
    bottom: 12px;
    height: 32px;
    padding: 0 13px;
    border-radius: 16px;
    background: rgba(20, 19, 18, 0.42);
    color: #f1efe9;
    font-size: 13px;
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
}
.curator-longform-cover.has-image > button .curator-longform-cover-add-mark { width: 17px; height: 17px; }
.curator-longform-cover.is-uploading::after {
    position: absolute;
    z-index: 5;
    inset: 0;
    display: grid;
    place-items: center;
    background: color-mix(in srgb, var(--longform-paper) 66%, transparent);
    color: var(--entry-muted);
    content: "Preparing cover…";
    font: 500 15px/1 var(--rh-sans);
    letter-spacing: -0.02em;
}

/* The piece */
.curator-longform-body-card {
    position: relative;
    min-width: 0;
    margin-top: 26px;
}
.curator-longform-writing-header,
.curator-longform-begin-writing { display: none; }

.curator-longform-body {
    position: relative;
    min-width: 0;
    color: var(--entry-ink);
    font: 400 18px/1.62 var(--rh-sans);
    letter-spacing: -0.014em;
    overflow-wrap: anywhere;
    word-break: break-word;
    white-space: pre-wrap;
    outline: none;
}
.curator-longform-body > [data-longform-text-block] { min-height: 1.62em; margin: 0 0 18px; white-space: pre-wrap; }
/* Readers don't see the blank lines kept between paragraphs. */
.curator-longform-body:not([contenteditable="true"]) > [data-longform-text-block]:has(> br:only-child) { display: none; }
.curator-longform-body a { text-underline-offset: 0.2em; }
.curator-longform-body-card.is-empty .curator-longform-body { color: color-mix(in srgb, var(--entry-ink) 34%, transparent); }
.curator-longform-body-card.is-empty .curator-longform-body::before {
    position: absolute;
    inset: 0 auto auto 0;
    color: color-mix(in srgb, var(--entry-ink) 34%, transparent);
    content: attr(data-placeholder);
    pointer-events: none;
}
.curator-longform-caret-probe { display: inline-block; width: 0; height: 1em; overflow: hidden; pointer-events: none; vertical-align: -0.08em; }
.curator-longform-body-count { position: absolute; right: 0; bottom: -1.4rem; color: var(--entry-muted); font: 400 12px/1 var(--rh-sans); opacity: 0; }
.curator-longform-body-card:focus-within .curator-longform-body-count { opacity: 1; }

/* Track and album: a note-paper card with the record, its preview or Spotify. */
.curator-longform-track-embed {
    position: relative;
    display: grid;
    grid-template-columns: 56px minmax(0, 1fr) 38px;
    gap: 14px;
    align-items: center;
    min-width: 0;
    margin: 26px 0;
    padding: 12px;
    border-radius: 4px;
    background: var(--longform-note-paper);
    box-shadow: 0 3px 14px rgba(25, 21, 16, 0.04);
    color: var(--entry-ink);
    white-space: normal;
}
.curator-longform-track-embed:focus-visible { outline: 2px solid var(--entry-ink); outline-offset: 2px; }
.curator-longform-track-art { display: block; width: 56px; height: 56px; overflow: hidden; background: var(--entry-art); }
.curator-longform-track-art img { display: block; width: 100%; height: 100%; object-fit: cover; }
.curator-longform-track-copy { display: grid; gap: 2px; min-width: 0; }
.curator-longform-track-copy small { margin-bottom: 2px; color: var(--entry-muted); font: 400 13px/1.2 var(--rh-sans); }
.curator-longform-track-copy > a { overflow: hidden; color: inherit; font: 500 17px/1.2 var(--rh-sans); letter-spacing: -0.03em; text-decoration: none; text-overflow: ellipsis; white-space: nowrap; }
.curator-longform-track-copy > span { overflow: hidden; color: var(--entry-muted); font: 400 14px/1.3 var(--rh-sans); text-overflow: ellipsis; white-space: nowrap; }
.curator-longform-track-control,
.curator-longform-album-link {
    position: relative;
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border-radius: 50%;
    background: color-mix(in srgb, var(--entry-ink) 8%, transparent);
    color: var(--entry-ink);
}
.curator-longform-album-link svg { width: 18px; height: 18px; fill: currentColor; }
.curator-longform-track-provider {
    position: absolute;
    top: 50%;
    right: calc(100% + 6px);
    display: grid;
    width: 14px;
    height: 14px;
    place-items: center;
    color: var(--entry-muted);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-50%);
    transition: opacity 0.34s ease, visibility 0s linear 0.34s;
}
.curator-longform-track-provider[hidden] { display: none; }
.curator-longform-track-control .curator-longform-track-provider svg { width: 14px; height: 14px; fill: currentColor; stroke: none; }
.curator-longform-track-embed[data-has-track-provider="true"].is-playing .curator-longform-track-provider { opacity: 1; visibility: visible; pointer-events: auto; transition: opacity 0.34s ease, visibility 0s linear 0s; }
.curator-longform-track-control .curator-track-media-toggle,
.curator-longform-track-control [data-track-preview-fallback] { display: grid; width: 100%; height: 100%; place-items: center; color: inherit; }
.curator-longform-track-control .curator-track-media-toggle[hidden],
.curator-longform-track-control [data-track-preview-fallback][hidden] { display: none; }
.curator-longform-track-control :is(.curator-track-media-icon--headphones, .curator-track-media-icon--playing, .curator-track-media-icon--loading svg),
.curator-longform-track-control [data-track-preview-fallback] svg { width: 18px; height: 18px; }
.curator-longform-track-embed.is-loading-preview .curator-track-media-icon--loading { position: static; inset: auto; grid-area: 1 / 1; width: 18px; height: 18px; transform: none; }
.curator-longform-track-control svg { display: block; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }

/* Quote: a pull quote in the statement face, indented, its opening mark hung in the indent. */
.curator-longform-quote { position: relative; min-width: 0; margin: 34px 0; color: var(--entry-ink); white-space: normal; }
.curator-longform-shell .curator-longform-quote blockquote {
    position: relative;
    min-height: 1.1em;
    margin: 0;
    padding-left: 0.62em;
    color: inherit;
    font: 400 31px/1.08 var(--rh-editorial-statement-font);
    letter-spacing: -0.01em;
    overflow-wrap: anywhere;
    text-wrap: balance;
    white-space: pre-wrap;
    outline: none;
}
.curator-longform-quote blockquote:not(:empty)::before { position: absolute; top: 0; left: 0; content: "\201C"; pointer-events: none; }
.curator-longform-quote blockquote:not(:empty)::after { content: "\201D"; pointer-events: none; }
.curator-longform-quote blockquote[contenteditable="true"]:empty::before { color: color-mix(in srgb, var(--entry-ink) 32%, transparent); content: attr(data-placeholder); pointer-events: none; }

/* Image: full width on phones, with its caption. */
.curator-longform-image-embed { position: relative; min-width: 0; margin: 30px calc(-1 * var(--longform-gutter)); white-space: normal; }
.curator-longform-image-frame { position: relative; display: block; width: 100%; overflow: hidden; background: var(--entry-art); }
.curator-longform-image-frame img { display: block; width: 100%; max-height: 44rem; object-fit: contain; transition: opacity 0.38s ease; }
.curator-longform-image-frame.is-loading img { opacity: 0; }
.curator-longform-image-frame.is-revealing img { animation: curator-longform-artwork-reveal 0.38s ease-out both; transition: none; }
.curator-longform-image-frame > .curator-artwork-loading { opacity: 0; }
.curator-longform-image-frame.is-loading > .curator-artwork-loading { opacity: 1; }
.curator-longform-image-embed figcaption {
    min-height: 1.3em;
    margin: 10px 0 0;
    padding: 0 var(--longform-gutter);
    color: var(--entry-muted);
    font: 400 14px/1.4 var(--rh-sans);
    letter-spacing: -0.01em;
    overflow-wrap: anywhere;
    white-space: pre-wrap;
    outline: none;
}
.curator-longform-image-embed figcaption[contenteditable="true"]:empty::before { color: color-mix(in srgb, var(--entry-ink) 30%, transparent); content: attr(data-placeholder); pointer-events: none; }
@keyframes curator-longform-artwork-reveal { from { opacity: 0; } to { opacity: 1; } }

.curator-longform-embed-placeholder {
    position: relative;
    display: grid;
    min-height: 6rem;
    place-items: center;
    margin: 26px 0;
    border: 1px dashed var(--entry-line);
    border-radius: 4px;
    color: var(--entry-muted);
    font: 400 14px/1.2 var(--rh-sans);
}
.curator-longform-embed-placeholder > button { position: absolute; top: 8px; right: 8px; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--entry-muted); font: 400 18px/1 var(--rh-sans); cursor: pointer; }

/* An embed's Remove, for the owner while writing. */
.curator-longform-track-remove {
    position: absolute;
    top: -12px;
    right: 6px;
    z-index: 2;
    min-height: 26px;
    padding: 0 10px;
    border: 0;
    border-radius: 13px;
    background: var(--entry-ink);
    color: var(--longform-paper);
    font: 500 12px/1 var(--rh-sans);
    letter-spacing: -0.01em;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.15s ease;
}
:is(.curator-longform-track-embed, .curator-longform-quote, .curator-longform-image-embed):focus-within .curator-longform-track-remove,
.curator-longform-track-remove.is-awaiting-removal { opacity: 1; }
.curator-longform-track-remove.is-awaiting-removal,
[data-longform-embed-remove].is-awaiting-removal { background: var(--rh-danger); }
@media (hover: hover) and (pointer: fine) {
    :is(.curator-longform-track-embed, .curator-longform-quote, .curator-longform-image-embed):hover .curator-longform-track-remove { opacity: 1; }
}

.curator-longform-endmark { display: block; width: 8px; height: 8px; margin: 10px 0 0; border-radius: 50%; background: var(--entry-ink); }

/* Spotify links on phones ask for a second tap (curator_spotify_confirm.js): the copy
   steps aside for "Open in Spotify" in its place. */
.curator-longform-shell .curator-mobile-spotify-confirm-label { display: none; }
@media (max-width: 680px) {
    .curator-longform-shell [data-mobile-spotify-confirm] { position: relative; }
    .curator-longform-shell .curator-mobile-spotify-confirm-label {
        position: absolute;
        top: 50%;
        display: flex;
        align-items: center;
        white-space: nowrap;
        opacity: 0;
        pointer-events: none;
        transform: translateY(calc(-50% + 4px));
        transition: opacity 0.2s ease, transform 0.24s cubic-bezier(0.22, 0.72, 0.28, 1);
    }
    .curator-longform-focus .curator-mobile-spotify-confirm-label { left: 36px; right: 12px; font: inherit; }
    .curator-longform-footer-focus .curator-mobile-spotify-confirm-label { left: 104px; right: 14px; color: #f4f1ea; font: 500 17px/1.2 var(--rh-sans); letter-spacing: -0.03em; }
    .curator-longform-shell [data-mobile-spotify-confirm] :is(.curator-longform-focus-name, .curator-longform-focus-subtitle, .curator-longform-footer-copy) { transition: opacity 0.18s ease; }
    .curator-longform-shell [data-mobile-spotify-confirm].is-awaiting-confirmation :is(.curator-longform-focus-name, .curator-longform-focus-subtitle, .curator-longform-footer-copy) { opacity: 0; }
    .curator-longform-shell [data-mobile-spotify-confirm].is-awaiting-confirmation .curator-mobile-spotify-confirm-label { opacity: 1; transform: translateY(-50%); }
}

/* After the piece */
/* One column, held to the page's width: the sideways row of other longforms would otherwise widen it
   past the screen, carrying everything else in the footer with it. */
.curator-longform-footer { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; margin-top: 34px; }
.curator-longform-footer-focus {
    display: grid;
    grid-template-columns: 76px minmax(0, 1fr) 36px;
    gap: 14px;
    align-items: center;
    padding: 14px;
    border-radius: 4px;
    background: #171615;
    color: #f4f1ea;
    text-decoration: none;
}
.curator-longform-footer-focus[hidden] { display: none; }
.curator-longform-footer-focus-art { display: block; width: 76px; height: 76px; overflow: hidden; background: rgba(244, 241, 234, 0.08); }
.curator-longform-footer-focus-art img { display: block; width: 100%; height: 100%; object-fit: cover; }
.curator-longform-footer-copy { display: grid; gap: 3px; min-width: 0; }
.curator-longform-footer-copy small { color: rgba(244, 241, 234, 0.66); font: 400 13px/1.2 var(--rh-sans); text-transform: capitalize; }
.curator-longform-footer-copy strong { overflow: hidden; font: 500 20px/1.1 var(--rh-sans); letter-spacing: -0.04em; text-overflow: ellipsis; white-space: nowrap; }
.curator-longform-footer-copy > span { overflow: hidden; color: rgba(244, 241, 234, 0.66); font: 400 14px/1.3 var(--rh-sans); text-overflow: ellipsis; white-space: nowrap; }
.curator-longform-footer-copy > span[hidden] { display: none; }
.curator-longform-footer-spotify { display: grid; width: 36px; height: 36px; place-items: center; border-radius: 50%; background: #f1efe9; color: #171615; }
.curator-longform-footer-spotify svg { width: 20px; height: 20px; fill: currentColor; }

.curator-longform-author { display: flex; align-items: center; gap: 12px; padding: 22px 0; border-bottom: 1px solid var(--rh-line); }
.curator-longform-author-link { display: flex; flex: 1; align-items: center; gap: 12px; min-width: 0; color: inherit; text-decoration: none; }
.curator-longform-author-avatar { width: 52px; height: 52px; font-size: 19px; }
.curator-longform-author-copy { display: grid; gap: 2px; min-width: 0; }
.curator-longform-author-copy strong { overflow: hidden; font: 500 18px/1.15 var(--rh-sans); letter-spacing: -0.03em; text-overflow: ellipsis; white-space: nowrap; }
.curator-longform-author-copy small { color: var(--entry-muted); font: 400 14px/1.3 var(--rh-sans); }
/* Follow, as on a profile. */
.curator-longform-follow {
    display: inline-flex;
    flex: none;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    padding: 0 15px;
    border: 0;
    border-radius: 16px;
    background: var(--entry-ink);
    color: var(--longform-paper);
    font: var(--rh-compact-button-font);
    letter-spacing: -0.02em;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}
.curator-longform-follow.is-following { background: color-mix(in srgb, var(--entry-ink) 8%, transparent); color: var(--entry-ink); }
.curator-longform-follow:active { opacity: 0.75; }

.curator-longform-more h2 { margin: 26px 0 14px; color: var(--entry-ink); font: 500 15px/1.2 var(--rh-sans); letter-spacing: -0.02em; }
.curator-longform-more ol { display: grid; grid-auto-flow: column; grid-auto-columns: 220px; gap: 12px; margin: 0 calc(-1 * var(--longform-gutter)); padding: 0 var(--longform-gutter); overflow-x: auto; list-style: none; scrollbar-width: none; scroll-padding-inline: var(--longform-gutter); scroll-snap-type: x mandatory; }
.curator-longform-more ol::-webkit-scrollbar { display: none; }
.curator-longform-more li { scroll-snap-align: start; }
.curator-longform-more a { display: grid; gap: 4px; color: inherit; text-decoration: none; }
.curator-longform-more-art { position: relative; display: block; aspect-ratio: 1.82; margin-bottom: 6px; overflow: hidden; background: var(--entry-art); }
.curator-longform-more-art img { display: block; width: 100%; height: 100%; object-fit: cover; }
.curator-longform-more strong { font: 500 15px/1.2 var(--rh-sans); letter-spacing: -0.03em; text-wrap: balance; }
.curator-longform-more small { color: var(--entry-muted); font: 400 13px/1.3 var(--rh-sans); }

/* The owner's page: title, standfirst and cover edit in place; Edit opens the writing. */
.curator-longform-title-shell,
.curator-longform-subtitle-shell { position: relative; width: 100%; }
.curator-longform-title-shell h1,
.curator-longform-subtitle-shell .curator-longform-deck { border-radius: 3px; outline: none; }
.curator-longform-title-shell.is-empty h1,
.curator-longform-subtitle-shell.is-empty .curator-longform-deck { color: color-mix(in srgb, var(--entry-ink) 30%, transparent); }
.curator-longform-title-shell > span,
.curator-longform-subtitle-shell > span { position: absolute; top: 100%; right: 0; margin-top: 4px; color: var(--entry-muted); font: 400 12px/1 var(--rh-sans); opacity: 0; transition: opacity 0.16s ease; }
.curator-longform-title-shell:focus-within > span,
.curator-longform-subtitle-shell:focus-within > span { opacity: 1; }
@media (hover: hover) and (pointer: fine) {
    .curator-longform-title-shell h1:hover,
    .curator-longform-subtitle-shell .curator-longform-deck:hover { background: color-mix(in srgb, var(--entry-ink) 4%, transparent); }
}
/* The owner bar steps aside while the page is typed into. */
.curator-longform-owner-bar.is-editor-active { opacity: 0; pointer-events: none; transform: translate(-50%, 0.45rem); }
/* With the native writing sheet, the page itself isn't typed into: a tap opens the sheet. */
[data-longform-native-composer] :is([data-longform-title], [data-longform-subtitle], [data-longform-body]) { cursor: text; -webkit-user-select: none; user-select: none; }

/* Web writing: the + beside the caret offers an image, track, album or quote. */
.curator-longform-insert[hidden] { display: none; }
.curator-longform-insert { position: fixed; z-index: 70; width: 32px; height: 32px; opacity: 0.6; transition: opacity 0.18s ease, transform 0.18s ease; }
.curator-longform-insert.is-gliding { transition: top 190ms cubic-bezier(0.22, 0.75, 0.24, 1), opacity 0.18s ease, transform 0.18s ease; }
.curator-longform-insert:focus-within,
.curator-longform-insert.is-open { opacity: 1; }
.curator-longform-insert-trigger { position: relative; display: block; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 50%; background: color-mix(in srgb, var(--entry-ink) 8%, var(--longform-paper)); color: var(--entry-ink); cursor: pointer; }
.curator-longform-insert-trigger::before { position: absolute; inset: -6px; content: ""; }
.curator-longform-insert-trigger > span::before,
.curator-longform-insert-trigger > span::after { position: absolute; top: 50%; left: 50%; width: 12px; height: 1.5px; background: currentColor; content: ""; transform: translate(-50%, -50%); transition: transform 0.18s ease; }
.curator-longform-insert-trigger > span::after { transform: translate(-50%, -50%) rotate(90deg); }
.curator-longform-insert.is-open .curator-longform-insert-trigger > span::before { transform: translate(-50%, -50%) rotate(45deg); }
.curator-longform-insert.is-open .curator-longform-insert-trigger > span::after { transform: translate(-50%, -50%) rotate(135deg); }
.curator-longform-insert-options { position: absolute; top: 50%; left: calc(100% + 8px); display: flex; gap: 6px; align-items: center; visibility: hidden; opacity: 0; pointer-events: none; transform: translate(-4px, -50%); transition: opacity 0.16s ease, transform 0.18s ease, visibility 0s linear 0.18s; }
.curator-longform-insert.is-open .curator-longform-insert-options { visibility: visible; opacity: 1; pointer-events: auto; transform: translate(0, -50%); transition-delay: 0s; }
.curator-longform-insert.is-picking .curator-longform-insert-options { visibility: hidden; opacity: 0; pointer-events: none; }
.curator-longform-insert-options > button { display: inline-flex; gap: 6px; align-items: center; height: 34px; padding: 0 11px; border: 0; border-radius: 17px; background: color-mix(in srgb, var(--entry-ink) 8%, var(--longform-paper)); color: var(--entry-ink); font: 500 13px/1 var(--rh-sans); letter-spacing: -0.02em; white-space: nowrap; cursor: pointer; }
.curator-longform-insert-options > button[hidden] { display: none; }
.curator-longform-insert-options > button svg { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.curator-longform-insert-picker[hidden] { display: none; }
.curator-longform-insert-picker { position: absolute; top: 50%; left: calc(100% + 8px); width: min(320px, calc(100vw - 5rem)); max-height: min(360px, 62vh); overflow: hidden; border-radius: 14px; background: var(--longform-paper); box-shadow: 0 8px 26px rgba(25, 21, 16, 0.14); color: var(--entry-ink); transform: translateY(-50%); }
.curator-longform-insert-picker-heading { display: flex; gap: 6px; align-items: center; padding: 10px 12px; border-bottom: 1px solid var(--rh-line); font: 500 15px/1.2 var(--rh-sans); letter-spacing: -0.02em; }
.curator-longform-insert-picker-heading button { display: grid; width: 28px; height: 28px; place-items: center; padding: 0; border: 0; background: transparent; color: var(--entry-muted); cursor: pointer; }
.curator-longform-insert-picker-heading button svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.curator-longform-insert-picker-list { max-height: min(310px, 54vh); overflow-y: auto; overscroll-behavior: contain; padding: 6px; }
.curator-longform-insert-picker-status { margin: 0; padding: 20px 12px; color: var(--entry-muted); font: 400 14px/1.4 var(--rh-sans); text-align: center; }
.curator-longform-insert-picker-status.is-error { color: var(--rh-danger); }
.curator-longform-insert-picker-list > button { display: grid; width: 100%; grid-template-columns: 44px minmax(0, 1fr); gap: 12px; align-items: center; padding: 6px; border: 0; border-radius: 8px; background: transparent; color: inherit; text-align: left; cursor: pointer; }
.curator-longform-insert-picker-list > button:focus-visible { background: color-mix(in srgb, var(--entry-ink) 6%, transparent); outline: none; }
.curator-longform-insert-picker-art { display: block; width: 44px; height: 44px; overflow: hidden; background: var(--entry-art); }
.curator-longform-insert-picker-art img { width: 100%; height: 100%; object-fit: cover; }
.curator-longform-insert-picker-copy { display: grid; gap: 2px; min-width: 0; }
.curator-longform-insert-picker-copy :is(strong, span) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.curator-longform-insert-picker-copy strong { font: 500 16px/1.2 var(--rh-sans); letter-spacing: -0.03em; }
.curator-longform-insert-picker-copy span { color: var(--entry-muted); font: 400 13px/1.3 var(--rh-sans); }
@media (hover: hover) and (pointer: fine) {
    .curator-longform-insert:hover { opacity: 1; }
    .curator-longform-insert-picker-list > button:hover { background: color-mix(in srgb, var(--entry-ink) 6%, transparent); }
}

/* Focus changes reuse the shared Create choice and search presentation. */
.curator-longform-focus-loading { display: grid; min-height: 390px; box-sizing: border-box; padding: 3rem 1.55rem 3.5rem; align-content: center; justify-items: center; gap: 0.72rem; text-align: center; }
.curator-longform-focus-loading[hidden] { display: none; }
.curator-longform-focus-loading-mark { position: relative; display: grid; width: 52px; height: 52px; place-items: center; margin-bottom: 0.7rem; border: 0.5px solid var(--entry-line); border-radius: 50%; }
.curator-longform-focus-loading-mark::before,
.curator-longform-focus-loading-mark > span { position: absolute; box-sizing: border-box; border-radius: 50%; }
.curator-longform-focus-loading-mark::before { inset: 8px; border: 1px solid var(--entry-line); border-top-color: var(--entry-ink); content: ""; animation: curator-focus-loading-spin 760ms linear infinite; }
.curator-longform-focus-loading-mark > span { width: 5px; height: 5px; background: var(--entry-ink); }
.curator-longform-focus-loading > p { margin: 0; color: var(--entry-muted); font: 400 14px/1.3 var(--rh-sans); }
.curator-longform-focus-loading > strong { max-width: 30rem; color: var(--entry-ink); font: 500 28px/1.05 var(--rh-sans); letter-spacing: -0.045em; overflow-wrap: anywhere; }
.curator-longform-focus-loading > span:last-child { color: var(--entry-muted); font: 400 15px/1.35 var(--rh-sans); }
@keyframes curator-focus-loading-spin { to { transform: rotate(360deg); } }
.curator-longform-focus-impact { width: calc(100% - 3.1rem); max-width: 34rem; box-sizing: border-box; margin: -0.25rem 1.55rem 1rem; color: var(--entry-muted); font: 400 14px/1.5 var(--rh-sans); }
.curator-longform-focus-dialog .curator-entry-composer-submit { width: 100%; }
.curator-longform-focus-dialog .curator-artist-result-copy > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
[data-longform-focus-dialog] .curator-entry-kind-copy strong { font-family: var(--rh-sans); font-weight: 500; }
[data-longform-focus-dialog] .curator-longform-focus-link-action { flex: none; min-width: 44px; min-height: 44px; padding: 0 .5rem; border: 0; background: transparent; color: var(--rh-ink); font: 500 .8125rem/1 var(--rh-sans); }
[data-longform-focus-dialog] .curator-longform-focus-link-action[hidden] { display: none; }
@media (min-width: 681px) {
    .curator-longform-focus-dialog:not(.is-kind-picker),
    .curator-longform-focus-dialog.is-loading-focus { min-height: min(76dvh, 650px); }
    .curator-longform-focus-dialog .curator-artist-results { max-height: min(34dvh, 290px); }
}

body.rhune-font-pending .curator-longform-heading h1.curator-font-skeleton::after { width: min(76%, 620px); height: 0.56em; }

/* Wider screens: one reading column; the cover and images keep to it. */
@media (min-width: 681px) {
    .curator-longform-shell { --longform-gutter: 32px; }
    .curator-longform-shell .curator-longform-heading { padding-top: 40px; }
    .curator-longform-heading h1 { font-size: clamp(48px, 6vw, 64px); }
    .curator-longform-shell .curator-longform-deck { font-size: 28px; }
    .curator-longform-cover { margin-inline: 0; }
    .curator-longform-image-embed { margin-inline: 0; }
    .curator-longform-image-embed figcaption { padding: 0; }
    .curator-longform-body { font-size: 19px; }
    .curator-longform-more ol { grid-auto-columns: 260px; }
    /* Edit opens writing only on phones; here the page is written in directly. */
    .curator-longform-owner-bar [data-longform-edit-body],
    .curator-longform-owner-bar [data-longform-edit-body] + .curator-entry-owner-divider { display: none; }
}
@media (min-width: 1024px) {
    /* Save and the menu sit together at the page's top right. */
    .curator-longform-shell > .curator-app-header-detail-actions { position: absolute; z-index: 5; top: 24px; right: 32px; display: flex; align-items: center; gap: 8px; }
    .curator-longform-shell > .curator-app-header-detail-actions > :not(.rhune-header-title) { position: static; inset: auto; margin: 0; transform: none; }
    body.curator-new-page .curator-longform-shell {
        width: calc(100% - var(--curator-sidebar-width) - 2 * var(--curator-desktop-gutter));
        left: var(--curator-sidebar-center-offset);
    }
}

/* The app's header on phones: fixed over the page as the entry pages' dark docked bar,
   from the status area down, with paper controls; once the title has scrolled under it, it
   shows that title and a reading line along its foot (curator_longform_reader.js).
   Builds that can't take a light status bar keep the paper header. */
@media (max-width: 1023px) {
    body.curator-app-shell-page .curator-app-detail-surface[data-curator-app-body-classes~="curator-longform-page"] {
        padding-bottom: calc(60px + env(safe-area-inset-bottom) + var(--curator-keyboard-space, 0px));
    }
    :is(html:not(.rhune-native-app), html.rhune-native-status-bar) body.curator-app-shell-page .curator-app-detail-surface:has(> main.curator-longform-shell) {
        padding-top: 0;
        scroll-padding-top: calc(env(safe-area-inset-top, 0px) + var(--curator-app-header-height, 56px));
    }
    /* Fixed below the status area, as Rhune pages' headers are; the page starts under it.
       It is the entry pages' docked bar: one dark translucent layer with the status area,
       paper title and controls. */
    :is(html:not(.rhune-native-app), html.rhune-native-status-bar) body.curator-app-shell-page .curator-app-detail-surface:has(> main.curator-longform-shell) > .site-header {
        position: fixed;
        z-index: 6;
        inset: env(safe-area-inset-top, 0px) 0 auto;
        width: auto;
        margin: 0;
        background: transparent;
        box-shadow: none;
    }
    :is(html:not(.rhune-native-app), html.rhune-native-status-bar) body.curator-app-shell-page .curator-app-detail-surface > main.curator-longform-shell {
        padding-top: calc(env(safe-area-inset-top, 0px) + var(--curator-app-header-height, 56px));
    }
    :is(html:not(.rhune-native-app), html.rhune-native-status-bar) body.curator-app-shell-page .curator-app-detail-surface:has(> main.curator-longform-shell) > .site-header::before {
        position: absolute;
        z-index: -1;
        top: calc(-1 * env(safe-area-inset-top, 0px));
        right: 0;
        left: 0;
        height: calc(100% + env(safe-area-inset-top, 0px));
        background: rgba(23, 22, 21, 0.9);
        -webkit-backdrop-filter: saturate(1.4) blur(20px);
        backdrop-filter: saturate(1.4) blur(20px);
        content: "";
        pointer-events: none;
    }
    /* The reading line along the header's foot. */
    :is(html:not(.rhune-native-app), html.rhune-native-status-bar) body.curator-app-shell-page .curator-app-detail-surface:has(> main.curator-longform-shell) > .site-header::after {
        position: absolute;
        right: 0;
        bottom: 0;
        left: 0;
        height: 2px;
        background: #f1efe9;
        content: "";
        opacity: 0;
        pointer-events: none;
        transform: scaleX(var(--longform-progress, 0));
        transform-origin: left center;
        transition: opacity 0.2s ease;
    }
    :is(html:not(.rhune-native-app), html.rhune-native-status-bar) body.curator-app-shell-page .curator-app-detail-surface.rhune-collapsed:has(> main.curator-longform-shell) > .site-header::after { opacity: 0.75; }
    :is(html:not(.rhune-native-app), html.rhune-native-status-bar) body.curator-app-shell-page .curator-app-detail-surface:has(> main.curator-longform-shell) > .site-header .rhune-header-title { color: #f1efe9; }
    :is(html:not(.rhune-native-app), html.rhune-native-status-bar) body.curator-app-shell-page .curator-app-detail-surface:has(> main.curator-longform-shell) > .site-header :is(.curator-app-header-back, .curator-save--header .curator-save-button, .curator-reading-entry-menu--corner summary, .curator-entry-share) {
        background: rgba(241, 239, 233, 0.12);
        color: #f1efe9;
    }
    .curator-app-detail-surface > main.curator-longform-shell {
        width: auto;
        margin: 0 calc(-1 * var(--curator-app-gutter-right, 0px)) 0 calc(-1 * var(--curator-app-gutter-left, 0px));
    }
    .curator-longform-shell > .curator-app-header-detail-menu,
    .curator-longform-shell > .curator-entry-back { visibility: hidden; pointer-events: none; }
}

/* Web writing on phones (browsers, and app builds without the native sheet): the piece
   opens full screen with a Done bar. */
@media (max-width: 680px) {
    html.is-longform-writing,
    html.is-longform-writing body { overflow: hidden; overscroll-behavior: none; }
    html.is-longform-writing body.curator-app-shell-page > .site-header { visibility: hidden; pointer-events: none; }
    html.is-longform-writing body.curator-app-shell-page > main { position: fixed; z-index: 1000; inset: 0; width: 100%; height: auto; overflow: hidden; background: var(--longform-paper); }
    .curator-longform-focus-loading { min-height: 42dvh; padding: 2rem 1.25rem max(2.5rem, calc(env(safe-area-inset-bottom) + 1.25rem)); }
    .curator-longform-focus-impact { width: calc(100% - 2.5rem); margin-right: 1.25rem; margin-left: 1.25rem; }

    .curator-longform-body-card.is-fullscreen-writing {
        position: fixed;
        z-index: 10000;
        top: var(--longform-writing-top, 0px);
        right: 0;
        left: 0;
        display: block;
        box-sizing: border-box;
        width: 100%;
        height: var(--longform-writing-height, 100dvh);
        margin: 0;
        padding: 0 max(1.25rem, env(safe-area-inset-right)) max(2rem, env(safe-area-inset-bottom)) max(1.25rem, env(safe-area-inset-left));
        overflow-x: hidden;
        overflow-y: auto;
        overscroll-behavior: contain;
        background: var(--longform-paper);
        box-shadow: 0 0 0 200vmax var(--longform-paper);
        isolation: isolate;
        -webkit-overflow-scrolling: touch;
    }
    .curator-longform-body-card:not(.is-fullscreen-writing) [data-longform-embed-remove] { display: none; }
    .curator-longform-body-card.is-empty:not(.is-fullscreen-writing) .curator-longform-body::before { content: none; }
    /* An empty piece reads as the page waiting: a caret and the prompt in the body's own
       type. The whole empty block opens the writing. */
    .curator-longform-begin-writing:not([hidden]) {
        position: absolute;
        z-index: 2;
        inset: 0;
        display: flex;
        width: 100%;
        min-height: 9rem;
        align-items: flex-start;
        margin: 0;
        padding: 0;
        border: 0;
        border-radius: 0;
        background: transparent;
        color: color-mix(in srgb, var(--entry-ink) 40%, transparent);
        font: 400 18px/1.62 var(--rh-sans);
        letter-spacing: -0.014em;
        text-align: left;
        -webkit-tap-highlight-color: transparent;
    }
    .curator-longform-begin-writing::before {
        flex: none;
        width: 2px;
        height: 1.2em;
        margin: 0.21em 4px 0 0;
        background: var(--entry-tone, var(--entry-ink));
        content: "";
    }
    .curator-longform-begin-writing:active { color: color-mix(in srgb, var(--entry-ink) 62%, transparent); }
    .curator-longform-body-card.is-empty:not(.is-fullscreen-writing) { min-height: 9rem; }
    .curator-longform-body-card.is-fullscreen-writing .curator-longform-begin-writing { display: none; }
    .curator-longform-body-card.is-fullscreen-writing .curator-longform-writing-header {
        position: sticky;
        z-index: 4;
        top: 0;
        display: grid;
        grid-template-columns: 76px minmax(0, 1fr) 76px;
        gap: 8px;
        align-items: center;
        min-height: calc(env(safe-area-inset-top) + 56px);
        margin: 0 calc(-1 * max(1.25rem, env(safe-area-inset-right))) 1rem calc(-1 * max(1.25rem, env(safe-area-inset-left)));
        padding: calc(env(safe-area-inset-top) + 0.65rem) max(1.25rem, env(safe-area-inset-right)) 0.65rem max(1.25rem, env(safe-area-inset-left));
        box-sizing: border-box;
        background: var(--longform-paper);
        box-shadow: 0 1px 0 var(--rh-line);
    }
    .curator-longform-body-card.is-fullscreen-writing .curator-longform-writing-header > strong { min-width: 0; overflow: hidden; color: var(--entry-ink); font: 500 16px/1.3 var(--rh-sans); letter-spacing: -0.025em; text-align: center; text-overflow: ellipsis; white-space: nowrap; }
    .curator-longform-body-card.is-fullscreen-writing .curator-longform-writing-count { justify-self: start; color: var(--entry-muted); font: 400 12px/1 var(--rh-sans); font-variant-numeric: tabular-nums; }
    .curator-longform-body-card.is-fullscreen-writing .curator-longform-writing-count[hidden] { display: block; visibility: hidden; }
    .curator-longform-body-card.is-fullscreen-writing .curator-longform-writing-header > button { justify-self: end; height: 34px; padding: 0 14px; border: 0; border-radius: 17px; background: var(--entry-ink); color: var(--longform-paper); font: var(--rh-compact-button-font); letter-spacing: -0.02em; }
    .curator-longform-body-card.is-fullscreen-writing .curator-longform-body { width: 100%; min-height: calc(var(--longform-writing-height, 100dvh) - env(safe-area-inset-top) - 6.5rem); padding-bottom: max(5rem, env(safe-area-inset-bottom)); box-sizing: border-box; }
    .curator-longform-body-card.is-fullscreen-writing > .curator-longform-body-count { display: none; }
    .curator-longform-body-card.is-fullscreen-writing .curator-longform-image-embed { margin-inline: calc(-1 * max(1.25rem, env(safe-area-inset-left))); }

    .curator-longform-insert { z-index: 95; width: 36px; height: 36px; opacity: 0.9; }
    .curator-longform-insert-trigger { width: 36px; height: 36px; }
    .curator-longform-insert-options { top: auto; right: 0; bottom: calc(100% + 8px); left: auto; flex-direction: column; align-items: flex-end; transform: translateY(4px); }
    .curator-longform-insert.is-open .curator-longform-insert-options { transform: translateY(0); }
    .curator-longform-insert-picker { top: auto; right: 0; bottom: calc(100% + 8px); left: auto; width: min(320px, calc(100vw - 2rem)); max-height: min(390px, 58vh); transform: none; }
}

@media (prefers-reduced-motion: reduce) {
    .curator-longform-cover figure.is-revealing img,
    .curator-longform-image-frame.is-revealing img { animation: none; }
    .curator-longform-title-shell > span,
    .curator-longform-subtitle-shell > span,
    .curator-longform-track-provider,
    .curator-longform-owner-bar { transition: none; }
}
