/* ================================================================== *
 * PiecesOfLife — "Pallu" saree-woven identity
 * ------------------------------------------------------------------
 * A warm, ceremonial visual system drawn from saree textile design:
 * temple/tent zari borders, mango (ambi) buti overlay, gold-thread
 * rules, a brocade medallion, and a rani / peacock / marigold palette
 * on ivory. Implements design-handoff sections 3a–3d.
 *
 * Loaded after oat.css + app.css so it can override the base shell.
 * The Pallu pages set explicit colours (not light-dark()) so they read
 * identically regardless of the user's light/dark preference.
 * ================================================================== */

@import url("/static/fonts/pallu-fonts.css");

/* ================================================================== *
 * Cross-document navigation — soft crossfade between pages, with the
 * rani nav bar held in place so moving through the app feels like
 * turning pages rather than reloading them.
 * ================================================================== */
@view-transition {
    navigation: auto;
}

.pl-nav {
    view-transition-name: pl-nav;
}

::view-transition-old(root),
::view-transition-new(root) {
    animation-duration: 0.2s;
}

@media (prefers-reduced-motion: reduce) {
    ::view-transition-group(*),
    ::view-transition-old(*),
    ::view-transition-new(*) {
        animation: none !important;
    }
}

/* ---- 3a · tokens ------------------------------------------------- */

/* The Pallu identity is a printed magazine: always light. Pinning
 * color-scheme here (loaded after oat.css) disables oat's light-dark()
 * auto-darkening regardless of the OS preference. */
:root { color-scheme: light; }

:root {
    --rani:        #7a0f38; /* primary — nav/header, headings on ivory   */
    --rani-deep:   #5c0a2a; /* hover / pressed on rani                   */
    --sindoor:     #c3362b; /* vermillion — drop-caps, active editor     */
    --marigold:    #e6b23c; /* gold accent — borders, active nav, chips  */
    --zari:        #c8962c; /* deeper gold — gold-thread rules, dashes   */
    --peacock:     #0e6b6b; /* secondary — ledger panels, saved state    */
    --sage:        #4f7042; /* collecting / progress-complete green      */
    --ivory:       #fbf4e3; /* page / card background                    */
    --ivory-2:     #fffaf0; /* input / answer-field background           */
    --strip:       #f7edd8; /* issue/pager utility strip                 */
    --ink:         #2a0e15; /* body & reading text                       */
    --ink-soft:    #8a6d55; /* muted / meta text                         */
    --muted:       #a99374; /* inactive labels, quiet affordances        */
    --line:        #ddc9a6; /* hairline dividers on ivory                */

    /* incidental tints lifted from the prototype */
    --rani-line:   #b06a82; /* outline-button border on a rani ground    */
    --nav-muted:   #e9c9d4; /* inactive nav labels on rani               */
    --read-ink:    #2e1820; /* long-form reading ink                     */
    --numeral-off: #d9bf94; /* inactive display numerals                   */
    --ledger-fg:   #c3ded9; /* body copy inside the peacock ledger       */
    --ledger-wait: #8fc4bd; /* "waiting" label inside the ledger         */

    --font-display: "Marcellus", Georgia, serif;
    --font-read:    "Newsreader", Georgia, serif;
    --font-ui:      "Mukta", system-ui, sans-serif;

    --pl-radius:      5px;
    --pl-radius-chip: 3px;
    --pl-shadow:      14px 14px 0 rgba(122, 15, 56, 0.18);
}

/* ================================================================== *
 * Motifs (reusable)
 * ================================================================== */

/* 1 · temple / tent zari border — downward gold triangles on rani */
.temple {
    height: 26px;
    background: var(--rani);
    background-image:
        linear-gradient(135deg, var(--marigold) 26%, transparent 26%),
        linear-gradient(225deg, var(--marigold) 26%, transparent 26%);
    background-size: 26px 26px;
    background-position: 0 0;
    border-bottom: 3px solid var(--zari);
}

.temple-up {
    height: 26px;
    background: var(--rani);
    background-image:
        linear-gradient(45deg, var(--marigold) 26%, transparent 26%),
        linear-gradient(-45deg, var(--marigold) 26%, transparent 26%);
    background-size: 26px 26px;
    background-position: 0 100%;
    border-top: 3px solid var(--zari);
}

/* 2 · zari gold-thread rule — thin woven divider */
.zari {
    height: 8px;
    background: repeating-linear-gradient(
        90deg,
        var(--zari) 0 8px,
        var(--marigold) 8px 12px,
        var(--zari) 12px 20px
    );
    border-top: 1px solid #a8791f;
    border-bottom: 1px solid #a8791f;
}

/* 3 · mango buti print — low-opacity allover overlay, never over text */
.mango {
    background-image: url("/static/img/mango.png");
    background-size: 84px auto;
    opacity: 0.5;
    pointer-events: none;
}

/* ================================================================== *
 * Status pills — Mukta 700, ~11px, leading glyph
 * ================================================================== */
.pl-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-family: var(--font-ui);
    font-weight: 700;
    font-size: 11px;
    line-height: 1;
    letter-spacing: 0.05em;
    padding: 6px 12px;
    border-radius: var(--pl-radius-chip);
    white-space: nowrap;
}

.pl-pill--draft     { color: #fff;        background: var(--ink-soft); }
.pl-pill--saved     { color: #fff;        background: var(--peacock); }
.pl-pill--saving    { color: var(--ink);  background: var(--marigold); }
.pl-pill--collecting{ color: #fff;        background: var(--sage); }
.pl-pill--waiting   { color: var(--ink);  background: var(--marigold); }
.pl-pill--submitted { color: #fff;        background: var(--sindoor); }
.pl-pill--published { color: var(--marigold); background: var(--rani); }

/* ================================================================== *
 * Buttons (Mukta, uppercase, low radius)
 * ================================================================== */
.pl-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 44px;
    font-family: var(--font-ui);
    font-weight: 700;
    font-size: 12px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 11px 20px;
    border-radius: var(--pl-radius-chip);
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: filter 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

.pl-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}
.pl-btn--gold { color: var(--rani); background: var(--marigold); }
.pl-btn--gold:hover { filter: brightness(1.06); text-decoration: none; }
.pl-btn--gold:active { filter: brightness(0.94); }

/* outline on a rani ground */
.pl-btn--ghost {
    color: #f6ecd8;
    background: transparent;
    border: 1.5px solid var(--rani-line);
}
.pl-btn--ghost:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }
.pl-btn--ghost:active { background: rgba(0, 0, 0, 0.15); }

/* outline on an ivory ground (tabs, photo/link) */
.pl-btn--outline {
    color: var(--rani);
    background: transparent;
    border: 1.5px solid var(--rani);
    font-weight: 600;
}
.pl-btn--outline:hover { background: var(--rani); color: #f6ecd8; text-decoration: none; }

.pl-btn--nudge { color: #fff; background: var(--sindoor); min-height: 0; padding: 8px 14px; font-size: 11px; }
.pl-btn--nudge:hover { filter: brightness(1.06); }

.pl-btn:focus-visible,
.pl-tab:focus-visible,
.pl-switch input:focus-visible + .pl-switch-track {
    outline: 3px solid var(--marigold);
    outline-offset: 2px;
}

/* small inline chip-buttons (＋ PHOTO / 🔗 LINK / ＋ REACT) */
.pl-chip-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-ui);
    font-weight: 600;
    font-size: 11px;
    letter-spacing: 0.04em;
    color: var(--rani);
    background: transparent;
    border: 1.5px solid var(--rani);
    padding: 6px 11px;
    border-radius: var(--pl-radius-chip);
    cursor: pointer;
    text-decoration: none;
}
.pl-chip-btn:hover { background: var(--rani); color: var(--ivory); text-decoration: none; }
.pl-chip-btn--dashed { border-style: dashed; border-color: var(--zari); color: var(--ink-soft); }

/* ================================================================== *
 * Shared nav (base.html) — rani bar + medallion + zari rule
 * ================================================================== */
nav.pl-nav {
    position: sticky;
    top: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    gap: 22px;
    height: 63px;
    padding: 0 max(24px, calc((100vw - 1160px) / 2 + 24px));
    background: var(--rani);
    border: none;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

/* zari woven strip flush along the bottom of the bar */
nav.pl-nav::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 7px;
    background: repeating-linear-gradient(
        90deg,
        var(--zari) 0 8px,
        var(--marigold) 8px 12px,
        var(--zari) 12px 20px
    );
    box-shadow: inset 0 1px 0 #a8791f, inset 0 -1px 0 #a8791f;
}

.pl-nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-right: auto;
    padding: 0;
    color: #f6ecd8;
}
.pl-nav-brand:hover { background: transparent; color: #fff; text-decoration: none; }
.pl-nav-logo { width: 32px; height: 32px; border-radius: 7px; flex: none; }
.pl-nav-wordmark { font-family: var(--font-display); font-weight: 400; font-size: 22px; line-height: 1; }

.pl-nav-links { display: flex; align-items: center; gap: 22px; }

nav.pl-nav a:not(.pl-nav-brand) {
    font-family: var(--font-ui);
    font-weight: 600;
    font-size: 13px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--nav-muted);
    background: transparent;
    padding: 21px 0 19px;
    border-bottom: 2px solid transparent;
    border-radius: 0;
}
nav.pl-nav a:not(.pl-nav-brand):hover { color: #f6ecd8; background: transparent; text-decoration: none; }
nav.pl-nav a.is-active { color: var(--marigold); border-bottom-color: var(--marigold); }

.pl-nav-user { display: inline-flex; align-items: center; gap: 7px; color: #f6ecd8; }
.pl-nav-ava {
    width: 26px; height: 26px; border-radius: 50%;
    background: var(--marigold); color: var(--rani);
    display: flex; align-items: center; justify-content: center;
    font: 700 12px var(--font-ui); text-transform: none;
}


/* ================================================================== *
 * Page shell — the framed "cloth" card on a warm ground
 * ================================================================== */
main.pl-main {
    max-width: none;
    padding: 0;
    min-height: calc(100vh - 70px);
}

.pl-page {
    background: #efe4cb;
    padding: 40px 24px 64px;
    min-height: calc(100vh - 70px);
    color: var(--ink);
    font-family: var(--font-read);
    color-scheme: light;
}

.pl-card {
    margin: 0 auto;
    background: var(--ivory);
    border: 1.5px solid var(--rani);
    border-radius: var(--pl-radius);
    box-shadow: var(--pl-shadow);
    overflow: hidden;
}
.pl-card--editor { max-width: 1040px; }
.pl-card--issue  { max-width: 820px; }
.pl-card--admin  { max-width: 980px; }

/* eyebrow / label helpers */
.pl-eyebrow {
    font-family: var(--font-ui);
    font-weight: 700;
    font-size: 11px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--zari);
    margin: 0 0 8px;
}
.pl-eyebrow--peacock { color: var(--peacock); letter-spacing: 0.2em; }

.pl-display { font-family: var(--font-display); font-weight: 400; color: var(--ink); line-height: 1.1; }

/* in-card top bar that mirrors the global nav on framed screens */
.pl-cardnav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 28px;
    background: var(--rani);
}
.pl-cardnav .pl-nav-brand { color: #f6ecd8; }

/* ================================================================== *
 * 3b · Response editor
 * ================================================================== */
.pl-editor { display: flex; }

/* left ledger — peacock, mango overlay */
.pl-ledger {
    width: 280px;
    flex: none;
    position: relative;
    overflow: hidden;
    background: var(--peacock);
    color: #eef6f4;
    padding: 26px 24px;
}
.pl-ledger > .mango { position: absolute; inset: 0; opacity: 0.2; }
.pl-ledger-inner { position: relative; }
.pl-ledger .pl-eyebrow { color: var(--marigold); letter-spacing: 0.22em; }
.pl-ledger-month { font-family: var(--font-display); font-weight: 400; font-size: 40px; line-height: 0.95; margin: 0; }
.pl-ledger-context { font-family: var(--font-read); font-size: 15px; line-height: 1.5; color: var(--ledger-fg); margin: 12px 0 20px; }
.pl-ledger-context b { color: #fff; }
.pl-ledger-rule { height: 1px; background: rgba(230, 178, 60, 0.35); margin-bottom: 18px; }
.pl-ledger-sub { font-family: var(--font-ui); font-weight: 700; font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ledger-wait); margin: 0 0 12px; }

.pl-segbar { display: flex; gap: 6px; margin-bottom: 22px; }
.pl-seg { flex: 1; height: 10px; border-radius: 2px; background: rgba(255, 255, 255, 0.18); }
.pl-seg.is-filled { background: var(--marigold); }

.pl-roster-row { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.pl-roster-row:last-child { margin-bottom: 0; }
.pl-roster-ava {
    width: 28px; height: 28px; border-radius: 50%; flex: none;
    display: flex; align-items: center; justify-content: center;
    font: 700 12px var(--font-ui);
    background: rgba(255, 255, 255, 0.15); color: var(--ledger-fg);
}
.pl-roster-row.is-you .pl-roster-ava { background: var(--marigold); color: var(--rani); }
.pl-roster-name { font-family: var(--font-read); font-weight: 500; font-size: 15px; flex: 1; }
.pl-roster-row:not(.is-you) .pl-roster-name { color: var(--ledger-fg); }
.pl-roster-status { font-family: var(--font-ui); font-weight: 700; font-size: 9px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ledger-wait); }
.pl-roster-row.is-you .pl-roster-status,
.pl-roster-status.is-writing { color: var(--marigold); }
.pl-roster-status.is-done { color: #eef6f4; }

/* right column — the prompts */
.pl-questions { flex: 1; padding: 30px 34px; min-width: 0; }

.pl-q {
    display: flex;
    gap: 18px;
    padding-bottom: 22px;
    border-bottom: 1px solid var(--line);
    margin-bottom: 22px;
}
.pl-q-num { font-family: var(--font-display); font-size: 40px; line-height: 1; flex: none; width: 52px; color: var(--numeral-off); transition: color 0.15s ease; }
.pl-q.is-active .pl-q-num,
.pl-q:focus-within .pl-q-num { color: var(--sindoor); }
.pl-q-body { flex: 1; min-width: 0; }
.pl-q-head { display: flex; justify-content: space-between; gap: 14px; align-items: flex-start; }
.pl-q-prompt { font-family: var(--font-display); font-weight: 400; font-size: 24px; line-height: 1.15; color: var(--ink); max-width: 470px; margin: 0; }

/* answer field — also targets the editor's real .response-text textareas.
 * The input./textarea./select. forms outrank app.css's input[type=…]
 * defaults, which otherwise repaint these fields white and rounded. */
.pl-field,
input.pl-field,
textarea.pl-field,
select.pl-field,
.pl-questions textarea.response-text {
    font-family: var(--font-read);
    font-size: 17px;
    line-height: 1.6;
    color: var(--ink);
    background: var(--ivory-2);
    border: 1px solid var(--rani);
    border-radius: 4px;
    padding: 14px 16px;
    margin-top: 12px;
    width: 100%;
    display: block;
    resize: vertical;
    min-height: 64px;
    box-sizing: border-box;
}
.pl-field:focus,
.pl-field:focus-visible,
input.pl-field:focus,
textarea.pl-field:focus,
.pl-questions textarea.response-text:focus {
    outline: none;
    border: 2px solid var(--sindoor);
    box-shadow: none;
    background: var(--ivory-2);
}
.pl-field::placeholder,
input.pl-field::placeholder,
.pl-questions textarea.response-text::placeholder { color: #a98f7a; font-style: italic; }

/* untouched prompt reads as a dashed placeholder card until it has content */
.pl-questions textarea.response-text:placeholder-shown:not(:focus) {
    background: var(--ivory);
    border: 1.5px dashed var(--zari);
}
.pl-q-actions { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }

/* autosave chip — driven by editor.js, which rewrites className to
 * "save-status [saving|saved|error]", so we style that class directly. */
.pl-q-head .save-status {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-family: var(--font-ui);
    font-weight: 700;
    font-size: 10px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 5px 10px;
    border-radius: var(--pl-radius-chip);
    flex: none;
    color: #fff;
    background: var(--peacock);
}
.pl-q-head .save-status:empty { display: none; }
.pl-q-head .save-status::before { content: "●"; font-size: 0.85em; }
.pl-q-head .save-status.saving { color: var(--ink); background: var(--marigold); }
.pl-q-head .save-status.saved  { color: #fff; background: var(--peacock); }
.pl-q-head .save-status.error  { color: #fff; background: var(--sindoor); }

/* submit bar */
.pl-submitbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    background: var(--rani);
    border-radius: 4px;
    padding: 16px 20px;
}
.pl-submitbar-note { font-family: var(--font-read); font-size: 15px; color: var(--nav-muted); margin: 0; }
.pl-submitbar-note b { color: var(--marigold); }
.pl-submitbar-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.pl-submit-error {
    display: inline;
    padding: 0;
    border: 0;
    background: transparent;
    font-family: var(--font-ui);
    font-weight: 600;
    font-size: 12px;
    color: var(--marigold);
}

/* oat.css keeps its [hidden] rule inside @layer base, which any unlayered
 * component rule outranks — restate it for elements we style ourselves. */
.pl-submit-error[hidden] { display: none; }

/* ================================================================== *
 * Photo & video dump — editor section (respond page)
 * ================================================================== */
.pl-dump {
    margin-top: 6px;
    padding: 22px 0 26px;
    border-top: 1px solid var(--line);
    margin-bottom: 22px;
}
.pl-dump-head { display: flex; gap: 18px; }
.pl-dump-num { color: var(--marigold); font-size: 34px; text-align: center; }
.pl-dump-head-body { flex: 1; min-width: 0; }
.pl-dump-sub {
    font-family: var(--font-read);
    font-size: 15px;
    color: var(--ink-soft);
    margin: 6px 0 0;
    max-width: 470px;
}
.pl-dump-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 16px 0 4px 70px;
}
.pl-dump-empty {
    display: none;
    font-family: var(--font-read);
    font-style: italic;
    font-size: 14px;
    color: var(--muted);
    margin: 0;
}
.pl-dump-grid.is-empty .pl-dump-empty { display: block; }
.pl-dump-thumb {
    position: relative;
    width: 96px;
    height: 96px;
    margin: 0;
    background: var(--ivory-2);
    border: 1px solid var(--line);
    border-radius: 4px;
    padding: 4px;
    box-sizing: border-box;
}
.pl-dump-thumb img,
.pl-dump-thumb video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 2px;
}
.pl-dump-thumb-kind {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 20px;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
    pointer-events: none;
}
.pl-dump-remove {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 1px solid var(--rani);
    background: var(--ivory);
    color: var(--rani);
    font: 700 11px var(--font-ui);
    line-height: 1;
    cursor: pointer;
}
.pl-dump-remove:hover { background: var(--rani); color: #fff; }
.pl-dump .pl-q-actions { margin-left: 70px; align-items: center; }
.pl-dump-status { font: 600 12px var(--font-ui); color: var(--peacock); }
.pl-dump-status.is-error { color: var(--sindoor); }

/* "suggest for the next issue" card on the published reading view */
.pl-suggest--next {
    max-width: 620px;
    margin: 36px auto 44px;
}
.pl-suggest--next .pl-eyebrow { margin: 0 0 8px; }

/* suggest-a-question card */
.pl-suggest {
    margin: 26px 34px 30px;
    background: var(--ivory-2);
    border: 1px solid var(--line);
    border-radius: 4px;
    padding: 20px 22px;
}
.pl-suggest h3 { font-family: var(--font-display); font-weight: 400; font-size: 20px; color: var(--ink); margin: 0 0 4px; }
.pl-suggest p { font-family: var(--font-read); font-size: 15px; color: var(--ink-soft); margin: 0 0 12px; }
.pl-suggest textarea { font-family: var(--font-read); font-size: 16px; }

.media-block {
    margin: 10px 0;
    padding: 12px;
    background: var(--ivory-2);
    border: 1px solid var(--line);
    border-radius: 4px;
}
.media-block audio,
.media-block video {
    display: block;
    width: 100%;
}
.media-block video {
    max-height: 360px;
    border-radius: 4px;
    background: #000;
}
.media-block .caption {
    margin: 8px 0 0;
    font-family: var(--font-read);
    font-size: 13px;
    font-style: italic;
    color: var(--ink-soft);
}

.record-dialog {
    max-width: min(520px, calc(100vw - 32px));
    border: 1.5px solid var(--rani);
    border-radius: var(--pl-radius);
    background: var(--ivory);
    color: var(--ink);
    padding: 0;
    box-shadow: var(--pl-shadow);
}
.record-dialog::backdrop {
    background: rgba(42, 14, 21, 0.34);
}
.record-dialog-body {
    padding: 24px;
}
.record-dialog h3 {
    margin: 0 0 4px;
    font-family: var(--font-display);
    font-weight: 400;
    font-size: 28px;
    color: var(--ink);
}
.record-dialog p {
    margin: 0 0 16px;
    font-family: var(--font-ui);
    color: var(--ink-soft);
}
.record-stage:not(:has(> :not([hidden]))) {
    display: none;
}
.record-dialog video,
.record-playback-media {
    width: 100%;
    max-height: 320px;
    border-radius: 4px;
    background: #000;
}
/* Mirror the live self-view so framing feels natural; the recorded
   playback keeps its true (un-mirrored) orientation. */
.record-preview {
    transform: scaleX(-1);
}
.record-playback audio,
.record-playback-media:is(audio) {
    height: 44px;
    max-height: none;
    background: var(--ivory-2);
}

/* live readout — pulsing dot + running clock */
.record-readout {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 14px 0 12px;
    min-height: 20px;
}
.record-dot {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: var(--muted);
    flex: none;
}
.record-dialog[data-record-state="recording"] .record-dot {
    background: var(--sindoor);
    animation: record-blink 1s steps(1) infinite;
}
.record-dialog[data-record-state="paused"] .record-dot {
    background: var(--marigold);
}
.record-dialog[data-record-state="recorded"] .record-dot {
    background: var(--peacock);
}
.record-timer {
    font-family: var(--font-ui);
    font-weight: 700;
    font-size: 15px;
    letter-spacing: 0.04em;
    color: var(--ink);
    font-variant-numeric: tabular-nums;
}

.record-meter {
    height: 8px;
    overflow: hidden;
    background: var(--line);
    border-radius: 99px;
    margin-bottom: 18px;
    visibility: hidden;
}
.record-dialog[data-record-state="recording"] .record-meter {
    visibility: visible;
}
.record-meter span {
    display: block;
    width: 38%;
    height: 100%;
    border-radius: inherit;
    background: var(--sindoor);
}
.record-dialog[data-record-state="recording"] .record-meter span {
    animation: record-pulse 1.1s ease-in-out infinite alternate;
}
.record-dialog-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}
.record-dialog-actions .pl-btn[hidden] {
    display: none;
}
@keyframes record-pulse {
    from { transform: translateX(-18%); opacity: 0.58; }
    to { transform: translateX(190%); opacity: 1; }
}
@keyframes record-blink {
    50% { opacity: 0.25; }
}

/* ================================================================== *
 * 3c · Published issue (reading view)
 * ================================================================== */
.pl-issue.issue-page {
    max-width: none;
    margin: 0;
}

.pl-masthead {
    position: relative;
    overflow: hidden;
    padding: 32px 36px 22px;
    text-align: center;
}
.pl-masthead > .mango { position: absolute; inset: 0; opacity: 0.3; }
.pl-masthead-inner { position: relative; }
.pl-masthead-emblem { width: 76px; height: 76px; border-radius: 13px; display: block; margin: 0 auto 14px; }
.pl-masthead-eyebrow { letter-spacing: 0.28em; margin: 0 0 6px; }
.pl-masthead-month { font-family: var(--font-display); font-weight: 400; font-size: 62px; line-height: 0.9; color: var(--ink); margin: 0; }
.pl-masthead-meta { font-family: var(--font-read); font-size: 16px; color: var(--ink-soft); margin: 10px 0 0; }
.pl-masthead-meta em { font-style: italic; }

.pl-article { padding: 30px 48px 38px; max-width: 680px; margin: 0 auto; }
.pl-article-prompt { font-family: var(--font-display); font-weight: 400; font-size: 28px; line-height: 1.22; color: var(--rani); text-align: center; margin: 0 0 24px; }
.pl-issue .question-section + .question-section { margin-top: 38px; padding-top: 34px; border-top: 1px solid var(--line); }
.pl-issue .question-responses { display: grid; gap: 24px; }

.pl-issue .response-block {
    font-family: var(--font-read);
    font-size: inherit;
    line-height: inherit;
    color: inherit;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    margin: 0;
    padding: 0 0 24px;
}
.pl-answer { display: block; margin-bottom: 0; padding-bottom: 24px; border-bottom: 1px solid var(--line); }
.pl-answer:last-child { margin-bottom: 0; padding-bottom: 0; border-bottom: none; }
.pl-answer-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.pl-answer-ava {
    width: 34px; height: 34px; flex: none; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    font: 700 14px var(--font-ui);
    background: var(--rani); color: #f6ecd8; overflow: hidden;
}
.pl-answer-ava img { width: 100%; height: 100%; object-fit: cover; }
.pl-answer-name { font-family: var(--font-ui); font-weight: 700; font-size: 13px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--rani); }
/* alternate rani/peacock per answer within a prompt group */
.question-responses > .response-article:nth-of-type(even) .pl-answer-ava { background: var(--peacock); color: #eef6f4; }
.question-responses > .response-article:nth-of-type(even) .pl-answer-name { color: var(--peacock); }

/* view toolbar — restyled to Pallu chips */
.pl-issue .view-toolbar {
    display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
    background: var(--ivory-2);
    border: 1px solid var(--line);
    border-radius: 4px;
    padding: 10px 14px;
    margin-bottom: 24px;
    font-family: var(--font-ui); font-size: 13px; color: var(--ink-soft);
}
.pl-issue .view-toolbar button,
.pl-issue .view-toolbar select {
    font-family: var(--font-ui); font-size: 12px; font-weight: 600;
    color: var(--rani); background: var(--ivory);
    border: 1.5px solid var(--rani); border-radius: var(--pl-radius-chip);
    padding: 7px 12px; cursor: pointer; min-height: 36px;
}
.pl-issue .view-toolbar button:hover { background: var(--rani); color: var(--ivory); }
.pl-issue .view-toolbar button.active { background: var(--rani); color: var(--marigold); }

.pl-answer-text { font-family: var(--font-read); font-size: 18px; line-height: 1.65; color: var(--read-ink); }
.pl-answer-text p { margin: 0 0 0.75em; white-space: pre-wrap; }
.pl-answer-text p:last-child { margin-bottom: 0; }

/* Neutralize drop caps in the continuous (3c) reading view only. Kept off
 * the paginated view, and expressed as longhands: the `font:` shorthand
 * also resets font-style/weight/variant at this specificity, which the
 * .published-issue drop-cap rule below doesn't re-declare — that combo
 * rendered the drop cap in the body typeface instead of the display font. */
.pl-issue:not(.published-issue) .pl-answer.is-first .pl-answer-text > p:first-child::first-letter {
    font-family: inherit;
    font-size: inherit;
    color: inherit;
    float: none;
    line-height: inherit;
    margin: 0;
}

.pl-answer-text figure { margin: 14px 0 0; }
.pl-answer-text img { border: 1px solid var(--rani); border-radius: 4px; max-width: 100%; }

.comments-section {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px dashed var(--line);
}
.comments-title {
    font-family: var(--font-ui);
    font-weight: 700;
    font-size: 12px;
    line-height: 1;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ink-soft);
    margin: 0 0 10px;
}
.pl-issue .comment-list { list-style: none; padding: 0; margin: 0; }
.pl-issue .comment-item {
    margin: 0 0 10px;
    padding: 9px 11px;
    background: var(--ivory-2);
    border: 1px solid var(--line);
    border-left: 3px solid var(--marigold);
    border-radius: 3px;
}
.pl-issue .comment-meta {
    display: flex;
    align-items: baseline;
    gap: 8px;
    font-family: var(--font-ui);
    font-size: 12px;
    line-height: 1.2;
    color: var(--ink-soft);
}
.pl-issue .comment-meta strong {
    color: var(--rani);
    font-weight: 700;
}
.pl-issue .comment-body {
    margin-top: 5px;
    font-family: var(--font-read);
    font-size: 15px;
    line-height: 1.45;
    color: var(--ink);
}
.pl-issue .comment-body p { margin: 0 0 0.6em; }
.pl-issue .comment-body p:last-child { margin-bottom: 0; }
.pl-issue .comment-empty {
    color: var(--ink-soft);
    font-family: var(--font-read);
    font-size: 14px;
    font-style: italic;
}
.pl-issue .comment-form { margin-top: 10px; }
.pl-issue .comment-body-input {
    width: 100%;
    min-height: 70px;
    resize: vertical;
    font-family: var(--font-read);
    font-size: 15px;
    line-height: 1.45;
    color: var(--ink);
    background: var(--ivory-2);
    border: 1px solid var(--line);
    border-radius: 3px;
    padding: 9px 10px;
}
.pl-issue .comment-body-input:focus {
    outline: 2px solid var(--marigold);
    outline-offset: 2px;
}
.pl-issue .comment-form-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 7px;
}
.pl-issue .comment-status {
    color: var(--ink-soft);
    font-family: var(--font-ui);
    font-size: 12px;
}
.pl-issue .comment-status[data-state="error"] { color: var(--sindoor); }
.pl-issue .comment-form button {
    font-family: var(--font-ui);
    font-weight: 700;
    font-size: 12px;
    min-height: 32px;
    padding: 5px 12px;
    color: var(--ivory);
    background: var(--rani);
    border: 1px solid var(--rani);
    border-radius: var(--pl-radius-chip);
    cursor: pointer;
}
.pl-issue .comment-form button:hover { background: var(--rani-deep); }

/* ================================================================== *
 * Shared alerts + primary button on ivory
 * ================================================================== */
.pl-alert {
    font-family: var(--font-read);
    font-size: 15px;
    line-height: 1.5;
    padding: 12px 14px;
    border-radius: 4px;
    margin: 0 0 18px;
}
.pl-alert[hidden] { display: none; }
.pl-alert--error   { background: #f9e8e6; border-left: 3px solid var(--sindoor); color: #7a231c; }
.pl-alert--success { background: #e7f2f0; border-left: 3px solid var(--peacock); color: #0d4f4f; }

.pl-btn--rani { color: #f6ecd8; background: var(--rani); }
.pl-btn--rani:hover { background: var(--rani-deep); color: #fff; text-decoration: none; }

/* destructive / think-twice actions */
.pl-btn--danger { color: #fff; background: var(--sindoor); border: 1.5px solid #8f1f16; }
.pl-btn--danger:hover { filter: brightness(1.08); }
.pl-btn--danger:active { filter: brightness(0.9); }

/* ================================================================== *
 * Login — small ceremonial card, no global nav
 * ================================================================== */
.pl-login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 40px 20px;
}
.pl-login { width: 100%; max-width: 430px; }
.pl-card--login { position: relative; overflow: hidden; }
.pl-login-body { position: relative; padding: 34px 32px 32px; }
.pl-login-motif {
    position: absolute;
    top: -24px;
    right: -36px;
    width: 210px;
    height: 280px;
    opacity: 0.13;
}
.pl-login-inner { position: relative; }
.pl-login-logo { width: 54px; height: 54px; border-radius: 10px; margin: 0 0 14px; }
.pl-login-title {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: 34px;
    line-height: 1.1;
    color: var(--ink);
    margin: 0 0 6px;
}
.pl-login-sub,
.pl-login-hint {
    font-family: var(--font-read);
    font-size: 16px;
    line-height: 1.55;
    color: var(--ink-soft);
    margin: 0 0 22px;
}
.pl-login-hint { font-size: 14px; margin-bottom: 0; }
.pl-login-hint a { color: var(--rani); }
.pl-login-label {
    display: block;
    font-family: var(--font-ui);
    font-weight: 700;
    font-size: 11px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ink-soft);
}
.pl-login-input { min-height: 48px; margin-top: 8px; resize: none; }
.pl-login-submit { width: 100%; margin-top: 16px; }

/* ================================================================== *
 * 3d · Admin — "the loom"
 * ================================================================== */
.pl-admin { padding: 28px 34px; }
.pl-admin-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 22px;
}
.pl-admin-title { font-family: var(--font-display); font-weight: 400; font-size: 36px; color: var(--ink); margin: 0; }
.pl-tabs { display: flex; gap: 9px; flex-wrap: wrap; }
.pl-tab {
    font-family: var(--font-ui); font-weight: 600; font-size: 12px;
    text-transform: uppercase; letter-spacing: 0.03em;
    color: var(--rani); background: transparent;
    border: 1.5px solid var(--rani); padding: 9px 14px;
    border-radius: var(--pl-radius-chip); cursor: pointer; text-decoration: none;
}
.pl-tab:hover { background: var(--rani); color: var(--ivory); text-decoration: none; }

.pl-frame { border: 1.5px solid var(--rani); border-radius: 4px; overflow: hidden; }
.pl-frame-head {
    background: var(--rani); color: #f6ecd8;
    padding: 22px 26px;
    display: flex; justify-content: space-between; align-items: center;
    gap: 20px; flex-wrap: wrap;
}
.pl-frame-head-left { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.pl-frame-month { font-family: var(--font-display); font-weight: 400; font-size: 30px; }
.pl-countdown { font-family: var(--font-ui); font-weight: 600; font-size: 12px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--marigold); }

.pl-stats { display: flex; flex-wrap: wrap; }
.pl-stat {
    flex: 1; min-width: 160px;
    padding: 22px 26px;
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}
.pl-stat:last-child { border-right: none; }
.pl-stat--wide { min-width: 280px; }
.pl-stat-big { display: flex; align-items: baseline; gap: 6px; }
.pl-stat-big .pl-num { font-family: var(--font-display); font-weight: 400; font-size: 46px; line-height: 1; color: var(--ink); }
.pl-stat-big .pl-denom { font-family: var(--font-display); font-weight: 400; font-size: 24px; color: #b3a587; }
.pl-stat-val { font-family: var(--font-display); font-weight: 400; font-size: 26px; color: var(--ink); }
.pl-stat-sub { font-family: var(--font-read); font-size: 14px; color: var(--ink-soft); margin: 2px 0 0; }

.pl-progress { display: flex; gap: 6px; margin: 12px 0 14px; }
.pl-progress-seg { flex: 1; height: 12px; border-radius: 2px; background: var(--line); }
.pl-progress-seg.is-filled { background: var(--sage); }

/* count-me-in toggle switch */
.pl-switch { display: flex; align-items: center; gap: 10px; cursor: pointer; font-family: var(--font-ui); font-weight: 600; font-size: 12px; letter-spacing: 0.03em; text-transform: uppercase; color: var(--ink); }
.pl-switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.pl-switch-track {
    width: 38px; height: 22px; border-radius: var(--pl-radius-chip);
    background: #b3a587; position: relative; flex: none;
    transition: background-color 0.15s ease;
}
.pl-switch-track::after {
    content: ""; position: absolute; top: 2px; left: 2px;
    width: 18px; height: 18px; border-radius: 2px; background: var(--ivory);
    transition: transform 0.15s ease;
}
.pl-switch input:checked + .pl-switch-track { background: var(--sage); }
.pl-switch input:checked + .pl-switch-track::after { transform: translateX(16px); }
.pl-switch-note { font-family: var(--font-read); font-style: italic; font-size: 13px; color: var(--ink-soft); margin: 8px 0 0; }

.pl-ledger-admin { padding: 22px 26px; }
.pl-ledger-admin .pl-eyebrow { margin-bottom: 14px; }

/* dashboard: editable "questions in this round" list */
.pl-qadmin {
    padding: 22px 24px;
    border-top: 1px solid var(--line);
}
.pl-qadmin .pl-eyebrow { margin-bottom: 14px; }
.pl-qadmin-row {
    display: flex;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 14px;
    padding: 10px 0;
    border-bottom: 1px solid var(--line);
}
.pl-qadmin-num {
    font-family: var(--font-display);
    font-size: 22px;
    line-height: 1.2;
    color: var(--numeral-off);
    flex: none;
    width: 34px;
}
.pl-qadmin-main { flex: 1; min-width: 220px; }
.pl-qadmin-text {
    font-family: var(--font-display);
    font-size: 17px;
    color: var(--ink);
    margin: 0;
}
.pl-qadmin-meta {
    font: 600 11px var(--font-ui);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--ink-soft);
    margin: 3px 0 0;
}
.pl-qadmin-meta b { color: var(--sindoor); }
.pl-qadmin-actions { display: flex; gap: 8px; flex: none; }
.pl-qadmin-actions .pl-btn { min-height: 0; padding: 7px 12px; font-size: 11px; }
.pl-qadmin-editor { width: 100%; }
.pl-qadmin-editor textarea { min-height: 64px; margin-top: 4px; }
.pl-qadmin-editor-actions { display: flex; gap: 8px; margin-top: 10px; }
.pl-qadmin-add {
    display: flex;
    gap: 10px;
    align-items: stretch;
    margin-top: 14px;
}
.pl-qadmin-add input.pl-field { margin-top: 0; min-height: 0; padding: 10px 14px; }
.pl-qadmin-add .pl-btn { flex: none; }
.pl-qadmin-status {
    font: 600 12px var(--font-ui);
    margin: 8px 0 0;
    min-height: 15px;
}
.pl-member-row {
    display: flex; align-items: center; gap: 14px;
    padding: 12px 0;
    border-top: 1px solid var(--line);
}
.pl-member-ava {
    width: 34px; height: 34px; border-radius: 50%; flex: none;
    display: flex; align-items: center; justify-content: center;
    font: 700 14px var(--font-ui);
    background: var(--peacock); color: #eef6f4;
}
.pl-member-row.is-admin .pl-member-ava { background: var(--rani); color: #f6ecd8; }
.pl-member-main { flex: 1; min-width: 0; }
.pl-member-name { font-family: var(--font-ui); font-weight: 700; font-size: 15px; color: var(--ink); }
.pl-member-email { font-family: var(--font-read); font-size: 13px; color: var(--ink-soft); }

/* ================================================================== *
 * Responsive
 * ================================================================== */
@media (max-width: 900px) {
    .pl-card { box-shadow: 8px 8px 0 rgba(122, 15, 56, 0.16); }
}

@media (max-width: 720px) {
    .pl-page { padding: 20px 12px 96px; }
    .pl-card { box-shadow: 6px 6px 0 rgba(122, 15, 56, 0.14); }

    /* editor collapses to a single column; ledger becomes a header strip */
    .pl-editor { flex-direction: column; }
    .pl-ledger { width: auto; }
    .pl-ledger-month { font-size: 30px; }
    .pl-questions { padding: 22px 18px; }
    .pl-q-num { font-size: 30px; width: 40px; }
    .pl-q-prompt { font-size: 20px; }
    .pl-field { font-size: 16px; }
    .pl-dump-grid,
    .pl-dump .pl-q-actions { margin-left: 0; }

    /* submit bar sticks to the bottom of the viewport, full-width buttons */
    .pl-submitbar {
        position: fixed;
        left: 0; right: 0; bottom: 0;
        z-index: 40;
        margin: 0;
        border-radius: 0;
        border-top: 3px solid var(--zari);
    }
    .pl-submitbar .pl-submitbar-note { display: none; }
    .pl-submitbar .pl-submitbar-actions { width: 100%; }
    .pl-submitbar .pl-submitbar-actions .pl-btn { flex: 1; }

    /* reading view scales down */
    .pl-masthead-month { font-size: 32px; }
    .pl-article { padding: 22px 18px 26px; }
    .pl-answer-text { font-size: 16px; }

    .pl-admin { padding: 20px 16px; }
    .pl-stat { border-right: none; }

    nav.pl-nav { gap: 12px; padding: 0 16px; height: 56px; }
    nav.pl-nav a:not(.pl-nav-brand) { font-size: 12px; padding: 18px 0 16px; }
    .pl-nav-links { gap: 14px; }
    .pl-nav-wordmark { font-size: 19px; }
}

@media (max-width: 480px) {
    .pl-nav-wordmark { display: none; }
    .mango { opacity: 0.12 !important; }
}

/* ================================================================== *
 * 4c · Published issue paginated spread
 * ================================================================== */
.pl-page--published {
    padding: 0;
    background: var(--ivory);
    min-height: calc(100vh - 63px);
}

.published-issue {
    min-height: calc(100vh - 63px);
    color: var(--ink);
    font-family: var(--font-read);
}

.pl-card--published {
    max-width: none;
    min-height: calc(100vh - 63px);
    border: 1.5px solid var(--rani);
    border-top: 0;
    border-radius: 0 0 var(--pl-radius) var(--pl-radius);
    box-shadow: none;
}

.published-issue-strip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    min-height: 64px;
    padding: 12px max(34px, calc((100vw - 1160px) / 2 + 34px));
    background: var(--strip);
    border-bottom: 1px solid var(--line);
}

.published-strip-progress {
    display: flex;
    align-items: center;
    gap: 18px;
    flex: none;
}

/* reading-mode toggle — "One at a time · All at once" */
.published-mode-toggle {
    display: flex;
    flex: none;
    border: 1.5px solid var(--rani);
    border-radius: 4px;
    overflow: hidden;
}

.published-mode-toggle[hidden] { display: none; }

.published-mode-toggle button {
    min-height: 36px;
    padding: 8px 13px;
    border: 0;
    background: var(--ivory);
    color: var(--rani);
    font-family: var(--font-ui);
    font-weight: 600;
    font-size: 11px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    cursor: pointer;
}

.published-mode-toggle button + button {
    border-left: 1.5px solid var(--rani);
}

.published-mode-toggle button.is-active {
    background: var(--rani);
    color: var(--marigold);
}

.published-mode-toggle button:focus-visible {
    outline: 3px solid var(--marigold);
    outline-offset: -3px;
}

/* scroll ("all at once") mode — stacked spreads, no pager */
.published-issue.is-scroll .published-pager { display: none; }

.published-issue.is-scroll .published-question + .published-question {
    margin-top: 58px;
    padding-top: 52px;
    border-top: 1px solid var(--line);
}

.published-progress-segments {
    display: flex;
    align-items: center;
    gap: 10px;
}

.published-progress-segment {
    display: block;
    width: 13px;
    height: 7px;
    border-radius: 99px;
    background: #e0cfae;
}

.published-progress-segment.is-past { width: 32px; background: var(--rani); }
.published-progress-segment.is-current { width: 44px; background: var(--marigold); }

.published-progress-label {
    font-family: var(--font-ui);
    font-weight: 700;
    font-size: 14px;
    color: var(--muted);
    white-space: nowrap;
}

/* compact "2 / 6" twin — only shown on very narrow screens */
.published-progress-label--compact { display: none; }

.published-spread {
    position: relative;
    min-height: 420px;
    overflow: hidden;
    padding: 62px 36px 52px;
}

.published-spread-motif {
    position: absolute;
    top: 8px;
    left: 28px;
    width: 260px;
    height: 370px;
    opacity: 0.16;
}

.published-question[hidden] { display: none; }

.published-question-inner {
    position: relative;
    z-index: 1;
    max-width: 620px;
    margin: 0 auto;
}

.published-question-kicker {
    margin: 0 0 22px;
    text-align: center;
    font-family: var(--font-ui);
    font-weight: 700;
    font-size: 12px;
    line-height: 1;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--peacock);
}

.published-question-title {
    margin: 0;
    text-align: center;
    font-family: var(--font-display);
    font-weight: 400;
    font-size: 40px;
    line-height: 1.14;
    letter-spacing: 0;
    color: var(--rani);
    text-wrap: balance;
}

.published-question-title:focus { outline: none; }

.published-ornament {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    margin: 26px 0 44px;
}

.published-ornament span {
    display: block;
    width: 58px;
    height: 1px;
    background: var(--line);
}

.published-ornament i {
    width: 10px;
    height: 10px;
    background: var(--marigold);
    transform: rotate(45deg);
}

/* ------------------------------------------------------------------ *
 * The photo & video dump — magazine-collage closer page
 * ------------------------------------------------------------------ */
.published-question-inner.published-dump-inner { max-width: 780px; }

.pl-dump-group { margin-bottom: 48px; }
.pl-dump-group:last-child { margin-bottom: 8px; }

.pl-dump-group-head {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 0 0 20px;
}
.pl-dump-group-rule {
    flex: 1;
    height: 1px;
    background: repeating-linear-gradient(90deg,
        var(--zari) 0 8px, transparent 8px 14px);
}

/* photos: CSS-columns masonry of matted prints, scattered like a spread */
.pl-collage {
    columns: 3 180px;
    column-gap: 20px;
}
.pl-collage-item {
    position: relative;
    break-inside: avoid;
    margin: 6px 0 22px;
    padding: 10px 10px 12px;
    background: var(--ivory-2);
    border: 1px solid var(--line);
    box-shadow: 7px 9px 0 rgba(122, 15, 56, 0.13);
    transform: rotate(-1.4deg);
    cursor: zoom-in;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.pl-collage-item:nth-child(2n) { transform: rotate(1.2deg); }
.pl-collage-item:nth-child(3n) { transform: rotate(-0.5deg); }
.pl-collage-item:nth-child(5n) { transform: rotate(2deg); }
.pl-collage-item:hover,
.pl-collage-item:focus-visible {
    transform: rotate(0deg) scale(1.02);
    box-shadow: 9px 11px 0 rgba(122, 15, 56, 0.18);
    z-index: 1;
}
/* marigold washi-tape strip pinning each print to the page */
.pl-collage-item::before {
    content: "";
    position: absolute;
    top: -9px;
    left: 50%;
    width: 58px;
    height: 17px;
    transform: translateX(-50%) rotate(-2.5deg);
    background: rgba(230, 178, 60, 0.72);
    box-shadow: 0 1px 2px rgba(42, 14, 21, 0.12);
}
.pl-collage-item:nth-child(2n)::before { transform: translateX(-50%) rotate(2deg); }
.pl-collage-item img {
    width: 100%;
    display: block;
}
.pl-collage-item figcaption {
    font-family: var(--font-read);
    font-style: italic;
    font-size: 13px;
    color: var(--ink-soft);
    text-align: center;
    margin-top: 8px;
}

/* videos: a separate "moving pictures" reel of dark-framed tiles.
 * auto-fill (not auto-fit) keeps empty tracks, so a lone video stays a
 * tile instead of swallowing the whole spread. */
.pl-collage-reel {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 18px;
    margin-top: 4px;
}
.pl-collage + .pl-collage-reel { margin-top: 10px; }
.pl-collage-video {
    margin: 0;
    padding: 9px;
    background: var(--ink);
    border: 1.5px solid var(--zari);
    border-radius: 4px;
    box-shadow: 7px 9px 0 rgba(122, 15, 56, 0.13);
}
.pl-collage-video video {
    width: 100%;
    display: block;
    border-radius: 2px;
}
.pl-collage-video figcaption {
    font-family: var(--font-read);
    font-style: italic;
    font-size: 13px;
    color: var(--ivory);
    text-align: center;
    margin-top: 7px;
}

@media (prefers-reduced-motion: reduce) {
    .pl-collage-item { transition: none; }
}

.published-issue .question-responses {
    display: block;
}

.published-issue .response-block,
.published-issue .pl-answer {
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
}

.published-issue .pl-answer + .pl-answer {
    margin-top: 34px;
    padding-top: 34px;
    border-top: 1px solid var(--line);
}

.published-issue .pl-answer-head {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 0 0 24px;
}

.published-issue .pl-answer-ava {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    font: 700 16px var(--font-ui);
    background: var(--peacock);
    color: var(--ivory);
}

.published-issue .pl-answer.is-self .pl-answer-ava {
    background: var(--rani);
}

.published-issue .pl-answer-name {
    font-family: var(--font-ui);
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--ink);
}

.published-issue .pl-answer-text {
    font-family: var(--font-read);
    font-size: 19px;
    line-height: 1.72;
    color: var(--ink);
}

.published-issue .pl-answer-text p {
    margin: 0 0 0.9em;
    white-space: pre-wrap;
}

.published-issue .pl-answer-text p:last-child {
    margin-bottom: 0;
}

.published-issue .pl-answer.has-dropcap .pl-answer-text > p:first-child::first-letter {
    float: left;
    margin: 7px 12px 0 0;
    font-family: var(--font-display);
    font-size: 62px;
    line-height: 0.72;
    color: var(--sindoor);
}

.published-photo {
    margin: 20px 0 0;
}

.published-photo img {
    display: block;
    width: 100%;
    max-height: 360px;
    object-fit: cover;
    border: 1px solid var(--rani);
    border-radius: 4px;
}

.published-photo figcaption {
    margin-top: 7px;
    font-family: var(--font-read);
    font-style: italic;
    font-size: 14px;
    line-height: 1.45;
    color: var(--ink-soft);
}

.published-media {
    margin: 18px 0 0;
}

.published-media audio,
.published-media video {
    display: block;
    width: 100%;
}

.published-media audio {
    min-height: 40px;
}

.published-media video {
    max-height: 360px;
    border: 1px solid var(--rani);
    border-radius: 4px;
    background: #000;
}

.published-media figcaption {
    margin-top: 7px;
    font-family: var(--font-read);
    font-style: italic;
    font-size: 14px;
    line-height: 1.45;
    color: var(--ink-soft);
}

.published-link-block {
    margin: 16px 0 0;
    padding: 10px 12px;
    background: var(--ivory-2);
    border-left: 3px solid var(--marigold);
    font-family: var(--font-ui);
    font-size: 13px;
}

.published-link-block span {
    font-weight: 700;
    color: var(--ink-soft);
    margin-right: 6px;
}

.published-issue .comments-section {
    margin-top: 26px;
    padding: 0;
    border: 0;
}

.published-issue .comment-toggle {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-height: 30px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--muted);
    font-family: var(--font-ui);
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
}

.published-issue .comment-toggle[aria-expanded="true"],
.published-issue .comment-toggle.has-comments {
    color: var(--peacock);
}

.published-issue .comment-thread {
    margin-top: 14px;
    padding-left: 16px;
    border-left: 2px solid var(--line);
}

.published-issue .comment-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.published-issue .comment-item {
    margin: 0 0 13px;
    padding: 0;
    background: transparent;
    border: 0;
}

.published-issue .comment-meta {
    display: flex;
    align-items: baseline;
    gap: 6px;
    font-family: var(--font-ui);
    font-size: 12px;
    line-height: 1.2;
    color: var(--muted);
}

.published-issue .comment-meta strong {
    color: var(--rani);
    font-weight: 700;
}

.published-issue .comment-body {
    margin-top: 4px;
    font-family: var(--font-read);
    font-size: 15px;
    line-height: 1.5;
    color: var(--ink);
}

.published-issue .comment-body p {
    margin: 0 0 0.5em;
}

.published-issue .comment-body p:last-child {
    margin-bottom: 0;
}

.published-issue .comment-load-error {
    color: var(--ink-soft);
    font-family: var(--font-read);
    font-size: 14px;
    font-style: italic;
}

/* one-level threaded replies */
.published-issue .comment-replies {
    list-style: none;
    margin: 10px 0 0;
    padding: 0 0 0 14px;
    border-left: 2px solid var(--line);
}

.published-issue .comment-reply-btn {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    margin-top: 2px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--muted);
    font-family: var(--font-ui);
    font-weight: 600;
    font-size: 11px;
    letter-spacing: 0.04em;
    cursor: pointer;
}

.published-issue .comment-reply-btn:hover,
.published-issue .comment-reply-btn:focus-visible {
    color: var(--peacock);
}

.published-issue .comment-reply-form {
    margin: 8px 0 12px;
}

.published-issue .comment-reply-cancel {
    min-height: 34px;
    margin-right: 6px;
    padding: 6px 10px;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: transparent;
    color: var(--ink-soft);
    font-family: var(--font-ui);
    font-weight: 600;
    font-size: 12px;
    cursor: pointer;
}

.published-issue .comment-reply-cancel:hover {
    border-color: var(--ink-soft);
}

.published-issue .comment-form {
    margin-top: 8px;
}

.published-issue .comment-body-input {
    width: 100%;
    min-height: 34px;
    resize: vertical;
    padding: 5px 0 6px;
    border: 0;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
    background: transparent;
    color: var(--ink);
    font-family: var(--font-read);
    font-size: 15px;
    font-style: italic;
    line-height: 1.45;
}

/* Expand while the form is focused OR holds text — keying growth off
 * textarea :focus alone made the composer collapse on blur mid-click,
 * moving the Post/Reply button out from under the cursor. */
.published-issue .comment-form:focus-within .comment-body-input,
.published-issue .comment-form.has-content .comment-body-input {
    min-height: 88px;
}

.published-issue .comment-body-input:focus {
    outline: none;
    border-bottom-color: var(--rani);
}

.published-issue .comment-form-actions {
    display: none;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 10px;
}

.published-issue .comment-form:focus-within .comment-form-actions,
.published-issue .comment-form.has-content .comment-form-actions {
    display: flex;
}

.published-issue .comment-status {
    color: var(--ink-soft);
    font-family: var(--font-ui);
    font-size: 12px;
}

.published-issue .comment-status[data-state="error"] {
    color: var(--sindoor);
}

.published-issue .comment-form button {
    min-height: 34px;
    padding: 6px 14px;
    border: 1px solid var(--rani);
    border-radius: 4px;
    background: var(--rani);
    color: var(--ivory);
    font-family: var(--font-ui);
    font-weight: 700;
    font-size: 12px;
    cursor: pointer;
}

.published-issue .comment-form button:disabled {
    cursor: default;
    opacity: 0.45;
}

.published-issue .no-answers {
    margin: 0;
    text-align: center;
    color: var(--ink-soft);
    font-family: var(--font-read);
    font-style: italic;
}

.published-empty {
    padding: 64px 24px;
    text-align: center;
    color: var(--ink-soft);
    font-family: var(--font-read);
}

.published-pager {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) auto minmax(180px, 1fr);
    align-items: center;
    gap: 24px;
    min-height: 118px;
    padding: 22px max(34px, calc((100vw - 1160px) / 2 + 34px));
    background: var(--strip);
    border-top: 1px solid var(--line);
}

.published-pager-card {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 72px;
    max-width: 300px;
    padding: 14px 18px;
    border: 1.5px solid #e2cfa8;
    border-radius: 4px;
    background: var(--ivory);
    color: var(--rani);
    text-decoration: none;
}

.published-pager-card:hover {
    text-decoration: none;
}

.published-pager-card--prev {
    justify-self: start;
}

.published-pager-card--next {
    justify-self: end;
    justify-content: space-between;
    background: var(--rani);
    border-color: var(--rani);
    color: var(--ivory);
}

.published-pager-card.is-disabled {
    visibility: hidden;
    pointer-events: none;
}

.published-pager-card:focus-visible,
.published-dot:focus-visible,
.published-progress-segment:focus-visible,
.published-issue .comment-toggle:focus-visible {
    outline: 3px solid var(--marigold);
    outline-offset: 2px;
}

/* the next card is itself marigold-adjacent rani; give it a rani ring on
 * the gold strip so the ring reads against both grounds */
.published-pager-card--next:focus-visible {
    outline-color: var(--rani);
}

.published-pager-arrow {
    color: var(--marigold);
    font-family: var(--font-ui);
    font-weight: 700;
    font-size: 18px;
}

.published-pager-card--prev .published-pager-arrow {
    color: var(--zari);
}

.published-pager-kicker {
    display: block;
    margin-bottom: 3px;
    font-family: var(--font-ui);
    font-weight: 700;
    font-size: 10px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
}

.published-pager-card--next .published-pager-kicker {
    color: var(--marigold);
}

.published-pager-card strong {
    display: block;
    font-family: var(--font-ui);
    font-weight: 700;
    font-size: 14px;
    line-height: 1.2;
}

.published-dot-pager {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 11px;
}

.published-dot {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: #e0cfae;
}

.published-dot.is-past {
    background: var(--rani);
}

.published-dot.is-current {
    border-radius: 2px;
    background: var(--marigold);
    transform: rotate(45deg);
}

@media (max-width: 760px) {
    .pl-page--published {
        padding: 0 0 74px;
    }

    .pl-card--published {
        min-height: calc(100vh - 56px);
        border-left: 1.5px solid var(--rani);
        border-right: 1.5px solid var(--rani);
        box-shadow: none;
    }

    .published-issue-strip {
        align-items: flex-start;
        min-height: 104px;
        padding: 20px 18px;
        flex-wrap: wrap;
    }

    .published-mode-toggle {
        order: 3;
        width: 100%;
    }

    .published-mode-toggle button { flex: 1; min-height: 44px; }

    .published-strip-progress {
        align-items: flex-end;
        flex-direction: column;
        gap: 8px;
    }

    .published-progress-segments {
        display: none;
    }

    .published-progress-label {
        font-size: 13px;
    }

    /* collapse the wordy counter to "2 / 6" on narrow strips */
    .published-progress-label:not(.published-progress-label--compact) {
        display: none;
    }

    .published-progress-label--compact {
        display: inline;
    }

    .published-spread {
        min-height: auto;
        padding: 52px 24px 42px;
    }

    .published-spread-motif {
        top: 10px;
        left: -12px;
        width: 190px;
        height: 310px;
        opacity: 0.13;
    }

    .published-question-kicker {
        margin-bottom: 18px;
    }

    .published-question-title {
        font-size: 30px;
        line-height: 1.14;
    }

    .published-ornament {
        margin: 24px 0 36px;
    }

    .pl-collage { columns: 2 130px; column-gap: 14px; }
    .pl-collage-item { margin-bottom: 16px; padding: 7px 7px 9px; }
    .pl-collage-reel { grid-template-columns: 1fr; }

    .published-issue .pl-answer-head {
        margin-bottom: 18px;
    }

    .published-issue .pl-answer-text {
        font-size: 17px;
        line-height: 1.68;
    }

    .published-issue .pl-answer.has-dropcap .pl-answer-text > p:first-child::first-letter {
        font-size: 54px;
        margin-top: 6px;
    }

    .published-pager {
        position: sticky;
        bottom: 0;
        z-index: 45;
        display: flex;
        justify-content: space-between;
        min-height: 64px;
        padding: 8px 12px;
        border-top: 1px solid var(--line);
        border-left: 1.5px solid var(--rani);
        border-right: 1.5px solid var(--rani);
    }

    .published-pager-card {
        min-width: 48px;
        min-height: 48px;
        padding: 0 14px;
        border-color: transparent;
        background: transparent;
    }

    .published-pager-card--next {
        background: var(--rani);
        border-color: var(--rani);
    }

    .published-pager-card span:not(.published-pager-arrow),
    .published-pager-card strong {
        display: none;
    }

    /* on the last question the next card must still say it finishes the
     * issue — an arrow alone reads as "more questions" */
    .published-pager-card--next.is-finish span:not(.published-pager-arrow) {
        display: inline;
    }

    .published-pager-card--next.is-finish strong {
        display: none;
    }

    .published-pager-card--next.is-finish .published-pager-kicker {
        display: inline;
        margin: 0;
    }

    .published-dot-pager::before {
        content: attr(data-current-label);
    }

    .published-dot-pager {
        gap: 7px;
        font-family: var(--font-ui);
        font-weight: 700;
        font-size: 13px;
        color: var(--muted);
    }

    .published-dot {
        width: 8px;
        height: 8px;
    }
}

/* === Archive (Pallu) ============================================== *
 * Issue archive: a shelf of woven magazine issues plus the current
 * issue's call-to-action card.                                        */
.pl-archive {
    max-width: 1160px;
    margin: 0 auto;
}

.pl-archive-head { margin-bottom: 28px; }
.pl-archive-title { font-size: 44px; margin: 0; }
.pl-archive-sub {
    font-family: var(--font-read);
    font-size: 16px;
    color: var(--ink-soft);
    margin: 8px 0 0;
}

/* current-issue call-to-action — rani cloth with marigold thread */
.pl-current {
    position: relative;
    overflow: hidden;
    background: var(--rani);
    border: 1.5px solid var(--rani-deep);
    border-radius: var(--pl-radius);
    box-shadow: var(--pl-shadow);
    margin-bottom: 40px;
}
.pl-current > .mango { position: absolute; inset: 0; opacity: 0.16; }
.pl-current-inner {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
    padding: 28px 32px;
    border-top: 6px solid var(--marigold);
}
/* "coming up" note on the archive when no round is open */
.pl-next-issue {
    margin-bottom: 34px;
    padding: 22px 26px;
    background: var(--ivory);
    border: 1.5px dashed var(--zari);
    border-radius: var(--pl-radius);
}
.pl-next-issue-copy {
    font-family: var(--font-read);
    font-size: 16px;
    color: var(--ink-soft);
    margin: 6px 0 0;
}
.pl-next-issue-copy b { color: var(--ink); font-weight: 500; }

.pl-current .pl-eyebrow { color: var(--marigold); letter-spacing: 0.22em; }
.pl-current-month {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: 34px;
    line-height: 1.08;
    color: #f6ecd8;
    margin: 0;
}
.pl-current-date {
    font-family: var(--font-read);
    font-size: 15px;
    color: var(--nav-muted);
    margin: 4px 0 0;
}
.pl-current-meta {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    margin-top: 14px;
    font-family: var(--font-ui);
    font-size: 13px;
    color: var(--nav-muted);
}
.pl-current-note {
    font-family: var(--font-read);
    font-size: 15px;
    line-height: 1.5;
    color: var(--nav-muted);
    margin: 12px 0 0;
    max-width: 520px;
}
.pl-current-actions { flex: none; }

/* the shelf of published issues */
.pl-shelf-title { font-size: 28px; margin: 0 0 18px; }

.pl-archive-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 22px;
}

.pl-issue-card {
    display: block;
    background: var(--ivory);
    border: 1.5px solid var(--rani);
    border-radius: var(--pl-radius);
    overflow: hidden;
    text-decoration: none;
    color: var(--ink);
    box-shadow: 6px 6px 0 rgba(122, 15, 56, 0.12);
    transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.pl-issue-card:hover {
    text-decoration: none;
    transform: translate(-2px, -2px);
    box-shadow: 9px 9px 0 rgba(122, 15, 56, 0.16);
}
.pl-issue-card:focus-visible {
    outline: 3px solid var(--marigold);
    outline-offset: 2px;
}

/* photo collage framed like a plate — thin rani border */
.pl-issue-cover {
    aspect-ratio: 4 / 3;
    margin: 10px 10px 0;
    border: 1px solid var(--rani);
    border-radius: 4px;
    overflow: hidden;
    background: var(--ivory-2);
}
.pl-issue-cover.photo-collage { display: grid; gap: 2px; }
.pl-issue-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pl-issue-cover--empty {
    display: flex;
    align-items: center;
    justify-content: center;
    border-style: dashed;
    border-color: var(--zari);
    font-family: var(--font-read);
    font-style: italic;
    font-size: 14px;
    color: var(--ink-soft);
}

.pl-issue-card-meta { padding: 14px 16px 16px; }
.pl-issue-card-month {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: 22px;
    line-height: 1.1;
    color: var(--rani);
    margin: 0;
}
.pl-issue-card-title {
    font-family: var(--font-read);
    font-style: italic;
    font-size: 15px;
    color: var(--ink);
    margin: 4px 0 0;
}
.pl-issue-card-foot {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin: 12px 0 0;
}
.pl-issue-card-when {
    font-family: var(--font-ui);
    font-size: 12px;
    color: var(--ink-soft);
}

.pl-archive-empty {
    text-align: center;
    background: var(--ivory);
    border: 1.5px dashed var(--zari);
    border-radius: var(--pl-radius);
    padding: 48px 24px;
}
.pl-archive-empty-title { font-size: 24px; margin: 0 0 6px; }
.pl-archive-empty-sub {
    font-family: var(--font-read);
    font-style: italic;
    color: var(--ink-soft);
    margin: 0;
}

@media (max-width: 720px) {
    .pl-archive-title { font-size: 32px; }
    .pl-current-inner { padding: 22px 18px; }
    .pl-current-month { font-size: 26px; }
    .pl-current-actions { width: 100%; }
    .pl-current-actions .pl-btn { width: 100%; }
    .pl-archive-grid { grid-template-columns: 1fr; }
}

/* === Profile (Pallu) ============================================== *
 * Profile form + notification preferences inside a single ivory card. */
.pl-card--profile { max-width: 640px; }

.pl-profile { padding: 30px 32px 32px; }
.pl-profile-head { margin-bottom: 22px; }
.pl-profile-title { font-size: 36px; margin: 0; }

.pl-profile-summary {
    display: flex;
    align-items: center;
    gap: 16px;
    padding-bottom: 22px;
    margin-bottom: 22px;
    border-bottom: 1px solid var(--line);
}
.pl-profile-ava {
    width: 64px;
    height: 64px;
    flex: none;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    font: 700 24px var(--font-ui);
    background: var(--rani);
    color: #f6ecd8;
}
.pl-profile-name {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: 24px;
    color: var(--ink);
    margin: 0;
}
.pl-profile-email {
    font-family: var(--font-read);
    font-size: 14px;
    color: var(--ink-soft);
    margin: 2px 0 0;
}

.pl-form-field { margin-bottom: 18px; }
.pl-form-field textarea.pl-field { min-height: 88px; margin-top: 8px; }

.pl-form-actions {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 6px;
}
.pl-form-status {
    font-family: var(--font-ui);
    font-size: 13px;
    color: var(--ink-soft);
}

.pl-quiet {
    font-family: var(--font-read);
    font-style: italic;
    font-size: 15px;
    color: var(--ink-soft);
    margin: 0;
}

.pl-profile-section {
    margin-top: 30px;
    padding-top: 24px;
    border-top: 1px solid var(--line);
}
.pl-profile-subhead { font-size: 22px; margin: 0 0 14px; }

.pl-profile .preference-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: var(--ivory-2);
    overflow: hidden;
}
.pl-profile .preference-row {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 48px;
    padding: 10px 14px;
    margin: 0;
    border: 0;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
    background: transparent;
    cursor: pointer;
    font-family: var(--font-read);
    font-size: 15px;
    color: var(--ink);
}
.pl-profile .preference-row:last-child { border-bottom: 0; }
.pl-profile .preference-row:hover { background: var(--strip); }
.pl-profile .pref-toggle {
    width: 18px;
    height: 18px;
    flex: none;
    accent-color: var(--rani);
}
.pl-profile .pref-status {
    margin-left: auto;
    font-family: var(--font-ui);
    font-size: 12px;
    color: var(--ink-soft);
}

.pl-prefs-error {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.pl-profile-logout {
    margin-top: 30px;
    padding-top: 22px;
    border-top: 1px dashed var(--line);
    text-align: center;
}

@media (max-width: 720px) {
    .pl-profile { padding: 22px 18px 24px; }
    .pl-profile-title { font-size: 28px; }
    .pl-form-actions { flex-wrap: wrap; }
}

/* === Albums (Pallu) =============================================== *
 * Photo album grid: plates framed in a rani hairline with italic
 * Newsreader captions, Marcellus month headings, and a Pallu view
 * toggle. Overrides the old app.css .album-* look via .pl-albums.     */
.pl-albums {
    max-width: 1160px;
    margin: 0 auto;
}

.pl-albums-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 26px;
}
.pl-albums-title { font-size: 44px; margin: 0; }
.pl-albums-sub {
    font-family: var(--font-read);
    font-size: 16px;
    color: var(--ink-soft);
    margin: 8px 0 0;
}

.pl-albums .album-view-toggle {
    display: inline-flex;
    border: 1.5px solid var(--rani);
    border-radius: var(--pl-radius-chip);
    overflow: hidden;
    background: var(--ivory);
}
.pl-albums .album-view-btn {
    font-family: var(--font-ui);
    font-weight: 600;
    font-size: 12px;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: var(--rani);
    background: transparent;
    border: 0;
    padding: 8px 16px;
    min-height: 44px;
    cursor: pointer;
}
.pl-albums .album-view-btn + .album-view-btn { border-left: 1.5px solid var(--rani); }
.pl-albums .album-view-btn.is-active { background: var(--rani); color: var(--ivory); }
.pl-albums .album-view-btn:focus-visible {
    outline: 3px solid var(--marigold);
    outline-offset: -3px;
}

.pl-albums .album-issue-group { margin-bottom: 44px; }
.pl-albums .album-issue-head {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin: 0 0 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--line);
}
.pl-albums .album-issue-title {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: 26px;
    color: var(--rani);
    margin: 0;
}
.pl-albums .album-issue-count {
    font-family: var(--font-ui);
    font-weight: 600;
    font-size: 12px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--ink-soft);
}

.pl-albums .album-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 18px;
}

/* each photo is a small framed plate */
.pl-albums .album-card {
    margin: 0;
    padding: 8px;
    background: var(--ivory);
    border: 1px solid var(--rani);
    border-radius: 4px;
    box-shadow: 4px 4px 0 rgba(122, 15, 56, 0.1);
    cursor: zoom-in;
}
.pl-albums .album-card:hover {
    box-shadow: 6px 6px 0 rgba(122, 15, 56, 0.15);
}
.pl-albums .album-card:focus-visible {
    outline: 3px solid var(--marigold);
    outline-offset: 2px;
}
/* video / audio tiles — playable in place, not lightboxed */
.pl-albums .album-card--video,
.pl-albums .album-card--audio { cursor: default; }
.pl-albums .album-card--video video {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    background: var(--ink);
    border: 1px solid var(--line);
    border-radius: 3px;
}
.pl-albums .album-card--audio .album-audio-face {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 4 / 1.6;
    font-size: 30px;
    color: var(--zari);
    background: var(--ivory-2);
    border: 1px solid var(--line);
    border-radius: 3px;
}
.pl-albums .album-card--audio audio {
    width: 100%;
    margin-top: 6px;
}
.pl-albums .album-dump-tag {
    margin-left: 6px;
    padding: 1px 6px;
    font: 700 9px var(--font-ui);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--ink);
    background: var(--marigold);
    border-radius: 3px;
}
.pl-albums .album-card img {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border: 1px solid var(--line);
    border-radius: 3px;
}
.pl-albums .album-card figcaption {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    margin-top: 8px;
    font-family: var(--font-ui);
    font-weight: 600;
    font-size: 11px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--ink-soft);
}
.pl-albums .album-caption {
    margin-top: 4px;
    font-family: var(--font-read);
    font-style: italic;
    font-size: 14px;
    line-height: 1.45;
    color: var(--ink);
    background: transparent;
    border: 0;
    padding: 0;
}

/* quiet empty / loading line vs. loud error alert */
.pl-album-quiet {
    font-family: var(--font-read);
    font-style: italic;
    font-size: 15px;
    color: var(--ink-soft);
    margin: 0;
}
.pl-album-error {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    max-width: 520px;
}

@media (max-width: 720px) {
    .pl-albums-title { font-size: 32px; }
    .pl-albums .album-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
}

/* === Memento (Pallu) ============================================== *
 * Public shareable single-response page: a small ivory reading card
 * with a rani frame and offset shadow on the warm ground.             */
.pl-memento {
    max-width: 640px;
    margin: 0 auto;
}

.pl-memento-back { margin-bottom: 18px; }
.pl-memento-back a {
    font-family: var(--font-ui);
    font-weight: 600;
    font-size: 13px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--ink-soft);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    min-height: 44px;
}
.pl-memento-back a:hover { color: var(--rani); text-decoration: none; }

.pl-card--memento { max-width: 640px; }
.pl-memento-body { padding: 30px 34px 28px; }

.pl-memento-head { margin-bottom: 22px; }
.pl-memento-question {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: 30px;
    line-height: 1.18;
    color: var(--rani);
    margin: 0;
    text-wrap: balance;
}

.pl-memento-author {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 18px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--line);
}
.pl-memento-ava {
    width: 40px;
    height: 40px;
    flex: none;
    border-radius: 50%;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font: 700 15px var(--font-ui);
    background: var(--rani);
    color: #f6ecd8;
}
.pl-memento-ava img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}
.pl-memento-author-name {
    font-family: var(--font-ui);
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--rani);
}
.pl-memento-author-bio {
    font-family: var(--font-read);
    font-style: italic;
    font-size: 13px;
    color: var(--ink-soft);
    margin-top: 2px;
}

.pl-memento-content {
    font-family: var(--font-read);
    font-size: 19px;
    line-height: 1.72;
    color: var(--ink);
}
.pl-memento-content > p {
    white-space: pre-wrap;
    margin: 0 0 0.9em;
}
.pl-memento-content > p:last-child { margin-bottom: 0; }

.pl-memento-photo,
.pl-memento-media {
    margin: 20px 0;
}
.pl-memento-photo img {
    display: block;
    max-width: 100%;
    border: 1px solid var(--rani);
    border-radius: 4px;
}
.pl-memento-media audio,
.pl-memento-media video {
    display: block;
    width: 100%;
}
.pl-memento-media video {
    max-height: 360px;
    border: 1px solid var(--rani);
    border-radius: 4px;
    background: #000;
}
.pl-memento-photo figcaption,
.pl-memento-media figcaption {
    margin-top: 7px;
    font-family: var(--font-read);
    font-style: italic;
    font-size: 14px;
    line-height: 1.45;
    color: var(--ink-soft);
}

.pl-memento-link {
    margin: 16px 0;
    padding: 10px 12px;
    background: var(--ivory-2);
    border-left: 3px solid var(--marigold);
    font-family: var(--font-ui);
    font-size: 14px;
}
.pl-memento-link a { color: var(--rani); }

.pl-memento-foot {
    margin-top: 26px;
    padding-top: 16px;
    border-top: 1px dashed var(--line);
    font-family: var(--font-ui);
    font-size: 13px;
    color: var(--ink-soft);
}
.pl-memento-foot strong { color: var(--rani); }

.pl-memento-note {
    margin: 18px 4px 0;
    text-align: center;
    font-family: var(--font-read);
    font-style: italic;
    font-size: 13px;
    line-height: 1.5;
    color: var(--muted);
}

@media (max-width: 720px) {
    .pl-memento-body { padding: 22px 18px 22px; }
    .pl-memento-question { font-size: 24px; }
    .pl-memento-content { font-size: 17px; line-height: 1.68; }
}

/* === Admin shared (Pallu) ========================================= *
 * Bits shared by the admin sub-pages: the tab row freed from app.css's
 * global <nav> bar (white box, sticky, border), an active-tab state,
 * a zari rule under the page title, extra ledger pill variants, and a
 * Pallu-framed <dialog>.                                              */
nav.pl-tabs {
    position: static;
    z-index: auto;
    height: auto;
    padding: 0;
    background: transparent;
    border-bottom: 0;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.pl-tab.is-active,
.pl-tab.is-active:hover {
    background: var(--rani);
    color: var(--marigold);
}

.pl-admin-rule { margin: 0 0 26px; }

.pl-pill--active   { color: #fff; background: var(--peacock); }
.pl-pill--inactive { color: #fff; background: var(--muted); }
.pl-pill--admin    { color: var(--marigold); background: var(--rani); }

.pl-dialog {
    width: min(440px, calc(100vw - 32px));
    border: 1.5px solid var(--rani);
    border-radius: var(--pl-radius);
    background: var(--ivory);
    color: var(--ink);
    padding: 0;
    box-shadow: var(--pl-shadow);
}
.pl-dialog::backdrop { background: rgba(42, 14, 21, 0.34); }
.pl-dialog-body { padding: 26px; }
.pl-dialog-title {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: 26px;
    color: var(--ink);
    margin: 0 0 14px;
}
.pl-dialog-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 20px;
}
.pl-dialog-sub {
    font-family: var(--font-read);
    font-size: 15px;
    color: var(--ink-soft);
    margin: 6px 0 0;
}
.pl-field-label {
    font: 700 11px var(--font-ui);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ink-soft);
}

/* admin confirm dialogs (publish / create issue) — self-padded variant of
 * .pl-dialog that re-skins the oat card internals they still carry */
.pl-dialog--publish {
    width: min(480px, calc(100vw - 32px));
    padding: 24px 26px;
}
.pl-dialog--publish .card--quiet {
    background: var(--ivory-2);
    border: 1px solid var(--line);
    border-radius: 4px;
    box-shadow: none;
}
.pl-dialog--publish .step-eyebrow {
    font: 700 10px var(--font-ui);
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--peacock);
}
.pl-dialog--publish .stat-value {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: 30px;
    color: var(--ink);
}

/* === Admin settings (Pallu) ======================================= *
 * Settings form on the admin card: Marcellus section headings over
 * hairline-separated sections, Mukta labels + ivory .pl-field inputs. */
.pl-settings { max-width: 560px; }

.pl-settings-section + .pl-settings-section {
    margin-top: 28px;
    padding-top: 24px;
    border-top: 1px solid var(--line);
}
.pl-settings-title { font-size: 24px; margin: 0 0 14px; }
.pl-settings-sub {
    font-family: var(--font-read);
    font-size: 14.5px;
    line-height: 1.55;
    color: var(--ink-soft);
    margin: -6px 0 16px;
}
.pl-field-help {
    font-family: var(--font-read);
    font-style: italic;
    font-size: 13px;
    color: var(--ink-soft);
    margin: 6px 0 0;
}
select.pl-field {
    min-height: 48px;
    margin-top: 8px;
    cursor: pointer;
}
.pl-check-row {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    padding: 2px 0;
    cursor: pointer;
    font-family: var(--font-read);
    font-size: 15px;
    color: var(--ink);
}
.pl-check-row input {
    width: 18px;
    height: 18px;
    flex: none;
    accent-color: var(--rani);
}
.pl-export-row { display: flex; gap: 12px; flex-wrap: wrap; }

/* Default-question manager rows: the enable toggle + text on the left,
 * qadmin-style move/edit/remove buttons on the right. */
.pl-dq-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 4px 0;
    border-bottom: 1px dashed var(--line);
}
.pl-dq-row:last-child { border-bottom: 0; }
.pl-dq-check { flex: 1; min-height: 40px; }
.pl-dq-row .pl-qadmin-actions { flex: none; }

.pl-settings .pl-form-actions {
    margin-top: 28px;
    padding-top: 22px;
    border-top: 1px solid var(--line);
}

/* === Admin members (Pallu) ======================================== *
 * The full member ledger: linked .pl-member-row rows with rani/peacock
 * letter avatars and status pills.                                    */
.pl-members-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}
.pl-members-head .pl-eyebrow { margin: 0; }
.pl-members-list { border-bottom: 1px solid var(--line); }

a.pl-member-row {
    color: inherit;
    text-decoration: none;
    min-height: 58px;
    padding-left: 6px;
    padding-right: 6px;
}
a.pl-member-row:hover { background: var(--strip); text-decoration: none; }
a.pl-member-row:focus-visible {
    outline: 3px solid var(--marigold);
    outline-offset: -3px;
}

@media (max-width: 720px) {
    .pl-members-head .pl-btn { width: 100%; }
    a.pl-member-row { flex-wrap: wrap; row-gap: 6px; }
}

/* === Admin question bank (Pallu) ================================== *
 * Dense ivory rows: Newsreader prompt, Mukta category chip, quiet
 * chip-buttons for edit/delete.                                       */
.pl-qbank-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}
.pl-qbank-head .pl-eyebrow { margin: 0; }
.pl-qbank { border-top: 1px solid var(--line); }

.pl-q-row {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 10px 4px;
    border-bottom: 1px solid var(--line);
}
.pl-q-row:hover { background: var(--ivory-2); }
.pl-q-row-text { flex: 1; min-width: 0; }
.pl-q-row-prompt {
    font-family: var(--font-read);
    font-size: 15.5px;
    line-height: 1.45;
    color: var(--ink);
    margin: 0 0 6px;
}
.pl-q-chip {
    display: inline-flex;
    align-items: center;
    font-family: var(--font-ui);
    font-weight: 700;
    font-size: 10px;
    line-height: 1;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--peacock);
    background: #e7f2f0;
    border: 1px solid #bcd8d3;
    border-radius: var(--pl-radius-chip);
    padding: 4px 8px;
    margin-right: 6px;
}
.pl-q-chip--used {
    color: #8a6a1d;
    background: var(--strip);
    border-color: var(--line);
}
.pl-q-row-actions { display: flex; gap: 8px; flex: none; padding-top: 2px; }

.pl-chip-btn--danger { color: var(--sindoor); border-color: var(--sindoor); }
.pl-chip-btn--danger:hover { background: var(--sindoor); border-color: var(--sindoor); color: #fff; }

@media (max-width: 720px) {
    .pl-qbank-head .pl-btn { width: 100%; }
    .pl-q-row { flex-wrap: wrap; }
    .pl-q-row-actions { width: 100%; justify-content: flex-end; padding-top: 0; }
    .pl-q-row-actions .pl-chip-btn { min-height: 44px; padding: 10px 16px; }
}

/* === Admin member submission (Pallu) ============================== *
 * Admin preview of one member's answers: a reading card with rani
 * question headings and a Newsreader body.                            */
.pl-msub { padding: 28px 34px 34px; }

.pl-msub-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 22px;
}
.pl-msub-who {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}
.pl-msub-ava {
    width: 48px;
    height: 48px;
    flex: none;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    font: 700 19px var(--font-ui);
    background: var(--rani);
    color: #f6ecd8;
}
.pl-msub-ava img { width: 100%; height: 100%; object-fit: cover; }
.pl-msub-id { min-width: 0; }
.pl-msub-name {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: 28px;
    line-height: 1.1;
    color: var(--ink);
    margin: 0;
}
.pl-msub-email {
    font-family: var(--font-read);
    font-size: 13px;
    color: var(--ink-soft);
    margin: 2px 0 0;
}

.pl-msub-issue {
    background: var(--strip);
    border: 1px solid var(--line);
    border-radius: 4px;
    padding: 16px 18px;
    margin-bottom: 8px;
}
.pl-msub-issue-title {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: 24px;
    color: var(--ink);
    margin: 2px 0 10px;
}
.pl-msub-issue-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    font-family: var(--font-ui);
    font-size: 13px;
    color: var(--ink-soft);
}
.pl-msub-note {
    font-family: var(--font-read);
    font-style: italic;
    font-size: 13px;
    color: var(--ink-soft);
    margin: 10px 0 0;
}

.pl-msub-q {
    padding: 24px 0 22px;
    border-bottom: 1px solid var(--line);
}
.pl-msub-q:last-of-type { border-bottom: 0; padding-bottom: 6px; }
.pl-msub-q-title {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: 23px;
    line-height: 1.2;
    color: var(--rani);
    margin: 0 0 12px;
}
.pl-msub-status {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 12px;
    font-family: var(--font-ui);
    font-size: 12px;
    color: var(--ink-soft);
}
.pl-msub-body {
    font-family: var(--font-read);
    font-size: 17px;
    line-height: 1.65;
    color: var(--read-ink);
}
.pl-msub-body p { white-space: pre-wrap; margin: 0 0 0.75em; }
.pl-msub-body p:last-child { margin-bottom: 0; }
.pl-msub-body figure { margin: 14px 0; }
.pl-msub-body img {
    display: block;
    max-width: 100%;
    border: 1px solid var(--rani);
    border-radius: 4px;
}
.pl-msub-body audio,
.pl-msub-body video { display: block; width: 100%; }
.pl-msub-body video {
    max-height: 360px;
    border: 1px solid var(--rani);
    border-radius: 4px;
    background: #000;
}
.pl-msub-body figcaption {
    margin-top: 6px;
    font-family: var(--font-read);
    font-style: italic;
    font-size: 13px;
    color: var(--ink-soft);
}
.pl-msub-link {
    margin: 12px 0;
    padding: 10px 12px;
    background: var(--ivory-2);
    border-left: 3px solid var(--marigold);
    font-family: var(--font-ui);
    font-size: 13px;
}
.pl-msub-link a { color: var(--rani); }
.pl-msub-empty {
    font-family: var(--font-read);
    font-style: italic;
    font-size: 15px;
    color: var(--ink-soft);
    margin: 0;
}

@media (max-width: 720px) {
    .pl-msub { padding: 20px 16px 24px; }
    .pl-msub-name { font-size: 23px; }
    .pl-msub-head .pl-tab {
        display: inline-flex;
        align-items: center;
        min-height: 44px;
    }
}

/* === Admin dashboard past issues (Pallu) ========================== *
 * A little breathing room for the archive-style issue cards reused on
 * the dashboard (grid + cards come from the Archive section above).   */
.pl-past { margin-top: 30px; }
.pl-past-title { font-size: 24px; margin: 0 0 16px; }

/* === Memento back strip (Pallu) =================================== *
 * Frees the "← <month> edition" link from app.css's global <nav> bar
 * so it reads as a quiet Mukta link on the warm ground, no box.       */
nav.pl-memento-back {
    position: static;
    z-index: auto;
    height: auto;
    padding: 0;
    background: transparent;
    border-bottom: 0;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}
nav.pl-memento-back a { padding: 0; border-radius: 0; }
nav.pl-memento-back a:hover { background: transparent; }

/* ================================================================== *
 * Multi-Loop: nav switcher, "Your Loops" cards, instance console
 * ================================================================== */

/* Nav Loop switcher — a small details/summary dropdown that matches the
   nav link treatment. Only rendered for people in 2+ Loops. The resets
   undo oat.css's card-style details treatment (border, overflow:hidden —
   which would clip the absolutely-positioned menu — and the ::after
   chevron). */
.pl-nav-loops {
    position: relative;
    overflow: visible;
    border: 0;
    background: transparent;
    border-radius: 0;
}
.pl-nav-loops > summary::after { display: none; }
.pl-nav-loops > summary::marker { display: none; }
.pl-nav-loops > summary:hover { background: transparent; }
.pl-nav-loops > summary {
    list-style: none;
    cursor: pointer;
    font: 600 13px var(--font-ui);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--nav-muted);
    padding: 21px 0 19px;
    border-bottom: 2px solid transparent;
    user-select: none;
}
.pl-nav-loops > summary::-webkit-details-marker { display: none; }
.pl-nav-loops > summary:hover { color: #f6ecd8; }
.pl-nav-loops[open] > summary { color: var(--marigold); }

.pl-nav-loops-menu {
    position: absolute;
    margin: 0;
    top: calc(100% + 2px);
    right: 0;
    min-width: 220px;
    background: var(--ivory);
    border: 1.5px solid var(--marigold);
    border-radius: var(--pl-radius);
    box-shadow: 8px 8px 0 rgba(122, 15, 56, 0.18);
    padding: 6px;
    display: flex;
    flex-direction: column;
    z-index: 60;
}
.pl-nav-loop {
    display: flex;
    align-items: center;
    gap: 9px;
    width: 100%;
    text-align: left;
    background: transparent;
    border: 0;
    border-radius: var(--pl-radius-chip);
    padding: 9px 10px;
    cursor: pointer;
    font: 600 14px var(--font-ui);
    color: var(--ink);
    text-transform: none;
    letter-spacing: 0;
}
nav.pl-nav .pl-nav-loops-menu a.pl-nav-loop {
    font: 600 13px var(--font-ui);
    color: var(--ink-soft);
    padding: 9px 10px;
    border-bottom: 0;
    text-transform: none;
    letter-spacing: 0;
}
.pl-nav-loop:hover { background: var(--strip); }
nav.pl-nav .pl-nav-loops-menu a.pl-nav-loop:hover { background: var(--strip); color: var(--rani); }
.pl-nav-loop-dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--line); flex: none;
}
.pl-nav-loop.is-current { color: var(--rani); }
.pl-nav-loop.is-current .pl-nav-loop-dot { background: var(--marigold); }

/* "Your Loops" page — one woven card per membership. */
.pl-loops-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
    margin-top: 26px;
}
.pl-loop-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: var(--ivory-2);
    border: 1.5px solid var(--line);
    border-top: 4px solid var(--marigold);
    border-radius: var(--pl-radius);
    padding: 20px 20px 18px;
    color: var(--ink);
    text-decoration: none;
    cursor: pointer;
    text-align: left;
    font-family: var(--font-read);
}
.pl-loop-card:hover { border-color: var(--marigold); text-decoration: none; background: var(--ivory); }
.pl-loop-card.is-current { border-color: var(--marigold); box-shadow: 6px 6px 0 rgba(122, 15, 56, 0.12); }
.pl-loop-card-name {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: 24px;
    color: var(--rani);
}
.pl-loop-card-tagline { font-style: italic; color: var(--ink-soft); font-size: 15px; }
.pl-loop-card-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: auto;
    padding-top: 8px;
}

/* Instance console — the operator's ledger of Loops. */
.pl-inst-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 12px;
    border-bottom: 1px solid var(--line);
}
.pl-inst-row:last-child { border-bottom: 0; }
.pl-inst-row.is-archived { opacity: 0.55; }
.pl-inst-main { flex: 1; min-width: 0; }
.pl-inst-name {
    font-family: var(--font-display);
    font-size: 19px;
    color: var(--rani);
}
.pl-inst-meta { font: 500 13px var(--font-ui); color: var(--ink-soft); }
.pl-inst-actions { display: flex; align-items: center; gap: 8px; }

/* Info popover — a small "i" beside a control that explains what it does.
   The popover drops downward inside the card, so .pl-card's
   overflow:hidden never clips it. */
.pl-info {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
}
.pl-info-btn {
    flex: none;
    width: 22px;
    height: 22px;
    padding: 0;
    border: 1.5px solid var(--marigold);
    border-radius: 50%;
    background: transparent;
    color: var(--ink-soft);
    font: italic 700 13px/1 var(--font-display);
    cursor: pointer;
}
.pl-info-btn:hover { background: var(--strip); color: var(--rani); }
.pl-info-btn:focus-visible { outline: 3px solid var(--marigold); outline-offset: 2px; }
.pl-info-btn[aria-expanded="true"] { background: var(--marigold); color: var(--ivory); }
.pl-info-pop {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: min(340px, 78vw);
    background: var(--ivory);
    border: 1.5px solid var(--marigold);
    border-radius: var(--pl-radius);
    box-shadow: 8px 8px 0 rgba(122, 15, 56, 0.18);
    padding: 12px 14px;
    font: 500 13px/1.55 var(--font-ui);
    color: var(--ink-soft);
    text-align: left;
    z-index: 60;
}
@media (max-width: 720px) {
    .pl-info { width: 100%; }
    .pl-info .pl-btn { flex: 1; }
}
