/* HotRamenAudios progress board.
   Follows the site's component language: rounded-[2rem] white cards on
   gray-50 sections, tiny uppercase pills, #FF6900 accent, Inter. Structural
   rules only; colour utilities come from Tailwind where possible. */

.pb-root, .pb-modal, .pb-dd__menu {
    --pb-accent: #FF6900;
    --pb-accent-hover: #e65e00;
    --pb-accent-soft: #ffedd5;
    --pb-surface: #ffffff;
    --pb-ground: #f9fafb;
    --pb-border: #e5e7eb;
    --pb-text: #111827;
    --pb-body: #4b5563;
    --pb-muted: #9ca3af;
    --pb-track: #f3f4f6;
}
/* A short board still fills the window: the last section grows so the footer
   sits at the bottom instead of leaving the page background under it. */
body:has(> .pb-root) { display: flex; flex-direction: column; }
.pb-root { flex: 1 0 auto; display: flex; flex-direction: column; }
.pb-root > section:last-of-type { flex-grow: 1; }

.dark .pb-root, .dark .pb-modal, .dark .pb-dd__menu {
    --pb-accent-soft: rgba(255, 105, 0, 0.12);
    --pb-surface: #161b22;
    --pb-ground: #111820;
    --pb-border: rgba(255, 255, 255, 0.06);
    --pb-text: #ffffff;
    --pb-body: #9ca3af;
    --pb-muted: #6b7280;
    --pb-track: rgba(255, 255, 255, 0.08);
}

/* ---------- Tabs (same pill group as Browse Categories) ---------- */
.pb-tab {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.25rem;
    border-radius: 999px;
    border: 0;
    background: transparent;
    color: var(--pb-body);
    font-size: 0.875rem;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
}
.pb-tab:hover { color: var(--pb-text); }
.pb-tab[aria-selected="true"] {
    background: var(--pb-accent);
    color: #fff;
    box-shadow: 0 10px 15px -3px rgba(255, 105, 0, 0.25);
}

/* ---------- Summary ---------- */
.pb-summary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    max-width: 72rem;
    margin: 0 auto;
}
@media (min-width: 1024px) { .pb-summary { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.5rem; } }
.pb-tile {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 1.5rem 1.75rem;
    border-radius: 2rem;
    border: 1px solid var(--pb-border);
    background: var(--pb-surface);
    min-width: 0;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.pb-tile:hover { transform: translateY(-4px); box-shadow: 0 20px 25px -5px rgba(229, 231, 235, 0.5); }
.dark .pb-tile:hover { box-shadow: 0 20px 25px -5px rgba(255, 255, 255, 0.05); }
.pb-tile--next { grid-column: span 2; }
@media (min-width: 1024px) { .pb-tile--next { grid-column: span 1; } }
.pb-tile__value {
    font-size: 2.25rem;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.03em;
    color: var(--pb-accent);
}
.pb-tile__label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--pb-body);
}
.pb-tile__text {
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.3;
    color: var(--pb-text);
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.pb-tile--next .pb-tile__label { order: -1; text-transform: uppercase; letter-spacing: 0.1em; font-size: 0.65rem; font-weight: 800; color: var(--pb-muted); }
.pb-tile__hint { margin-top: 0.25rem; }

/* ---------- Buttons ---------- */
.pb-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.7rem 1.5rem;
    border-radius: 999px;
    border: 1px solid var(--pb-border);
    background: var(--pb-surface);
    color: var(--pb-text);
    font-size: 0.875rem;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}
.pb-btn:hover { transform: translateY(-2px); box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.08); }
.pb-btn--primary { background: var(--pb-accent); border-color: var(--pb-accent); color: #fff; box-shadow: 0 10px 15px -3px rgba(255, 105, 0, 0.2); }
.pb-btn--primary:hover { background: var(--pb-accent-hover); }
.pb-btn--ghost { background: transparent; }
.pb-btn--danger { color: #dc2626; border-color: rgba(220, 38, 38, 0.3); }
.pb-btn:disabled { opacity: 0.5; cursor: default; transform: none; }
.pb-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 999px;
    border: 0;
    background: transparent;
    color: var(--pb-muted);
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
}
.pb-icon-btn:hover { background: var(--pb-track); color: var(--pb-text); }
.pb-icon-btn--danger:hover { color: #dc2626; }

/* ---------- Pipeline rail ---------- */
.pb-columns {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    padding: 0.5rem max(1.5rem, calc((100vw - 100rem) / 2 + 1.5rem)) 2rem;
    scroll-padding-inline: max(1.5rem, calc((100vw - 100rem) / 2 + 1.5rem));
    scrollbar-width: thin;
    scrollbar-color: var(--pb-border) transparent;
}
@media (max-width: 640px) {
    .pb-columns { padding-inline: 1rem; scroll-padding-inline: 1rem; gap: 1rem; scroll-snap-type: x mandatory; }
}
.pb-column {
    flex: 0 0 21rem;
    max-width: 86vw;
    scroll-snap-align: start;
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.pb-column__head {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0 0.25rem 1rem;
}
.pb-column__title {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--pb-text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.pb-column__title[contenteditable="true"] {
    outline: 2px solid var(--pb-accent);
    border-radius: 0.5rem;
    padding: 0 0.4rem;
    white-space: normal;
}
.pb-column__more { flex: 0 0 auto; width: 1.9rem; height: 1.9rem; }

/* Stage options dropdown */
.pb-menu {
    position: fixed;
    z-index: 60;
    min-width: 11.5rem;
    display: flex;
    flex-direction: column;
    padding: 0.35rem;
    border-radius: 1rem;
    border: 1px solid var(--pb-border);
    background: var(--pb-surface);
    box-shadow: 0 16px 40px -12px rgba(0, 0, 0, 0.28);
}
.dark .pb-menu { border-color: rgba(255, 255, 255, 0.1); box-shadow: 0 16px 40px -12px rgba(0, 0, 0, 0.7); }
.pb-menu__item {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    width: 100%;
    padding: 0.55rem 0.75rem;
    border: 0;
    border-radius: 0.7rem;
    background: transparent;
    color: var(--pb-text);
    font-size: 0.85rem;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
}
.pb-menu__item svg { width: 1rem; height: 1rem; color: var(--pb-muted); }
.pb-menu__item:hover, .pb-menu__item:focus-visible { background: var(--pb-track); outline: none; }
.pb-menu__item--danger, .pb-menu__item--danger svg { color: #dc2626; }
.pb-menu__item--danger:hover, .pb-menu__item--danger:focus-visible { background: rgba(220, 38, 38, 0.1); }
.pb-menu__sep { height: 1px; margin: 0.3rem 0.4rem; background: var(--pb-border); }
.pb-paused-pill { display: inline-flex; align-items: center; gap: 0.3rem; margin-left: 0.6rem; padding: 0.2rem 0.55rem; border-radius: 999px; background: #ffedd5; color: #c2410c; font-size: 0.65rem; line-height: 1; letter-spacing: 0.12em; text-transform: uppercase; vertical-align: middle; }
.pb-paused-pill svg { width: 0.6rem; height: 0.6rem; fill: currentColor; stroke-width: 0; }
.dark .pb-paused-pill { background: rgba(255, 105, 0, 0.15); color: #fb923c; }
.pb-cards {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-height: 6rem;
    padding: 0.25rem;
    max-height: calc(100vh - 14rem);
    overflow-y: auto;
    scrollbar-width: thin;
}
.pb-column__foot { padding: 0.75rem 0.25rem 0; }
.pb-add-card {
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.85rem;
    border-radius: 1.5rem;
    border: 1px dashed var(--pb-border);
    background: transparent;
    color: var(--pb-body);
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.pb-add-card:hover { background: var(--pb-surface); color: var(--pb-accent); border-color: var(--pb-accent); }
.pb-empty {
    padding: 2rem 1rem;
    text-align: center;
    border-radius: 1.5rem;
    border: 1px dashed var(--pb-border);
    font-size: 0.85rem;
    color: var(--pb-muted);
}
.pb-board-empty {
    flex: 1 1 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    padding: 4rem 1rem;
    text-align: center;
    border-radius: 2rem;
    border: 1px solid var(--pb-border);
    background: var(--pb-surface);
    color: var(--pb-body);
}
.pb-board-empty h2 { font-size: 1.5rem; font-weight: 700; color: var(--pb-text); }

/* ---------- Cards (same shell as the release cards) ---------- */
.pb-card {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 1.5rem;
    border-radius: 1.75rem;
    border: 1px solid var(--pb-border);
    background: var(--pb-surface);
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.pb-card:hover { transform: translateY(-4px); box-shadow: 0 20px 25px -5px rgba(229, 231, 235, 0.5); }
.dark .pb-card:hover { box-shadow: 0 20px 25px -5px rgba(255, 255, 255, 0.05); }
.pb-card:focus-visible, .pb-handle:focus-visible, .pb-tab:focus-visible, .pb-btn:focus-visible {
    outline: 2px solid var(--pb-accent);
    outline-offset: 2px;
}
.pb-card__chips { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.pb-card__title { font-size: 1.15rem; font-weight: 700; line-height: 1.25; color: var(--pb-text); transition: color 0.3s ease; }
.pb-card:hover .pb-card__title { color: var(--pb-accent); }
.pb-card__excerpt {
    font-size: 0.875rem;
    line-height: 1.6;
    color: var(--pb-body);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.pb-card__progress {
    display: grid;
    grid-template-columns: 1fr auto;
    row-gap: 0.4rem;
    align-items: center;
    margin-top: 0.25rem;
    font-size: 0.75rem;
    color: var(--pb-body);
}
.pb-card__percent { font-weight: 700; color: var(--pb-text); }
.pb-card__steps { text-align: right; }
.pb-card__progress .pb-progress { grid-column: 1 / -1; }
.pb-card__cta {
    display: inline-flex;
    align-items: center;
    margin-top: 0.25rem;
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--pb-accent);
}
.pb-card__cta [data-lucide], .pb-card__cta svg { transition: transform 0.3s ease; }
.pb-card:hover .pb-card__cta svg { transform: translateX(4px); }

/* ---------- Progress bar ---------- */
.pb-progress {
    position: relative;
    display: block;
    width: 100%;
    height: 0.4rem;
    border-radius: 999px;
    background: var(--pb-track);
    overflow: hidden;
}
.pb-progress--tile { margin-top: 0.5rem; }
.pb-progress__bar {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--pb-accent);
    transition: width 0.4s ease;
}

/* ---------- Pills (same as the AUDIO pill on release cards) ---------- */
.pb-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.15rem 0.65rem;
    border-radius: 999px;
    font-size: 0.625rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    line-height: 1.5;
    background: var(--pb-accent-soft);
    color: var(--pb-accent);
}
.pb-tone-info { background: #dbeafe; color: #1d4ed8; }
.pb-tone-success { background: #d1fae5; color: #047857; }
.pb-tone-warning { background: #fef3c7; color: #b45309; }
.pb-tone-danger { background: #fee2e2; color: #b91c1c; }
.pb-tone-neutral { background: #f3f4f6; color: #4b5563; }
.pb-pill--hidden { background: #ede9fe; color: #6d28d9; }
.dark .pb-tone-info { background: rgba(59, 130, 246, 0.12); color: #93c5fd; }
.dark .pb-tone-success { background: rgba(16, 185, 129, 0.12); color: #6ee7b7; }
.dark .pb-tone-warning { background: rgba(245, 158, 11, 0.14); color: #fcd34d; }
.dark .pb-tone-danger { background: rgba(239, 68, 68, 0.12); color: #fca5a5; }
.dark .pb-tone-neutral { background: rgba(255, 255, 255, 0.08); color: #d1d5db; }
.dark .pb-pill--hidden { background: rgba(139, 92, 246, 0.14); color: #c4b5fd; }

/* ---------- Paused stage: the site orange fades into the normal column grey, with a small "Paused" label above the title ---------- */
.pb-column.pb-column--paused { background: linear-gradient(180deg, #ffedd5 0, #eceef1 7rem); }
.dark .pb-column.pb-column--paused { background: linear-gradient(180deg, rgba(255, 105, 0, 0.16) 0, rgba(255, 255, 255, 0.05) 7rem); }
.pb-column__titles { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.pb-column__eyebrow { margin-bottom: 0.15rem; font-size: 0.65rem; line-height: 1; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: #ea580c; }
.dark .pb-column__eyebrow { color: #fb923c; }
.pb-stage-note {
    margin: -0.15rem 0.5rem 0.6rem;
    font-size: 0.78rem;
    line-height: 1.45;
    color: var(--pb-body);
    white-space: pre-line;
    overflow-wrap: anywhere;
}
.pb-date { font-size: 0.75rem; font-weight: 600; color: var(--pb-muted); white-space: nowrap; }
.pb-date[data-pb-due="soon"] { color: var(--pb-accent); }
.pb-date[data-pb-due="past"] { color: #047857; }
.dark .pb-date[data-pb-due="past"] { color: #6ee7b7; }

/* ---------- Hidden items (edit mode only) ---------- */
.pb-hidden { opacity: 0.55; }
.pb-card.pb-hidden { border-style: dashed; }

/* ---------- Drag and drop ---------- */
.pb-handle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    border: 0;
    border-radius: 0.5rem;
    background: transparent;
    color: var(--pb-muted);
    cursor: grab;
    touch-action: none;
}
.pb-handle:active { cursor: grabbing; }
[data-can-edit="1"] .pb-card { touch-action: pan-y; }
[data-can-edit="1"] .pb-card.pb-drag-armed { touch-action: none; }
.pb-ghost {
    position: fixed;
    z-index: 200;
    pointer-events: none;
    width: var(--pb-ghost-width, 19rem);
    transform: rotate(2deg) scale(1.02);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.3);
    opacity: 0.96;
}
/* Dragged copy: solid, and no scrollbar on a stage being carried. */
.pb-ghost .pb-cards { overflow: hidden; }
.pb-ghost.pb-column { background-color: #eceef1 !important; }
.dark .pb-ghost.pb-column { background-color: #1b2229 !important; }
.pb-placeholder {
    opacity: 0.4;
    border: 2px dashed var(--pb-accent) !important;
    background: var(--pb-accent-soft) !important;
}
.pb-placeholder > * { visibility: hidden; }
.pb-column.pb-placeholder { min-height: 8rem; border-radius: 1.75rem; }
.pb-drop-target .pb-cards { border-radius: 1.75rem; box-shadow: inset 0 0 0 2px rgba(255, 105, 0, 0.35); }
body.pb-dragging { cursor: grabbing; user-select: none; -webkit-user-select: none; }
body.pb-dragging .pb-card:hover { transform: none; }

/* ---------- Calendar ---------- */
.pb-calendar-layout { display: grid; gap: 1.5rem; }
@media (min-width: 1024px) { .pb-calendar-layout { grid-template-columns: minmax(0, 1fr) 22rem; gap: 2rem; } }
.pb-cal, .pb-upcoming {
    border-radius: 2rem;
    border: 1px solid var(--pb-border);
    background: var(--pb-surface);
    padding: 1.5rem;
}
@media (min-width: 640px) { .pb-cal, .pb-upcoming { padding: 2rem; } }
.pb-cal__head { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 1rem; }
.pb-cal__title { flex: 1 1 auto; font-size: 1.5rem; font-weight: 700; letter-spacing: -0.01em; color: var(--pb-text); }
.pb-cal__weekdays, .pb-cal__grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 0.35rem;
}
.pb-cal__weekdays span { font-size: 0.65rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; color: var(--pb-muted); text-align: center; padding: 0.35rem 0; }
.pb-cal__cell {
    min-height: 5rem;
    padding: 0.5rem;
    border-radius: 1rem;
    background: var(--pb-ground);
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 0;
}
.dark .pb-cal__cell { background: rgba(255, 255, 255, 0.03); }
@media (max-width: 640px) { .pb-cal__cell { min-height: 3.4rem; padding: 0.3rem; border-radius: 0.6rem; } }
.pb-cal__cell--pad { background: transparent; }
.pb-cal__cell--today { box-shadow: inset 0 0 0 2px var(--pb-accent); }
.pb-cal__cell--has { background: var(--pb-accent-soft); }
.pb-cal__day { font-size: 0.75rem; font-weight: 700; color: var(--pb-muted); }
.pb-cal__cell--today .pb-cal__day { color: var(--pb-accent); }
.pb-cal__item {
    display: block;
    width: 100%;
    text-align: left;
    padding: 0.3rem 0.55rem;
    border: 0;
    border-radius: 999px;
    background: var(--pb-accent);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color 0.2s ease;
}
.pb-cal__item:hover { background: var(--pb-accent-hover); }
@media (max-width: 640px) { .pb-cal__item { font-size: 0; height: 0.5rem; padding: 0; } }
.pb-upcoming { align-self: start; }
.pb-upcoming__heading { font-size: 1.5rem; font-weight: 700; letter-spacing: -0.01em; color: var(--pb-text); }
.pb-upcoming__sub { margin: 0.25rem 0 1.25rem; font-size: 0.875rem; color: var(--pb-body); }
.pb-upcoming__list { display: flex; flex-direction: column; gap: 0.5rem; list-style: none; margin: 0; padding: 0; }
.pb-upcoming__item {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    width: 100%;
    padding: 0.75rem;
    border-radius: 1.25rem;
    border: 1px solid transparent;
    background: transparent;
    text-align: left;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}
.pb-upcoming__item:hover { background: var(--pb-ground); border-color: var(--pb-border); }
.pb-upcoming__date {
    flex: 0 0 auto;
    min-width: 3.75rem;
    text-align: center;
    padding: 0.45rem 0.5rem;
    border-radius: 0.9rem;
    font-size: 0.75rem;
    font-weight: 800;
    background: var(--pb-track);
    color: var(--pb-body);
}
.pb-upcoming__date[data-pb-due="soon"] { background: var(--pb-accent-soft); color: var(--pb-accent); }
.pb-upcoming__body { display: flex; flex-direction: column; min-width: 0; flex: 1 1 auto; }
.pb-upcoming__title { font-size: 0.95rem; font-weight: 700; color: var(--pb-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pb-upcoming__stage { font-size: 0.75rem; color: var(--pb-body); }

/* ---------- Modal body ---------- */
.pb-modal__body { padding: 2rem 1.5rem 1.5rem; }
@media (min-width: 640px) { .pb-modal__body { padding: 2.5rem 2.5rem 2rem; } }
.pb-modal__stage { font-size: 0.75rem; line-height: 1rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.18em; color: var(--pb-accent); margin-bottom: 0.625rem; }
.pb-modal__title { font-size: 1.5rem; font-weight: 700; line-height: 2rem; padding-right: 3rem; color: var(--pb-text); }
.pb-modal__section { margin-top: 1.5rem; }

/* Card popup for every stage after Scripting: description under the
   title, then progress and the checklists (next step in bold). */
.pb-detail__lead { margin-top: 0.625rem; font-size: 1rem; line-height: 1.5rem; color: var(--pb-body); white-space: pre-wrap; }
.pb-detail__chips { margin-top: 0.875rem; gap: 0.375rem; }
.pb-detail__date { display: inline-flex; align-items: center; gap: 0.375rem; height: 1.5rem; padding: 0 0.625rem; border-radius: 999px; background: var(--pb-track); color: var(--pb-body); font-size: 0.75rem; font-weight: 600; white-space: nowrap; }
.pb-detail__date[data-pb-due="soon"] { background: var(--pb-accent-soft); color: var(--pb-accent); }
.pb-detail__label { display: block; font-size: 0.75rem; line-height: 1rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: #6b7280; }
.dark .pb-detail__label { color: #9ca3af; }
.pb-detail__progress { margin-top: 1.5rem; }
.pb-detail__progress-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 0.625rem; }
.pb-detail__progress-count { font-size: 0.875rem; line-height: 1.25rem; color: #6b7280; }
.dark .pb-detail__progress-count { color: #9ca3af; }
.pb-detail__progress-count strong { font-weight: 700; color: var(--pb-text); }
.pb-detail__lists { margin-top: 1rem; }
.pb-detail__list + .pb-detail__list { border-top: 1px solid var(--pb-track); }
.pb-detail__list-head { display: flex; align-items: center; gap: 0.75rem; padding: 0.625rem 0; color: var(--pb-muted); }
.pb-detail__list-head.pb-done { color: #10b981; }
.pb-detail__list-name { flex: 1 1 auto; min-width: 0; font-size: 0.9375rem; font-weight: 600; color: var(--pb-text); }
.pb-detail__list-count { font-size: 0.875rem; color: #6b7280; white-space: nowrap; }
.dark .pb-detail__list-count { color: #9ca3af; }
.pb-detail__list-head.pb-done .pb-detail__list-count { font-weight: 600; color: #047857; }
.dark .pb-detail__list-head.pb-done .pb-detail__list-count { color: #6ee7b7; }
.pb-detail__items { display: flex; flex-direction: column; gap: 0.5rem; list-style: none; margin: 0.25rem 0 0; padding: 0 0 0.75rem 2rem; }
.pb-detail__item { position: relative; font-size: 0.9375rem; line-height: 1.375rem; color: var(--pb-body); }
.pb-detail__item.pb-done { color: #6b7280; }
.pb-detail__item.pb-next { font-weight: 600; color: var(--pb-text); }
/* Steps that name creators: a two-column cast grid with photos. */
.pb-cast { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.5rem; list-style: none; margin: 0.25rem 0 0.875rem; padding: 0; }
@media (max-width: 480px) { .pb-cast { grid-template-columns: 1fr; } }
.pb-cast__inner { display: flex; align-items: center; gap: 0.75rem; height: 100%; box-sizing: border-box; padding: 0.625rem 0.75rem; border-radius: 1rem; background: #f9fafb; border: 1px solid transparent; color: inherit; text-decoration: none; }
.dark .pb-cast__inner { background: rgba(255, 255, 255, 0.04); }
a.pb-cast__inner { transition: background-color 0.2s ease; }
a.pb-cast__inner:hover { background: #f3f4f6; }
.dark a.pb-cast__inner:hover { background: rgba(255, 255, 255, 0.08); }
a.pb-cast__inner:focus-visible { outline: 2px solid #9ca3af; outline-offset: 2px; }
.pb-cast__tile:not(.pb-done) .pb-cast__inner { background: transparent; border: 1px dashed #d1d5db; }
.dark .pb-cast__tile:not(.pb-done) .pb-cast__inner { border-color: rgba(255, 255, 255, 0.16); }
/* Waiting and retake cards that link somewhere get the same hover as the rest. */
.pb-cast__tile:not(.pb-done) a.pb-cast__inner:hover { background: #f3f4f6; }
.dark .pb-cast__tile:not(.pb-done) a.pb-cast__inner:hover { background: rgba(255, 255, 255, 0.08); }
/* Retake cards hover to a soft orange of the same weight. */
.pb-cast__tile.pb-retake a.pb-cast__inner:hover { background: rgba(251, 146, 60, 0.08); }
.dark .pb-cast__tile.pb-retake a.pb-cast__inner:hover { background: rgba(251, 146, 60, 0.07); }
.pb-cast__avatar { position: relative; flex: none; }
.pb-cast__photo { display: flex; width: 2.5rem; height: 2.5rem; border-radius: 999px; object-fit: cover; }
.pb-cast__initial { align-items: center; justify-content: center; background: #e5e7eb; color: #6b7280; font-size: 0.9375rem; font-weight: 700; }
.dark .pb-cast__initial { background: rgba(255, 255, 255, 0.08); color: #9ca3af; }
.pb-cast__tick { position: absolute; right: -0.1875rem; bottom: -0.1875rem; display: inline-flex; align-items: center; justify-content: center; width: 1.125rem; height: 1.125rem; border-radius: 999px; background: #10b981; color: #fff; box-shadow: 0 0 0 2px #f9fafb; }
.dark .pb-cast__tick { box-shadow: 0 0 0 2px #1b2129; }
.pb-cast__tick svg { stroke-width: 3.5; }
.pb-cast__text { display: flex; flex-direction: column; min-width: 0; line-height: 1.125rem; }
.pb-cast__name { font-size: 0.875rem; font-weight: 600; color: var(--pb-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pb-cast__tile.pb-next .pb-cast__name { font-weight: 700; }
.pb-cast__role { font-size: 0.8125rem; color: #6b7280; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dark .pb-cast__role { color: #9ca3af; }
.pb-versions { text-align: left; }
.pb-versions .pb-cast__name { overflow: visible; white-space: normal; overflow-wrap: anywhere; }
.pb-card__series { margin: 0 0 0.25rem; color: var(--pb-muted); font-size: 0.75rem; line-height: 1.25; font-weight: 400; overflow-wrap: anywhere; }
.pb-detail__credit { margin: 0.5rem 0 1rem; color: var(--pb-muted); font-size: 0.8125rem; line-height: 1.5; overflow-wrap: anywhere; }
.pb-detail__credit a { color: var(--pb-accent); text-decoration: underline; text-underline-offset: 0.15em; }
/* Centred under the list heading's 20px icon. */
.pb-detail__item > svg, .pb-detail__item > [data-lucide] { position: absolute; left: -1.875rem; top: 0.1875rem; color: var(--pb-muted); }
.pb-detail__item.pb-done > svg, .pb-detail__item.pb-done > [data-lucide] { color: #10b981; }

/* Scripting cards: compact popup in the site's empty-state style
   (artist page "No content found"). */
.pb-modal__panel--compact { max-width: 28rem; }
.pb-modal__panel--compact .pb-modal__body { padding: 3.5rem 2rem 2.5rem; }
.pb-stage-hero { text-align: center; }
.pb-stage-hero__icon { display: inline-flex; align-items: center; justify-content: center; width: 5rem; height: 5rem; margin-bottom: 1.5rem; border-radius: 999px; background: #f3f4f6; color: #9ca3af; }
.dark .pb-stage-hero__icon { background: rgba(255, 255, 255, 0.05); }
.pb-stage-hero__eyebrow { margin-bottom: 0.5rem; font-size: 0.75rem; line-height: 1rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: #6b7280; }
.dark .pb-stage-hero__eyebrow { color: #9ca3af; }
.pb-stage-hero__title { margin-bottom: 0.5rem; font-size: 1.5rem; line-height: 2rem; font-weight: 700; color: var(--pb-text); }
.pb-stage-hero__text { max-width: 20rem; margin: 0 auto; padding: 0.5rem; font-size: 1.125rem; line-height: 1.75rem; color: #6b7280; }
@media (min-width: 640px) { .pb-stage-hero__text { max-width: 32rem; } }
.dark .pb-stage-hero__text { color: #9ca3af; }
.pb-stage-hero__chips { justify-content: center; margin-top: 1rem; }
.pb-series-chip { display: inline-block; max-width: 100%; margin: 0 0 0.5rem; padding: 0.2rem 0.7rem; border-radius: 999px; background: #f3f4f6; color: #4b5563; font-size: 0.8rem; line-height: 1.25rem; font-weight: 600; overflow-wrap: anywhere; }
.dark .pb-series-chip { background: rgba(255, 255, 255, 0.08); color: #d1d5db; }
.pb-detail__chips .pb-series-chip { margin: 0; }
.pb-stage-hero__actions { display: flex; justify-content: center; margin-top: 1.5rem; }
.pb-modal__label { display: block; font-size: 0.65rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.12em; color: var(--pb-muted); margin-bottom: 0.5rem; }
.pb-modal__text { font-size: 0.95rem; line-height: 1.65; color: var(--pb-body); white-space: pre-wrap; }
.pb-modal__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
@media (max-width: 480px) { .pb-modal__grid { grid-template-columns: 1fr; } }
.pb-modal__actions { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem; margin-top: 2rem; }
.pb-modal__actions > div { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.pb-modal__error { margin-top: 0.75rem; font-size: 0.8rem; font-weight: 600; color: #dc2626; }
.pb-modal__error:empty { display: none; }
.pb-input, .pb-textarea, .pb-select {
    width: 100%;
    padding: 0.7rem 1rem;
    border-radius: 1rem;
    border: 1px solid var(--pb-border);
    background: var(--pb-ground);
    color: var(--pb-text);
    font: inherit;
    font-size: 0.9rem;
}
.dark .pb-input, .dark .pb-textarea, .dark .pb-select { background: rgba(255, 255, 255, 0.04); }
.pb-input:focus, .pb-textarea:focus, .pb-select:focus { outline: 2px solid var(--pb-accent); outline-offset: 1px; }
.pb-textarea { min-height: 6rem; resize: vertical; }
.pb-input--title { font-size: 1.25rem; font-weight: 700; }
.pb-toggle { display: inline-flex; align-items: center; gap: 0.6rem; font-size: 0.9rem; font-weight: 600; color: var(--pb-text); cursor: pointer; }
/* Switch, as in the admin: the checkbox covers the track so it takes the click. */
.pb-switch { position: relative; flex: none; width: 2.5rem; height: 1.5rem; border-radius: 999px; background: #d1d5db; transition: background-color 0.2s ease; }
.dark .pb-switch { background: rgba(255, 255, 255, 0.16); }
.pb-switch input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.pb-switch__knob { position: absolute; top: 0.125rem; left: 0.125rem; width: 1.25rem; height: 1.25rem; border-radius: 999px; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25); pointer-events: none; transition: transform 0.2s ease; }
.pb-switch:has(input:checked) { background: var(--pb-accent); }
.pb-switch input:checked + .pb-switch__knob { transform: translateX(1rem); }
.pb-switch:has(input:focus-visible) { outline: 2px solid var(--pb-accent); outline-offset: 2px; }
.pb-status {
    position: fixed;
    left: 50%;
    bottom: 1.5rem;
    z-index: 150;
    transform: translateX(-50%) translateY(1rem);
    padding: 0.7rem 1.25rem;
    border-radius: 999px;
    background: #111827;
    color: #fff;
    font-size: 0.85rem;
    font-weight: 600;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
}
.pb-status.pb-status--show { opacity: 1; transform: translateX(-50%) translateY(0); }
.pb-status--error { background: #b91c1c; }
body.pb-has-savebar .pb-status { bottom: calc(6rem + env(safe-area-inset-bottom, 0px)); }

/* ---------- Save bar (edit mode): the admin's "Unsaved changes" bar ---------- */
.pb-savebar {
    --pb-accent: #FF6900;
    --pb-accent-hover: #e65e00;
    --pb-surface: #ffffff;
    --pb-border: #e5e7eb;
    --pb-text: #111827;
    --pb-body: #4b5563;
    position: fixed;
    left: 50%;
    bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
    z-index: 145;
    width: min(40rem, calc(100vw - 2rem));
    transform: translateX(-50%) translateY(0.75rem);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
}
.dark .pb-savebar {
    --pb-surface: #161b22;
    --pb-border: rgba(255, 255, 255, 0.1);
    --pb-text: #ffffff;
    --pb-body: #9ca3af;
}
.pb-savebar--show { opacity: 1; transform: translateX(-50%) translateY(0); pointer-events: auto; }
.pb-savebar__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.75rem 0.75rem 0.75rem 1.25rem;
    border: 1px solid var(--pb-border);
    border-radius: 1rem;
    background: var(--pb-surface);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
}
.pb-savebar__label { min-width: 0; color: var(--pb-body); font-size: 0.875rem; }
.pb-savebar__actions { display: flex; flex-shrink: 0; gap: 0.5rem; }
.pb-savebar__btn {
    padding: 0.625rem 1rem;
    border: 0;
    border-radius: 0.75rem;
    background: transparent;
    color: var(--pb-body);
    font: inherit;
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.25rem;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
}
.pb-savebar__btn:hover { color: var(--pb-text); }
.pb-savebar__btn--primary { padding-inline: 1.25rem; background: var(--pb-accent); color: #fff; }
.pb-savebar__btn--primary:hover { background: var(--pb-accent-hover); color: #fff; }
.pb-savebar__btn:focus-visible { outline: 2px solid var(--pb-accent); outline-offset: 2px; }
.pb-savebar__btn:disabled { opacity: 0.6; cursor: default; }
@media (max-width: 480px) {
    .pb-savebar__inner { gap: 0.5rem; padding: 0.5rem 0.5rem 0.5rem 1rem; }
    .pb-savebar__label { white-space: nowrap; }
    .pb-savebar__actions { gap: 0.25rem; }
    .pb-savebar__btn { padding-inline: 0.75rem; }
    .pb-savebar__btn--primary { padding-inline: 1rem; }
}

@media (prefers-reduced-motion: reduce) {
    .pb-card, .pb-tile, .pb-btn, .pb-tab, .pb-progress__bar, .pb-status, .pb-savebar { transition: none; }
    .pb-switch, .pb-switch__knob, .pb-dd__chevron, .pb-edit-inline, .pb-edit-quiet, .pb-edit-reveal { transition: none; }
    .flatpickr-calendar.animate.open { animation: none !important; }
}

/* ---------- Public layout: spotlight, stepper, stage groups ---------- */
.pb-spotlight {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 2rem;
    border: 1px solid var(--pb-border);
    background: var(--pb-surface);
    margin-bottom: 3rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.pb-spotlight:hover { transform: translateY(-4px); box-shadow: 0 20px 25px -5px rgba(229, 231, 235, 0.5); }
.dark .pb-spotlight:hover { box-shadow: 0 20px 25px -5px rgba(255, 255, 255, 0.05); }
@media (min-width: 768px) { .pb-spotlight { flex-direction: row; } }
.pb-spotlight__date {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.15rem;
    padding: 2rem;
    background: var(--pb-accent);
    color: #fff;
    text-align: center;
}
@media (min-width: 768px) { .pb-spotlight__date { flex: 0 0 16rem; padding: 2.5rem 2rem; } }
.pb-spotlight__kicker { font-size: 0.65rem; font-weight: 800; letter-spacing: 0.2em; text-transform: uppercase; color: rgba(255, 255, 255, 0.85); }
.pb-spotlight__day { font-size: 4.5rem; font-weight: 900; line-height: 1; letter-spacing: -0.04em; }
.pb-spotlight__month { font-size: 1rem; font-weight: 700; }
.pb-spotlight__rel { margin-top: 0.75rem; align-self: center; padding: 0.3rem 0.85rem; border-radius: 999px; background: rgba(255, 255, 255, 0.18); font-size: 0.75rem; font-weight: 700; }
.pb-spotlight__body { display: flex; flex-direction: column; gap: 0.85rem; padding: 2rem; flex: 1 1 auto; min-width: 0; }
@media (min-width: 640px) { .pb-spotlight__body { padding: 2.5rem; } }
.pb-spotlight__title { font-size: 1.75rem; font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; color: var(--pb-text); }
@media (min-width: 768px) { .pb-spotlight__title { font-size: 2.25rem; } }
.pb-spotlight__text { font-size: 1rem; line-height: 1.65; color: var(--pb-body); max-width: 46rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.pb-spotlight .pb-card__progress { max-width: 28rem; }
.pb-spotlight__cta { border: 0; background: transparent; padding: 0; cursor: pointer; font: inherit; font-weight: 700; margin-top: 0.5rem; }
.pb-spotlight__cta:hover svg { transform: translateX(4px); }

.pb-steps-wrap { margin-bottom: 3rem; overflow-x: auto; scrollbar-width: none; }
.pb-steps-wrap::-webkit-scrollbar { display: none; }
.pb-steps {
    display: flex;
    align-items: stretch;
    gap: 0;
    list-style: none;
    margin: 0 auto;
    padding: 0.25rem 0;
    width: max-content;
    min-width: 100%;
    justify-content: center;
}
.pb-step { position: relative; display: flex; align-items: center; }
.pb-step + .pb-step::before {
    content: '';
    width: 1.5rem;
    height: 2px;
    background: var(--pb-border);
    flex: 0 0 auto;
}
@media (min-width: 1024px) { .pb-step + .pb-step::before { width: 2.5rem; } }
.pb-step__link {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.5rem 1rem 0.5rem 0.5rem;
    border-radius: 999px;
    border: 1px solid var(--pb-border);
    background: var(--pb-surface);
    color: var(--pb-muted);
    font-size: 0.85rem;
    font-weight: 700;
    white-space: nowrap;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
}
.pb-step--active .pb-step__link { color: var(--pb-text); }
a.pb-step__link:hover { transform: translateY(-2px); box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.08); color: var(--pb-accent); }
.pb-step__count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.9rem;
    height: 1.9rem;
    border-radius: 999px;
    background: var(--pb-track);
    color: var(--pb-muted);
    font-size: 0.75rem;
    font-weight: 800;
}
.pb-step--active .pb-step__count { background: var(--pb-accent); color: #fff; }

.pb-groups { display: flex; flex-direction: column; gap: 3.5rem; }
.pb-group__head { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 1.25rem; scroll-margin-top: 7rem; }
.pb-group { scroll-margin-top: 7rem; }
.pb-group__title { font-size: 1.75rem; font-weight: 700; letter-spacing: -0.02em; color: var(--pb-text); }
.pb-grid { display: grid; grid-template-columns: 1fr; gap: 1.5rem; }
@media (min-width: 768px) { .pb-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1280px) { .pb-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem; } }
.pb-grid .pb-card { padding: 1.75rem; border-radius: 2rem; }

/* ---------- Compact Trello-style board (overrides above card/column rules) ---------- */
.pb-columns { gap: 0.9rem; padding-top: 0.25rem; padding-bottom: 1.5rem; align-items: flex-start; }
.pb-column {
    flex: 0 0 17.5rem;
    max-width: 86vw;
    border-radius: 1rem;
    background: #eceef1;
    padding: 0.55rem;
    max-height: calc(100vh - 11rem);
}
.dark .pb-column { background: rgba(255, 255, 255, 0.05); }
.pb-column__head { padding: 0.35rem 0.5rem 0.6rem; gap: 0.5rem; }
.pb-column__title { font-size: 0.9rem; font-weight: 700; letter-spacing: 0; }
/* Room around the cards so the hover lift, shadow and focus outline are never clipped by the scrolling list. */
.pb-cards { gap: 0.5rem; padding: 0.3rem 0.4rem 0.9rem; margin-inline: -0.3rem; min-height: 2.5rem; max-height: none; overflow-y: auto; }
.pb-column__foot { padding: 0.5rem 0.1rem 0; }
.pb-add-card { padding: 0.55rem 0.75rem; border-radius: 0.6rem; border: 0; justify-content: flex-start; font-size: 0.85rem; font-weight: 600; color: var(--pb-body); }
.pb-add-card:hover { background: rgba(0, 0, 0, 0.05); color: var(--pb-text); border-color: transparent; }
.dark .pb-add-card:hover { background: rgba(255, 255, 255, 0.06); }
.pb-empty { padding: 1rem 0.75rem; border: 1px dashed rgba(0, 0, 0, 0.12); border-radius: 0.6rem; font-size: 0.8rem; }
.dark .pb-empty { border-color: rgba(255, 255, 255, 0.12); }
.pb-card {
    position: relative;
    gap: 0.45rem;
    padding: 0.6rem 0.75rem 0.7rem;
    border-radius: 0.65rem;
    border: 0;
    background: var(--pb-surface);
    box-shadow: 0 1px 1px rgba(9, 30, 66, 0.25);
    overflow: hidden;
    /* Long columns scroll; cards keep their full height instead of squashing. */
    flex-shrink: 0;
}
/* Site card hover: small lift and soft shadow only. Keyboard focus: neutral outline inside the card edge. */
.pb-card:hover { transform: translateY(-2px); box-shadow: 0 10px 15px -3px rgba(209, 213, 219, 0.8), 0 4px 6px -4px rgba(209, 213, 219, 0.8); }
.dark .pb-card:hover { box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -4px rgba(0, 0, 0, 0.3); }
.pb-card:hover .pb-card__title { color: var(--pb-text); }
.pb-card:focus-visible { outline: 2px solid #9ca3af; outline-offset: -2px; }
.dark .pb-card:focus-visible { outline-color: #fff; }
.pb-card__title { font-size: 0.9rem; font-weight: 500; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
/* Series on the left, label dots on the right, on one line above the title. */
.pb-card__top { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.25rem; }
.pb-card__top .pb-card__series { flex: 1 1 auto; min-width: 0; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pb-card__flags { display: flex; flex: none; gap: 0.3rem; margin-left: auto; }
.pb-flag { width: 0.5rem; height: 0.5rem; border-radius: 999px; background: #94a3b8; }
.pb-flag.pb-tone-info { background: #3b82f6; }
.pb-flag.pb-tone-success { background: #22c55e; }
.pb-flag.pb-tone-warning { background: #f59e0b; }
.pb-flag.pb-tone-danger { background: #ef4444; }
.pb-flag--hidden { background: #8b5cf6; }
.pb-card__badges { display: flex; flex-wrap: wrap; align-items: center; gap: 0.3rem; }
.pb-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.15rem 0.1rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--pb-body);
    background: transparent;
}
/* Badges are plain icon + text; only the colour shows done, due soon or released. */
.pb-badge--icon { padding-inline: 0.15rem; }
/* Inter's digits and capitals sit above the middle of the line box; lift the icon to match them. */
.pb-badge:not(.pb-badge--icon) > svg { position: relative; top: -1px; }
.pb-badge--done,
.pb-badge--date[data-pb-due="past"] { color: #15803d; }
.dark .pb-badge--done,
.dark .pb-badge--date[data-pb-due="past"] { color: #4ade80; }
.pb-badge--date[data-pb-due="soon"] { color: #c2410c; }
.dark .pb-badge--date[data-pb-due="soon"] { color: #fb923c; }
.pb-card__bar { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: transparent; }
.pb-card__bar::after { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: var(--pb-pct, 0%); background: var(--pb-accent); transition: width 0.4s ease; }
.pb-hidden .pb-card__bar::after { opacity: 0.5; }
.pb-column.pb-hidden { border: 1px dashed rgba(0, 0, 0, 0.2); }
.pb-placeholder { border-radius: 0.65rem; }
.pb-drop-target .pb-cards { border-radius: 0.65rem; box-shadow: none; }
.pb-drop-target { box-shadow: inset 0 0 0 2px rgba(255, 105, 0, 0.5); }
.pb-modal .pb-card__chips .pb-pill { text-transform: none; letter-spacing: 0; font-size: 0.7rem; }

/* ---------- Rail edges, panning, tighter spacing ---------- */
.pb-columns { padding-top: 0.5rem; padding-bottom: 0.75rem; cursor: default; }
.pb-columns.pb-panning { cursor: grabbing; user-select: none; }
.pb-board::before, .pb-board::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0.75rem;
    width: 4rem;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease;
    z-index: 2;
}
.pb-board::after { right: 0; background: linear-gradient(to left, #f9fafb, rgba(249, 250, 251, 0)); }
.pb-board::before { left: 0; background: linear-gradient(to right, #f9fafb, rgba(249, 250, 251, 0)); }
.dark .pb-board::after { background: linear-gradient(to left, #111820, rgba(17, 24, 32, 0)); }
.dark .pb-board::before { background: linear-gradient(to right, #111820, rgba(17, 24, 32, 0)); }
.pb-board--more-right::after, .pb-board--more-left::before { opacity: 1; }
.pb-card__badges { gap: 0.45rem; }
.pb-badge--icon { padding-inline: 0.1rem; color: var(--pb-muted); }
.pb-cards { min-height: 0.5rem; }

.pb-column { max-height: min(62vh, 30rem); }

/* Admin: dashed tile after the last stage that creates a new one. */
.pb-column-add {
    flex: 0 0 17.5rem;
    max-width: 86vw;
    min-height: 7rem;
    scroll-snap-align: start;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px dashed var(--pb-border);
    border-radius: 1rem;
    background: transparent;
    color: var(--pb-muted);
    cursor: pointer;
    transition: border-color 0.15s ease, color 0.15s ease, background-color 0.15s ease;
}
.pb-column-add:hover, .pb-column-add:focus-visible { border-color: var(--pb-accent); color: var(--pb-accent); background: var(--pb-accent-soft); outline: none; }

/* Popup stage: the panel, plus HRA's thoughts beside it when a card has updates.
   Gaps between the two fall through to the backdrop, so clicking them closes. */
.pb-modal__stagewrap { --pb-panel-width: 42rem; position: relative; width: 100%; max-width: var(--pb-panel-width); display: flex; flex-direction: column; align-items: center; gap: 1.5rem; pointer-events: none; }
.pb-modal__stagewrap--compact { --pb-panel-width: 28rem; }
.pb-modal__stagewrap > * { pointer-events: auto; }
@media (min-width: 1180px) {
    /* Attach the thoughts to the centred popup without affecting its position. */
    .pb-modal__stagewrap--thoughts > .pb-thoughts {
        position: absolute;
        top: 0;
        left: calc(100% + 2rem);
        width: min(23.75rem, calc((100vw - var(--pb-panel-width)) / 2 - 3rem));
    }
}

/* HRA's thoughts: picture with a trail of dots out of its right side (kept
   within the picture's height), then the updates as bubbles, newest first.
   Dot positions are fractions of the picture size so the curve holds at any size. */
.pb-thoughts { --pb-av: 5rem; width: 100%; max-width: 42rem; }
@media (min-width: 1180px) { .pb-thoughts { --pb-av: 8rem; } }
.pb-thoughts[hidden] { display: none; }
/* Narrow screens stack the thoughts above the popup so the latest news comes
   first; older updates wait behind a button. */
/* Narrow screens: the updates live inside the popup (after the description
   and tags) as grey bubbles; the floating thoughts are wide-screen only. */
.pb-detail__updates { margin-top: 1.5rem; }
.pb-detail__updates-head { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.6rem; }
.pb-detail__updates-head img { width: 1.75rem; height: 1.75rem; border-radius: 999px; object-fit: cover; }
.pb-detail__updates .pb-thoughts__list { margin: 0; }
.pb-detail__updates .pb-thought, .pb-detail__updates .pb-thought:not(.pb-thought--latest) { border-color: transparent; background: #f3f4f6; box-shadow: none; filter: none; }
.dark .pb-detail__updates .pb-thought { background: rgba(255, 255, 255, 0.05); }
.pb-detail__updates:not(.pb-detail__updates--all) .pb-thought:not(:first-child) { display: none; }
.pb-detail__updates .pb-thought:focus { outline: none; }
.pb-detail__updates-more { display: inline-flex; align-items: center; gap: 0.3rem; margin-top: 0.5rem; padding: 0.25rem 0; border: 0; background: none; font: inherit; font-size: 0.8125rem; font-weight: 600; color: var(--pb-body); cursor: pointer; }
.pb-detail__updates-more:hover { color: var(--pb-text); }
.pb-detail__updates-more:focus-visible { outline: 2px solid #9ca3af; outline-offset: 2px; border-radius: 0.25rem; }
.pb-stage-hero .pb-detail__updates { width: 100%; text-align: left; }
@media (max-width: 1179px) { .pb-modal__stagewrap--thoughts > .pb-thoughts { display: none; } }
@media (min-width: 1180px) { .pb-detail__updates { display: none; } }
.pb-thoughts__head { position: relative; height: var(--pb-av); }
.pb-thoughts__avatar { display: block; width: var(--pb-av); height: var(--pb-av); border-radius: 999px; object-fit: cover; box-sizing: border-box; border: 6px solid var(--pb-surface); background: var(--pb-surface); box-shadow: 0 20px 36px rgba(0, 0, 0, 0.3), 0 4px 10px rgba(0, 0, 0, 0.12); }
.pb-thoughts__dot { position: absolute; border-radius: 999px; background: var(--pb-surface); }
.pb-thoughts__dot--1 { left: calc(var(--pb-av) * 1.018); top: calc(var(--pb-av) * 0.643); width: calc(var(--pb-av) * 0.143); height: calc(var(--pb-av) * 0.143); box-shadow: 0 8px 16px rgba(0, 0, 0, 0.22), 0 1px 2px rgba(0, 0, 0, 0.1); }
.pb-thoughts__dot--2 { left: calc(var(--pb-av) * 1.193); top: calc(var(--pb-av) * 0.741); width: calc(var(--pb-av) * 0.113); height: calc(var(--pb-av) * 0.113); box-shadow: 0 6px 13px rgba(0, 0, 0, 0.22), 0 1px 2px rgba(0, 0, 0, 0.1); }
.pb-thoughts__dot--3 { left: calc(var(--pb-av) * 1.301); top: calc(var(--pb-av) * 0.872); width: calc(var(--pb-av) * 0.089); height: calc(var(--pb-av) * 0.089); box-shadow: 0 5px 10px rgba(0, 0, 0, 0.22), 0 1px 2px rgba(0, 0, 0, 0.1); }
.pb-thoughts__list { margin: 1.625rem 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 0.625rem; }
.pb-thought { padding: 0.875rem 1.25rem 1rem; border-radius: 1.375rem; border: 1px solid var(--pb-border); background: var(--pb-surface); box-shadow: 0 14px 30px -14px rgba(0, 0, 0, 0.45), 0 1px 2px rgba(0, 0, 0, 0.06); }
/* Each update: a quiet line with who said it and the date (top right),
   then the words, which are the strongest text in the bubble. */
.pb-thought__meta { display: flex; align-items: flex-start; gap: 0.75rem; min-height: 1rem; }
.pb-thought__when { display: inline-flex; align-items: center; gap: 0.35rem; flex: none; margin-left: auto; font-size: 0.8125rem; line-height: 1.125rem; font-weight: 500; color: var(--pb-muted); white-space: nowrap; }
.pb-thought p { margin-top: 0.3rem; font-size: 0.9375rem; line-height: 1.375rem; color: var(--pb-text); white-space: pre-wrap; }
.pb-thought--latest .pb-thought__when { font-weight: 600; color: var(--pb-accent); }
/* Older updates sit back (the backdrop shows through a little) until
   pointed at. A filter, so the entrance animation can keep using opacity. */
.pb-thought:not(.pb-thought--latest) { filter: opacity(0.8); transition: filter 0.2s ease; }
.pb-thought:not(.pb-thought--latest):hover { filter: none; }
/* Whole-pixel dots stay round instead of blurring into ovals. */
@supports (width: round(1.5px, 1px)) {
    .pb-thoughts__dot--1 { left: round(calc(var(--pb-av) * 1.018), 1px); top: round(calc(var(--pb-av) * 0.643), 1px); width: round(calc(var(--pb-av) * 0.143), 1px); height: round(calc(var(--pb-av) * 0.143), 1px); }
    .pb-thoughts__dot--2 { left: round(calc(var(--pb-av) * 1.193), 1px); top: round(calc(var(--pb-av) * 0.741), 1px); width: round(calc(var(--pb-av) * 0.113), 1px); height: round(calc(var(--pb-av) * 0.113), 1px); }
    .pb-thoughts__dot--3 { left: round(calc(var(--pb-av) * 1.301), 1px); top: round(calc(var(--pb-av) * 0.872), 1px); width: round(calc(var(--pb-av) * 0.089), 1px); height: round(calc(var(--pb-av) * 0.089), 1px); }
}
/* Without a speaker line, the date sits beside the first line of text and
   the text wraps before it. */
.pb-thought { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 1rem; }
.pb-thought__meta, .pb-thought--quote p { grid-column: 1 / -1; }
.pb-thought:not(.pb-thought--quote) .pb-thought__meta { display: contents; }
.pb-thought:not(.pb-thought--quote) .pb-thought__when { grid-column: 2; grid-row: 1; align-self: start; margin-top: 0.125rem; }
.pb-thought:not(.pb-thought--quote) p { grid-column: 1; grid-row: 1; margin-top: 0; }

/* Keep the popup's scroll area vertical. */
.pb-modal { overflow-x: hidden; }

/* Released audio popup: artwork with the title over a dark fade, the voice
   cast, then Listen now and Details. */
.pb-modal__panel--release .pb-modal__body { padding: 0; }
.pb-release__art { position: relative; aspect-ratio: 1 / 1; overflow: hidden; background: #f3f4f6; }
.dark .pb-release__art { background: rgba(255, 255, 255, 0.05); }
.pb-release__art img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center 20%; }
.pb-release__art::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(to top, #fff 20%, rgba(255, 255, 255, 0.9) 45%, transparent 85%); }
.dark .pb-release__art::after { background: linear-gradient(to top, #161b22 20%, rgba(22, 27, 34, 0.9) 45%, transparent 85%); }
/* Same fade as the membership popup: the artwork melts into the popup. */
@media (min-width: 640px) {
    .pb-release__art::after { background: linear-gradient(to top, #fff 5%, rgba(255, 255, 255, 0.7) 32%, transparent 72%); }
    .dark .pb-release__art::after { background: linear-gradient(to top, #161b22 5%, rgba(22, 27, 34, 0.7) 32%, transparent 72%); }
}
.pb-release__art--empty { aspect-ratio: 16 / 9; background: linear-gradient(135deg, #ff6900, #9a3412); }
.pb-release__caption { position: absolute; inset-inline: 0; bottom: 0; z-index: 1; padding: 0 2rem 1.5rem; }
.pb-release__eyebrow { margin: 0 0 0.5rem; font-size: 0.75rem; line-height: 1rem; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; color: #ea580c; }
.dark .pb-release__eyebrow { color: #fb923c; }
.pb-release__date { color: #6b7280; letter-spacing: 0.06em; }
.dark .pb-release__date { color: #9ca3af; }
.pb-release__date::before { content: ''; display: inline-block; width: 4px; height: 4px; margin: 0 0.5rem; border-radius: 999px; background: currentColor; vertical-align: middle; }
.pb-release__title { margin: 0; font-size: 1.5rem; line-height: 1.2; font-weight: 700; color: #111827; overflow-wrap: anywhere; }
.dark .pb-release__title { color: #fff; }
.pb-release__body { position: relative; display: flex; flex-direction: column; gap: 1.25rem; margin-top: -1px; padding: 0.75rem 2rem 2rem; background: #fff; }
.dark .pb-release__body { background: #161b22; }
.pb-release__label { margin: 0 0 0.5rem; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: #6b7280; }
.dark .pb-release__label { color: #9ca3af; }
.pb-release__people { display: flex; align-items: center; gap: 0.75rem; }
.pb-release__faces { display: flex; flex: none; }
.pb-release__faces > * { width: 2.25rem; height: 2.25rem; margin-left: -0.5rem; border-radius: 999px; object-fit: cover; box-shadow: 0 0 0 3px #fff; }
.pb-release__faces > :first-child { margin-left: 0; }
.dark .pb-release__faces > * { box-shadow: 0 0 0 3px #161b22; }
.pb-release__initial { display: flex; align-items: center; justify-content: center; background: #f3f4f6; color: #4b5563; font-size: 0.85rem; font-weight: 700; }
.dark .pb-release__initial { background: rgba(255,255,255,0.08); color: #d1d5db; }
.pb-release__names { margin: 0; font-size: 0.875rem; line-height: 1.35; color: #4b5563; }
.dark .pb-release__names { color: #d1d5db; }
.pb-release__names strong { font-weight: 600; color: #111827; }
.dark .pb-release__names strong { color: #fff; }
.pb-release__actions { display: flex; gap: 0.75rem; }
.pb-release__listen { display: flex; flex: 1 1 auto; align-items: center; justify-content: center; gap: 0.5rem; border-radius: 1rem; background: #ff6900; padding: 1rem 1.5rem; font-weight: 700; color: #fff; box-shadow: 0 10px 15px -3px rgba(249,115,22,0.25); transition: background-color 0.2s ease; }
.pb-release__listen:hover { background: #e85f00; }
.pb-release__details { flex: none; border-radius: 1rem; background: #f3f4f6; padding: 1rem 1.25rem; font-weight: 700; color: #111827; cursor: pointer; transition: background-color 0.2s ease; }
.pb-release__details:hover { background: #e5e7eb; }
.dark .pb-release__details { background: rgba(255,255,255,0.08); color: #fff; }
.dark .pb-release__details:hover { background: rgba(255,255,255,0.14); }
.pb-release__listen:focus-visible, .pb-release__details:focus-visible { outline: 2px solid #ff6900; outline-offset: 2px; }
@media (max-width: 479px) {
    .pb-release__caption { padding: 0 1.5rem 1.25rem; }
    .pb-release__body { padding: 1.25rem 1.5rem 1.5rem; }
    .pb-release__title { font-size: 1.3rem; }
}

/* The released popup's content while it fades out over the reshaping panel. */
.pb-morph-ghost { position: absolute; top: 0; left: 50%; z-index: 10; transform: translateX(-50%); pointer-events: none; }

/* Cards still being scripted with nothing more to show don't open. */
.pb-card.pb-card--static { cursor: default; }
.pb-card.pb-card--static:hover, .dark .pb-card.pb-card--static:hover { transform: none; box-shadow: 0 1px 1px rgba(9, 30, 66, 0.25); }
.pb-badge--started { font-weight: 500; color: #6b7280; }
.dark .pb-badge--started { color: #9ca3af; }

/* Standard editing steps as tiles beside the cast: green when done, an
   orange ring on the step that's up next. */
.pb-edit-steps .pb-cast__initial svg { width: 1.15rem; height: 1.15rem; }
.pb-edit-steps .pb-done .pb-cast__initial { background: #dcfce7; color: #15803d; }
.dark .pb-edit-steps .pb-done .pb-cast__initial { background: rgba(34, 197, 94, 0.15); color: #4ade80; }
.pb-edit-steps .pb-next .pb-cast__initial { background: #fff7ed; color: #ea580c; box-shadow: 0 0 0 2px #ff6900; }
.dark .pb-edit-steps .pb-next .pb-cast__initial { background: rgba(255, 105, 0, 0.12); color: #fb923c; }
.pb-edit-steps .pb-done .pb-step__status { color: #15803d; font-weight: 600; }
.dark .pb-edit-steps .pb-done .pb-step__status { color: #4ade80; }
.pb-edit-steps .pb-next .pb-step__status { color: #ea580c; font-weight: 600; }
.dark .pb-edit-steps .pb-next .pb-step__status { color: #fb923c; }
/* On hold or paused: the next step waits in grey instead of orange. */
.pb-edit-steps .pb-next.pb-held .pb-cast__initial { background: #f3f4f6; color: #6b7280; box-shadow: 0 0 0 2px #9ca3af; }
.dark .pb-edit-steps .pb-next.pb-held .pb-cast__initial { background: rgba(255, 255, 255, 0.06); color: #9ca3af; box-shadow: 0 0 0 2px #6b7280; }
.pb-edit-steps .pb-next.pb-held .pb-step__status, .dark .pb-edit-steps .pb-next.pb-held .pb-step__status { color: var(--pb-body); }

/* A voice actor whose lines need re-recording: amber ring and status, and
   the list header counts the retakes. */
.pb-cast__tile.pb-retake .pb-cast__inner { border-color: #fcd34d; }
.dark .pb-cast__tile.pb-retake .pb-cast__inner { border-color: rgba(245, 158, 11, 0.45); }
.pb-cast__tile.pb-retake .pb-cast__photo { box-shadow: 0 0 0 2px #f59e0b; }
.pb-cast__retake { font-weight: 600; color: #b45309; }
.dark .pb-cast__retake { color: #fbbf24; }
.pb-detail__list-head.pb-retake .pb-detail__list-count { font-weight: 600; color: #b45309; }
.dark .pb-detail__list-head.pb-retake .pb-detail__list-count { color: #fbbf24; }

/* A list that hasn't started folds to one line: its name, "Not started"
   and a chevron that opens it. */
/* Folded list row: on hover its circle, words and chevron darken. */
.pb-detail__list-toggle { width: 100%; border: 0; background: none; font: inherit; text-align: left; cursor: pointer; }
.pb-detail__list-toggle:focus-visible { outline: 2px solid #9ca3af; outline-offset: 2px; border-radius: 0.5rem; }
.pb-detail__list-toggle > svg:first-child, .pb-detail__list-toggle .pb-detail__list-count { transition: color 0.2s ease; }
.pb-detail__list-toggle:hover > svg:first-child, .pb-detail__list-toggle:hover .pb-detail__list-count { color: var(--pb-body); }
.pb-detail__chevron { flex: none; color: var(--pb-muted); transition: transform 0.25s ease, color 0.2s ease; }
.pb-detail__list-toggle:hover .pb-detail__chevron { color: var(--pb-text); }
.pb-detail__list--open .pb-detail__chevron { transform: rotate(180deg); }
.pb-detail__list--waiting .pb-detail__list-body { padding-bottom: 0.25rem; }

/* An update quoting someone: their picture, name and role above the words. */
.pb-thought__who { display: flex; align-items: center; gap: 0.5rem; min-width: 0; }
.pb-thought__who img { width: 2.125rem; height: 2.125rem; flex: none; border-radius: 999px; object-fit: cover; }
.pb-thought__id { min-width: 0; }
.pb-thought__id b { display: block; font-size: 0.8125rem; line-height: 1.125rem; font-weight: 600; color: var(--pb-body); }
.pb-thought__id span { display: block; overflow: hidden; font-size: 0.75rem; line-height: 1rem; color: var(--pb-muted); white-space: nowrap; text-overflow: ellipsis; }
.pb-thought--quote p { margin-top: 0.45rem; }

/* ------------------------------------------------------------------ */
/* Character polls (below the board)                                   */
/* ------------------------------------------------------------------ */
.pb-polls { padding: 5rem 1rem 6rem; background: #fff; }
.dark .pb-polls { background: #0F141B; }
.pb-polls__inner { max-width: 82rem; margin: 0 auto; }
.pb-polls__head { margin-bottom: 2.5rem; text-align: center; }
/* The invitation band and the latest winners are what fans see. */
.pb-polls-band { display: flex; align-items: center; justify-content: space-between; gap: 2rem; min-height: 16rem; padding: 3.5rem 2.25rem; border-radius: 1.5rem; background: linear-gradient(135deg, rgba(255, 105, 0, 0.88), rgba(255, 138, 61, 0.7)), url('../assets/website/polls-band-bg.png') center / cover no-repeat, #FF6900; color: #fff; }
.pb-polls-band__pill { display: inline-flex; align-items: center; gap: 0.45rem; margin-bottom: 0.6rem; padding: 0.25rem 0.7rem; border-radius: 999px; background: rgba(255, 255, 255, 0.2); font-size: 0.75rem; line-height: 1rem; font-weight: 700; }
.pb-polls-band__dot { width: 0.45rem; height: 0.45rem; border-radius: 999px; background: #fff; }
.pb-polls-band__title { font-size: 2.25rem; line-height: 2.5rem; font-weight: 800; }
.pb-polls-band__text { margin-top: 0.5rem; font-size: 1.25rem; line-height: 1.75rem; color: rgba(255, 255, 255, 0.9); }
.pb-polls-band__cta { display: inline-flex; flex: none; align-items: center; justify-content: center; gap: 0.5rem; height: 3rem; padding: 0 1.5rem; border-radius: 999px; background: #fff; font-size: 0.95rem; font-weight: 700; color: #c2410c; white-space: nowrap; transition: background-color 0.2s ease; }
.pb-polls-band__cta:hover { background: #fff7ed; }
.pb-polls-band__cta:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.pb-polls__sub { display: flex; align-items: center; gap: 1rem; margin: 2.5rem 0 0.9rem; font-size: 0.75rem; line-height: 1rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--pb-muted); }
.pb-polls__sub::after { content: ''; flex: 1; height: 1px; background: var(--pb-border); }
.pb-winners { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.pb-winner { display: flex; flex-direction: column; overflow: hidden; padding: 1.25rem; border: 1px solid var(--pb-border); border-radius: 1rem; background: var(--pb-surface); }
.pb-winner--link, .pb-root[data-can-edit="1"] .pb-winner { cursor: pointer; transition: transform 0.3s ease, box-shadow 0.3s ease; }
.pb-winner--link:hover, .pb-root[data-can-edit="1"] .pb-winner:hover { transform: translateY(-4px); box-shadow: 0 20px 25px -5px rgba(229, 231, 235, 0.5); }
.dark .pb-winner--link:hover, .dark .pb-root[data-can-edit="1"] .pb-winner:hover { box-shadow: 0 20px 25px -5px rgba(255, 255, 255, 0.05); }
@media (prefers-reduced-motion: reduce) { .pb-winner--link:hover, .pb-root[data-can-edit="1"] .pb-winner:hover { transform: none; } }
/* A poll with a Patreon link: its name is a link stretched over the whole card. */
.pb-winner--link { position: relative; }
.pb-winner__link { color: inherit; text-decoration: none; }
.pb-winner__link::after { content: ""; position: absolute; inset: 0; border-radius: 1rem; }
.pb-winner__link:focus-visible { outline: none; }
.pb-winner--link:has(.pb-winner__link:focus-visible) { outline: 2px solid #9ca3af; outline-offset: 2px; }
.pb-winner__when { display: flex; align-items: center; gap: 0.45rem; margin: -1.25rem -1.25rem 0; padding: 0.65rem 1.25rem; border-bottom: 1px solid var(--pb-border); background: #f9fafb; font-size: 0.7rem; line-height: 1rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--pb-muted); }
.dark .pb-winner__when { background: rgba(255, 255, 255, 0.04); }
.pb-winner__when { display: flex; align-items: flex-start; justify-content: space-between; gap: 0.75rem; }
/* Results cards (magazine rows): big rank numerals, series under the name, votes on the right, no bars. */
.pb-winner .pb-poll__list { gap: 0; }
.pb-winner .pb-poll__row { grid-template-columns: 2.4rem minmax(0, 1fr) auto; align-items: center; column-gap: 0.6rem; row-gap: 0; padding: 0.6rem 0; border-bottom: 1px solid var(--pb-track); }
.pb-winner .pb-poll__row:last-child { border-bottom: 0; }
.pb-winner .pb-poll__rank { font-size: 1.5rem; line-height: 1; font-weight: 800; color: #d1d5db; text-align: left; }
.pb-winner .pb-poll__row--lead .pb-poll__rank { color: #FF6900; }
.dark .pb-winner .pb-poll__rank { color: #4b5563; }
.dark .pb-winner .pb-poll__row--lead .pb-poll__rank { color: #fb923c; }
.pb-winner .pb-poll__name { white-space: normal; font-size: 0.9rem; font-weight: 600; line-height: 1.25rem; }
.pb-winner .pb-poll__name small { display: block; order: 0; margin-top: 0.125rem; font-size: 0.72rem; line-height: 1rem; font-weight: 400; }
.pb-winner .pb-poll__votes { font-size: 1.05rem; font-weight: 700; }
.pb-winner .pb-poll__bar { display: none; }
.pb-winner__desc { min-width: 0; margin: -0.6rem 0 1rem; font-size: 0.8rem; line-height: 1.25rem; font-weight: 400; letter-spacing: normal; text-transform: none; color: var(--pb-body); white-space: pre-line; }
.pb-winner__when .pb-poll__status { flex: none; text-transform: none; letter-spacing: normal; }
.pb-winner__who { display: flex; align-items: center; gap: 0.75rem; margin-top: 1.1rem; }
.pb-winner__who > div { min-width: 0; }
.pb-winner__trophy { display: grid; flex: none; place-items: center; width: 2.25rem; height: 2.25rem; border-radius: 999px; background: rgba(255, 105, 0, 0.1); color: #FF6900; }
.pb-winner__who small { display: block; font-size: 0.75rem; line-height: 1rem; color: var(--pb-muted); }
.pb-winner__who b { display: block; font-size: 0.95rem; line-height: 1.25rem; font-weight: 600; color: var(--pb-text); }
.pb-winner__foot { margin-top: 1rem; padding-top: 0.9rem; border-top: 1px solid var(--pb-border); }
/* Editors' New poll tile: the board's New stage tile (.pb-column-add), sized as a poll card. */
.pb-winner-add { max-width: none; min-height: 12rem; }
@media (max-width: 900px) { .pb-winners { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 640px) {
    .pb-polls-band { flex-direction: column; align-items: flex-start; gap: 1.5rem; padding: 1.5rem; }
    .pb-polls-band__title { font-size: 1.6rem; line-height: 2rem; }
    .pb-polls-band__text { margin-top: 0.35rem; font-size: 1rem; line-height: 1.5rem; }
    .pb-polls-band__cta { width: 100%; }
}
@media (max-width: 640px) {
    .pb-polls { padding: 4rem 1rem 4.5rem; }
}
.pb-poll { display: flex; flex-direction: column; padding: 1.15rem 1.25rem; border: 1px solid var(--pb-border); border-radius: 1rem; background: var(--pb-surface); box-shadow: 0 1px 2px rgba(17, 24, 39, 0.06); cursor: pointer; transition: background-color 0.2s ease; }
.pb-poll:hover { background: #fafafa; }
.dark .pb-poll { box-shadow: none; }
.dark .pb-poll:hover { background: rgba(255, 255, 255, 0.06); }
.pb-poll__tag { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; font-size: 0.7rem; line-height: 1rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--pb-muted); }
.pb-poll__tag .pb-pill { margin-left: auto; letter-spacing: normal; text-transform: none; }
.pb-poll__tag--open { color: #ea580c; }
.dark .pb-poll__tag--open { color: #fb923c; }
.pb-poll__dot { width: 0.45rem; height: 0.45rem; border-radius: 999px; background: currentColor; }
.pb-poll__title { margin: 0.35rem 0 1rem; font-size: 1rem; line-height: 1.35rem; font-weight: 600; color: var(--pb-text); }
.pb-poll__list { display: flex; flex-direction: column; gap: 0.6rem; margin: 0 0 1rem; padding: 0; list-style: none; }
.pb-poll__row { display: grid; grid-template-columns: 1rem minmax(0, 1fr) auto; align-items: end; column-gap: 0.6rem; row-gap: 0.3rem; }
.pb-poll__rank { font-size: 0.8rem; line-height: 1.25rem; font-weight: 700; color: var(--pb-muted); text-align: center; }
.pb-poll__name { min-width: 0; overflow: hidden; font-size: 0.85rem; line-height: 1.25rem; font-weight: 500; color: var(--pb-text); white-space: nowrap; text-overflow: ellipsis; }
.pb-poll__name small { display: block; overflow: hidden; font-size: 0.7rem; line-height: 1rem; font-weight: 400; color: var(--pb-muted); text-overflow: ellipsis; }
.pb-poll__votes { font-size: 0.8rem; line-height: 1.25rem; font-weight: 600; color: var(--pb-text); font-variant-numeric: tabular-nums; }
.pb-poll__bar { grid-column: 2 / 4; height: 0.35rem; overflow: hidden; border-radius: 999px; background: #f3f4f6; }
.dark .pb-poll__bar { background: rgba(255, 255, 255, 0.06); }
.pb-poll__bar > span { display: block; height: 100%; border-radius: 999px; background: #fdba74; }
.dark .pb-poll__bar > span { background: rgba(251, 146, 60, 0.55); }
.pb-poll__row--lead .pb-poll__rank { color: #FF6900; }
.pb-poll__row--lead .pb-poll__bar > span { background: #FF6900; }
.pb-poll__foot { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; min-height: 2.5rem; margin-top: auto; padding-top: 0.85rem; border-top: 1px solid var(--pb-border); }
.pb-poll__meta { font-size: 0.8rem; line-height: 1.25rem; color: var(--pb-body); }
.pb-poll__meta b { font-weight: 600; color: var(--pb-text); }
.pb-poll__more { display: inline-flex; flex: none; align-items: center; gap: 0.25rem; padding: 0.25rem 0; border: 0; background: none; font: inherit; font-size: 0.8rem; font-weight: 600; color: var(--pb-body); cursor: pointer; transition: color 0.2s ease; }
.pb-poll__more:hover, .pb-poll:hover .pb-poll__more { color: var(--pb-text); }
.pb-poll__more:focus-visible { outline: 2px solid #9ca3af; outline-offset: 2px; border-radius: 0.25rem; }
.pb-poll__status { display: inline-flex; align-items: center; gap: 0.35rem; height: 1.5rem; padding: 0 0.65rem; border-radius: 999px; background: #f3f4f6; font-size: 0.72rem; font-weight: 700; color: #374151; white-space: nowrap; }
.dark .pb-poll__status { background: rgba(255, 255, 255, 0.07); color: #e5e7eb; }
.pb-poll__status--out { background: rgba(251, 146, 60, 0.14); color: #c2410c; }
.dark .pb-poll__status--out { background: rgba(251, 146, 60, 0.16); color: #fb923c; }
/* The results popup lists every choice. */
[data-pb-modal-body] > .pb-poll__tag { margin-bottom: 0.625rem; }
.pb-poll-detail__meta { margin: 0.25rem 0 1.5rem; font-size: 0.875rem; line-height: 1.25rem; color: var(--pb-body); }
.pb-poll-detail__meta b { font-weight: 600; color: var(--pb-text); }
.pb-poll__list--all { gap: 0.9rem; margin-bottom: 0; }
.pb-poll-detail__foot { align-items: center; }
/* Poll editor: built from the audio editor's form parts. Choices are inline
   rows like checklist steps: rank, character, series, votes, remove on hover. */
.pb-form-choice__rank { flex: none; width: 1.25rem; margin-left: 0.25rem; font-size: 0.75rem; line-height: 1rem; font-weight: 700; color: var(--f-muted); text-align: center; font-variant-numeric: tabular-nums; }
.pb-form-choice:first-child .pb-form-choice__rank { color: var(--f-accent); }
.pb-form-version.pb-form-choice .pb-form-inline--name { flex: 1 1 0; min-width: 0; width: auto; margin-left: 0; }
.pb-form-version.pb-form-choice .pb-form-choice__series { display: block; flex: 0 1 10rem; min-width: 0; }
.pb-form-choice__series .pb-form-inline { color: var(--f-hint); }
.pb-form-version.pb-form-choice .pb-form-choice__votes { flex: 0 0 5.5rem; padding-inline: 0.625rem; text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
/* Votes are typed; no browser up/down arrows. */
.pb-form-choice__votes { appearance: textfield; -moz-appearance: textfield; }
.pb-form-choice__votes::-webkit-inner-spin-button, .pb-form-choice__votes::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.pb-form-card__rows--flush { border-top: 0; border-radius: inherit; overflow: hidden; }
/* Archive sits on the left of the footer and turns red on hover, like the editor's remove buttons. */
.pb-form-foot .pb-form-btn--danger { margin-right: auto; }
.pb-form-foot .pb-form-btn--danger:hover, .pb-form-foot .pb-form-btn--danger:focus-visible { border-color: var(--f-red); background: var(--f-red-soft); color: var(--f-red); outline: none; }
@media (max-width: 640px) {
    .pb-form-choice { flex-wrap: wrap; }
    /* Series drops to its own line, its box lined up under the character's. */
    .pb-form-version.pb-form-choice .pb-form-choice__series { flex: 1 0 calc(100% - 2.125rem); order: 5; margin-left: 2.125rem; }
    /* Phones use 16px text in fields, so votes get a little more room. */
    .pb-form-version.pb-form-choice .pb-form-choice__votes { flex-basis: 6.25rem; }
}

/* ---------- Editor: the fan popup, editable in place ---------- */
/* clip (not hidden) so the action bar can stick to the bottom while scrolling. */

.pb-edit-inline {
    display: block;
    width: calc(100% + 0.75rem);
    margin: 0 -0.375rem;
    padding: 0.125rem 0.375rem;
    border: 0;
    border-radius: 0.5rem;
    background: transparent;
    color: inherit;
    font: inherit;
    line-height: inherit;
    letter-spacing: inherit;
    resize: none;
    transition: background-color 0.15s ease, box-shadow 0.15s ease;
}
.pb-edit-inline::placeholder { color: var(--pb-muted); opacity: 1; }
.pb-edit-inline:hover { background: var(--pb-track); }
.pb-edit-inline:focus { outline: none; background: var(--pb-surface); box-shadow: 0 0 0 2px var(--pb-accent); }
textarea.pb-edit-grow { overflow: hidden; field-sizing: content; min-height: 0; }

/* Quiet dropdowns: read as text until pointed at. */
.pb-edit-quiet {
    appearance: none;
    min-width: 0;
    max-width: 100%;
    padding: 0.125rem 1.5rem 0.125rem 0.5rem;
    border: 0;
    border-radius: 0.5rem;
    background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 0.4rem center / 0.75rem;
    color: var(--pb-body);
    font: inherit;
    font-size: 0.8125rem;
    font-weight: 600;
    text-overflow: ellipsis;
    cursor: pointer;
    transition: background-color 0.15s ease;
}
.pb-edit-quiet:hover { background-color: var(--pb-track); }
.pb-edit-quiet:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--pb-accent); }

/* Chips: labels and Hidden switch on and off; series and date edit in place. */

/* Row buttons (remove) show on hover or focus; always on touch screens. */
.pb-edit-reveal { opacity: 0; transition: opacity 0.15s ease; }
.pb-edit-reveal:focus-visible { opacity: 1; }
@media (hover: none) { .pb-edit-reveal { opacity: 1; } }

/* Versions: tiles as fans see them; the icon marks one done. */

/* Updates: bubbles you write in, a dashed one on top for the next update. */
.pb-edit-updates .pb-thoughts__list { gap: 0.5rem; }
.pb-thought.pb-edit-thought { display: flex; flex-direction: column; gap: 0.25rem; padding: 0.625rem 0.75rem 0.75rem 1.125rem; }
.pb-edit-thought__meta { display: flex; align-items: center; gap: 0.375rem; min-height: 1.875rem; font-size: 0.8125rem; color: var(--pb-muted); }
.pb-edit-thought__meta .pb-edit-quiet { margin-left: -0.5rem; }
.pb-edit-thought__meta time { margin-left: auto; font-weight: 500; white-space: nowrap; }
.pb-edit-thought__meta time:empty { display: none; }
.pb-edit-thought__text { font-size: 0.9375rem; line-height: 1.375rem; color: var(--pb-text); }
.pb-edit-updates .pb-thought.pb-edit-thought--new { background: transparent; border: 1px dashed #d1d5db; padding-top: 0.75rem; transition: border-color 0.15s ease; }
.dark .pb-edit-updates .pb-thought.pb-edit-thought--new { background: transparent; border-color: rgba(255, 255, 255, 0.16); }
.pb-edit-updates .pb-thought.pb-edit-thought--new:focus-within { border-style: solid; border-color: var(--pb-accent); }
.pb-edit-thought--new .pb-edit-inline:focus { box-shadow: none; background: transparent; }
.pb-edit-thought--new .pb-edit-thought__meta span { padding-left: 0.375rem; }
.pb-edit-thought--new .pb-edit-thought__meta .pb-edit-quiet { margin-left: 0; }

/* Progress: set by hand only when there are no steps. */


/* Checklists: the fan list, each step ticked, renamed or given a voice actor. */

.pb-detail__updates.pb-edit-updates { display: block; }

/* More details: a short settings list. */

/* Save bar stays in reach on long cards. */

/* Phones: Archive shrinks to its icon so the bar stays on one line. */

/* Edit Mode bar (46px, fixed on top): popups open below it instead of under it. */
body:has(#cms-edit-banner) :is([data-pb-modal], [data-pb-confirm]) { top: 46px; }

/* ---------- Editor, lower half: the fan popup's tiles and thoughts ---------- */
/* Beside the popup (wide screens): bubbles as fans see them, still editable. */
.pb-edit-updates--beside .pb-detail__updates-head { display: none; }
.pb-edit-updates--beside .pb-thoughts__list { margin-top: 1.625rem; }
.pb-edit-updates .pb-thought { filter: none; }
.pb-edit-updates--beside .pb-thought.pb-edit-thought--new { background: var(--pb-surface); }

/* Checklist tiles: click to tick; the pencil edits the step. */

/* Plain steps: the fan list, the circle ticks. */

/* The step panel opens under its tile, across the grid. */

/* More details: folded like a list nobody has started. */

/* ---------- Dropdowns: the popups' choices, styled like the stage menu ---------- */
/* The real select stays for the form; the button after it is what people use. */
.pb-dd__native { position: absolute; width: 1px; height: 1px; margin: 0; padding: 0; border: 0; opacity: 0; pointer-events: none; overflow: hidden; }
.pb-dd__trigger { display: inline-flex; align-items: center; gap: 0.25rem; text-align: left; white-space: nowrap; }
.pb-edit-quiet.pb-dd__trigger { background-image: none; padding-right: 0.375rem; }
.pb-edit-quiet.pb-dd__trigger[aria-expanded="true"] { background-color: var(--pb-track); }
.pb-dd__value { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.pb-dd__chevron { flex: none; width: 0.875rem; height: 0.875rem; color: var(--pb-muted); transition: transform 0.2s ease; }
.pb-dd__trigger[aria-expanded="true"] .pb-dd__chevron { transform: rotate(180deg); }

.pb-select.pb-dd__trigger { display: flex; justify-content: space-between; gap: 0.5rem; cursor: pointer; transition: border-color 0.15s ease; }
.pb-select.pb-dd__trigger:hover { border-color: var(--pb-muted); }
.pb-select.pb-dd__trigger:focus { outline: none; }
.pb-select.pb-dd__trigger:focus-visible, .pb-select.pb-dd__trigger[aria-expanded="true"] { outline: 2px solid var(--pb-accent); outline-offset: 1px; }
.pb-dd__menu { z-index: 140; gap: 0.25rem; }
.pb-dd__list { display: flex; flex-direction: column; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--pb-border) transparent; }
.pb-dd__list:focus { outline: none; }
.pb-dd__group { display: flex; flex-direction: column; }
.pb-dd__group[hidden], .pb-dd__option[hidden] { display: none; }
.pb-dd__group-label { padding: 0.55rem 0.75rem 0.25rem; font-size: 0.65rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--pb-muted); }
.pb-dd__option { flex: none; justify-content: space-between; }
.pb-dd__option > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pb-dd__option .pb-dd__check { flex: none; color: var(--pb-accent); opacity: 0; }
.pb-dd__option[aria-selected="true"] { color: var(--pb-accent); }
.pb-dd__option[aria-selected="true"] .pb-dd__check { opacity: 1; }
/* People pickers: a round picture (or initial) before each name. */
.pb-dd__option > .pb-dd__person { display: flex; align-items: center; gap: 0.6rem; }
.pb-dd__person > [data-pb-dd-name] { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.pb-dd__avatar { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 1.5rem; height: 1.5rem; border-radius: 999px; object-fit: cover; overflow: hidden; background: var(--pb-track); color: var(--pb-muted); font-size: 0.7rem; line-height: 1; font-weight: 700; user-select: none; }
span.pb-dd__avatar::before { content: attr(data-pb-initial); }
.pb-dd__trigger--avatars .pb-dd__value { display: inline-flex; align-items: center; gap: 0.4rem; }
.pb-dd__trigger--avatars .pb-dd__value span { padding-left: 0; }
.pb-dd__trigger--avatars .pb-dd__avatar { width: 1.25rem; height: 1.25rem; font-size: 0.6rem; }
.pb-dd__option:focus { outline: none; background: var(--pb-track); }
.pb-dd__search { padding: 0.15rem 0.15rem 0.2rem; }
.pb-dd__search .pb-input { padding: 0.5rem 0.75rem; border-radius: 0.7rem; font-size: 0.85rem; }
.pb-dd__empty { padding: 0.6rem 0.75rem; font-size: 0.85rem; color: var(--pb-muted); }
.pb-dd__empty[hidden] { display: none; }

/* Poll votes: a plain number, no spinner arrows. */
.pb-poll-edit__row [data-pb-poll-votes] { -moz-appearance: textfield; appearance: textfield; }
.pb-poll-edit__row [data-pb-poll-votes]::-webkit-inner-spin-button, .pb-poll-edit__row [data-pb-poll-votes]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }

/* ---------- Dates: the admin's calendar, in the board's colours ---------- */
.flatpickr-calendar { --t-accent: #FF6900; --t-bg: #ffedd5; }
html.dark .flatpickr-calendar { --t-bg: rgba(255, 105, 0, 0.12); background: #161b22 !important; border-color: rgba(255, 255, 255, 0.1) !important; box-shadow: 0 16px 40px -12px rgba(0, 0, 0, 0.7) !important; }
html.dark .flatpickr-current-month .flatpickr-monthDropdown-months { background: #161b22 !important; }
.pb-date-input { cursor: pointer; }

/* ---------- Editor: anything you can change shows an outline and a pencil on hover ---------- */
/* The pencil sits in space each field keeps on its right, so hovering never moves text. */
.pb-edit-updates .pb-edit-inline:not(.pb-edit-thought--new *) {
    padding-right: 1.5rem;
    background-repeat: no-repeat;
    background-position: right 0.45rem center;
    background-size: 0.8rem;
    cursor: text;
}
.pb-edit-updates textarea.pb-edit-inline:not(.pb-edit-thought--new *) { background-position: right 0.45rem top 0.55em; }
.pb-edit-updates .pb-edit-inline:not(.pb-edit-thought--new *):hover {
    background-color: var(--pb-track);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M17 3a2.85 2.85 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5Z'/%3E%3C/svg%3E");
    box-shadow: inset 0 0 0 1px var(--pb-border);
}
.dark .pb-edit-updates .pb-edit-inline:not(.pb-edit-thought--new *):hover { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12); }
.pb-edit-updates .pb-edit-inline:focus { background-image: none; }
/* Dropdowns, chips and the percentage get the same outline; their own arrow or icon stands in for the pencil. */
.pb-dd__trigger.pb-edit-quiet:hover { box-shadow: inset 0 0 0 1px var(--pb-border); }

.dark .pb-dd__trigger.pb-edit-quiet:hover { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12); }
/* Fields hug their text, so the hover outline fits the words. The new
   update stays a full-width box. */
@supports (field-sizing: content) {
    .pb-edit-updates .pb-edit-inline:not(.pb-edit-thought--new *) {
        field-sizing: content;
        width: auto;
        min-width: 3rem;
        max-width: calc(100% + 0.75rem);
    }
    
    
}

/* ---------- Editor: the admin's post editor, measured ---------- */
/* Values match ADMIN_CORE posts/edit.php as rendered by its tailwind.output.css
   (HRA theme). Token names say which admin colour each one stands for. */
.pb-form-shell {
    --f-text: #101828;          /* gray-900 */
    --f-strong: #1e2939;        /* gray-800 */
    --f-label: #364153;         /* gray-700 */
    --f-hint: #6a7282;          /* gray-500 */
    --f-muted: #99a1af;         /* gray-400 */
    --f-faint: #d1d5dc;         /* gray-300 */
    --f-border: #e5e7eb;        /* gray-200 */
    --f-line: #f3f4f6;          /* gray-100 */
    --f-soft: #f9fafb;          /* gray-50 */
    --f-surface: #ffffff;
    --f-card: rgba(255, 255, 255, 0.8);
    --f-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
    --f-accent: #ff6900;        /* orange-500 */
    --f-accent-text: #f54900;   /* orange-600 */
    --f-accent-soft: #fff7ed;   /* orange-50 */
    --f-accent-tint: #ffedd5;   /* orange-100 */
    --f-ring: rgba(255, 105, 0, 0.2);
    --f-chip-bg: #fff7ed;       /* --t-bg */
    --f-chip-text: #ea580c;     /* --t-text */
    --f-green: #00a63e;
    --f-red: #fb2c36;
    --f-red-soft: #fef2f2;
    display: flex;
    flex-direction: column;
    color: var(--f-text);
    letter-spacing: normal;
    line-height: 1.5;
}
.dark .pb-form-shell {
    --f-text: #f8fafc;
    --f-strong: #f1f5f9;
    --f-label: #e2e8f0;
    --f-hint: #94a3b8;
    --f-muted: #94a3b8;
    --f-faint: #475569;
    --f-border: rgba(255, 255, 255, 0.12);
    --f-line: transparent;
    --f-soft: rgba(255, 255, 255, 0.04);
    --f-surface: rgba(255, 255, 255, 0.05);
    --f-card: rgba(255, 255, 255, 0.03);
    --f-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.4);
    --f-accent-soft: rgba(255, 105, 0, 0.08);
    --f-accent-tint: rgba(255, 105, 0, 0.12);
    --f-chip-bg: rgba(255, 105, 0, 0.12);
    --f-green: #05df72;
    --f-red: #ff6467;
    --f-red-soft: rgba(239, 68, 68, 0.08);
}

/* Header: the admin modal header (title, subtitle) with the card's progress. */
.pb-form-head { padding: 1.5rem 4.5rem 1.25rem 2rem; border-bottom: 1px solid var(--f-line); }
.dark .pb-form-head { border-bottom-color: rgba(255, 255, 255, 0.06); }
.pb-form-head__title { margin: 0; font-size: 1.25rem; line-height: 1.75rem; font-weight: 700; color: var(--f-text); }
.pb-form-head__sub { display: flex; flex-wrap: wrap; align-items: center; gap: 0.375rem; margin-top: 0.125rem; font-size: 0.875rem; line-height: 1.25rem; color: var(--f-hint); }
.pb-form-head__stage { font-weight: 500; color: var(--f-accent); }
.pb-form-head__bar { height: 0.25rem; margin-top: 0.875rem; border-radius: 9999px; background: var(--f-line); overflow: hidden; }
.dark .pb-form-head__bar { background: rgba(255, 255, 255, 0.08); }
.pb-form-head__bar span { display: block; height: 100%; border-radius: inherit; background: var(--f-accent); }
.pb-form-shell .pb-paused-pill { margin-left: 0.125rem; }

/* Body: the admin form stacks its cards 2rem apart (space-y-8). */
.pb-form-body { display: flex; flex-direction: column; gap: 2rem; padding: 1.75rem 2rem 2rem; }
.pb-form-body > [data-pb-updates-slot]:empty { display: none; }

/* Section card: bg-surface/80 rounded-2xl border-gray-100 shadow-sm. */
.pb-form-card { border: 1px solid var(--f-line); border-radius: 1rem; background: var(--f-card); box-shadow: var(--f-shadow); }
.pb-form-card__head { display: flex; align-items: center; gap: 0.75rem; padding: 0.75rem 1rem; }
.pb-form-card__icon { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 2rem; height: 2rem; border-radius: 0.5rem; background: var(--f-chip-bg); color: var(--f-accent); }
.pb-form-card__icon svg { width: 1rem; height: 1rem; }
.pb-form-card__title { margin: 0; font-size: 0.875rem; line-height: 1.25rem; font-weight: 600; color: var(--f-text); white-space: nowrap; }
.pb-form-card__tools { display: flex; align-items: center; gap: 0.5rem; margin-left: auto; }
.pb-form-card__meta { font-size: 0.75rem; line-height: 1rem; color: var(--f-muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.pb-form-card__meta--done { color: var(--f-green); font-weight: 500; }
.pb-form-card__meta--retake { color: var(--f-accent-text); font-weight: 500; }
.pb-form-card__body { display: flex; flex-direction: column; gap: 1.5rem; padding: 1.25rem; border-top: 1px solid var(--f-line); }
.pb-form-card__rows { border-top: 1px solid var(--f-line); }
.pb-form-card__rows > * + * { border-top: 1px solid var(--f-line); }
/* Lists of people, steps and versions: rows 0.25rem apart, no dividers (space-y-1). */
.pb-form-list { display: flex; flex-direction: column; gap: 0.25rem; padding: 0.5rem 1rem 0.75rem; border-top: 1px solid var(--f-line); }
.pb-form-card__foot { padding: 0 1rem 0.75rem; }
.pb-form-list + .pb-form-card__foot { margin-top: -0.25rem; }

/* A checklist's name sits in its card header and is renamed in place,
   like the admin's borderless-until-hover role field. */

/* Small actions: the creator picker's "+ Add" and icon buttons. */
.pb-form-add { display: inline-flex; align-items: center; gap: 0.25rem; padding: 0.25rem 0.5rem; border: 0; border-radius: 0.5rem; background: transparent; color: var(--f-accent-text); font: inherit; font-size: 0.75rem; line-height: 1rem; font-weight: 500; cursor: pointer; white-space: nowrap; transition: background-color 0.15s ease; }
.pb-form-add svg { width: 0.875rem; height: 0.875rem; }
.pb-form-add:hover, .pb-form-add:focus-visible { background: var(--f-accent-soft); outline: none; }
.pb-form-add:disabled { opacity: 0.4; cursor: default; background: transparent; }
.pb-form-iconbtn { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 1.75rem; height: 1.75rem; padding: 0; border: 0; border-radius: 0.5rem; background: transparent; color: var(--f-faint); cursor: pointer; transition: color 0.15s ease, background-color 0.15s ease, opacity 0.15s ease; }
.dark .pb-form-iconbtn { color: #64748b; }
.pb-form-iconbtn svg { width: 0.875rem; height: 0.875rem; }
.pb-form-iconbtn:hover, .pb-form-iconbtn:focus-visible { background: var(--f-soft); color: var(--f-label); outline: none; }
.pb-form-iconbtn--danger:hover, .pb-form-iconbtn--danger:focus-visible { background: var(--f-red-soft); color: var(--f-red); }

/* Fields: label text-sm font-medium gray-700 mb-2; input pl-12 pr-4 py-3 text-sm. */
.pb-form-field { display: flex; flex-direction: column; min-width: 0; }
.pb-form-label { display: block; margin-bottom: 0.5rem; font-size: 0.875rem; line-height: 1.25rem; font-weight: 500; color: var(--f-label); }
.pb-form-label small { font-size: inherit; font-weight: 400; color: var(--f-muted); }
.pb-form-hint { margin: 0.375rem 0 0; font-size: 0.75rem; line-height: 1rem; color: var(--f-hint); }
.pb-form-control { position: relative; }
.pb-form-control > .pb-form-control__icon { position: absolute; left: 1rem; top: 50%; width: 1rem; height: 1rem; transform: translateY(-50%); color: var(--f-muted); pointer-events: none; z-index: 1; }
.pb-form-control--area > .pb-form-control__icon { top: 1rem; transform: none; }
.pb-form-input { display: block; width: 100%; padding: 0.75rem 1rem 0.75rem 3rem; border: 1px solid var(--f-border); border-radius: 0.75rem; background: rgba(255, 255, 255, 0.7); color: var(--f-text); font: inherit; font-size: 0.875rem; line-height: 1.25rem; font-weight: 400; transition: border-color 0.15s ease, box-shadow 0.15s ease; }
.dark .pb-form-input { background: rgba(255, 255, 255, 0.04); }
.pb-form-input::placeholder { color: var(--f-muted); }
.pb-form-input:focus { outline: none; border-color: #ff8904; box-shadow: 0 0 0 2px var(--f-ring); }
textarea.pb-form-input { resize: none; min-height: 6.625rem; field-sizing: content; }
.pb-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.pb-form-select.pb-dd__trigger { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; text-align: left; cursor: pointer; }
.pb-form-select.pb-dd__trigger .pb-dd__chevron { color: var(--f-muted); }
.pb-form-select.pb-dd__trigger[aria-expanded="true"] { border-color: #ff8904; box-shadow: 0 0 0 2px var(--f-ring); }
.pb-form-shell .flatpickr-input[readonly] { cursor: pointer; }
.pb-form-shell input[type="date"], .pb-form-shell .flatpickr-input { color-scheme: light; }
.dark .pb-form-shell input[type="date"], .dark .pb-form-shell .flatpickr-input { color-scheme: dark; }

/* Toggle row: the Post Flags row (label + description left, switch right). */
.pb-form-toggle { display: flex; align-items: center; gap: 0.75rem; padding: 0.75rem 1rem; cursor: pointer; transition: background-color 0.15s ease; }
.pb-form-toggle:hover { background: rgba(249, 250, 251, 0.6); }
.dark .pb-form-toggle:hover { background: rgba(255, 255, 255, 0.03); }
.pb-form-toggle__icon { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 1.75rem; height: 1.75rem; border-radius: 0.5rem; background: var(--f-accent-soft); color: var(--f-accent); }
.pb-form-toggle__icon svg { width: 0.875rem; height: 0.875rem; }
.pb-form-toggle__text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.pb-form-toggle__label { font-size: 0.875rem; line-height: 1.25rem; font-weight: 500; color: var(--f-strong); }
.pb-form-toggle__desc { font-size: 0.75rem; line-height: 1rem; color: var(--f-muted); }
.pb-form-toggle__desc--next { color: var(--f-accent-text); font-weight: 500; }
.pb-form-toggle__desc--done { color: var(--f-green); }
.pb-form-toggle--danger .pb-form-toggle__icon { background: var(--f-red-soft); color: var(--f-red); }
.pb-form-shell .pb-switch { background: #e5e7eb; }
.dark .pb-form-shell .pb-switch { background: #334155; }
.pb-form-shell .pb-switch:has(input:checked) { background: var(--f-accent); }
.pb-form-shell .pb-switch__knob { box-shadow: none; }
.pb-form-shell .pb-form-toggle--danger .pb-switch:has(input:checked) { background: #ef4444; }
/* Hidden uses the board's purple, like the Hidden pill and card flag. */
.pb-form-toggle--hidden .pb-form-toggle__icon { background: #ede9fe; color: #7c3aed; }
.dark .pb-form-toggle--hidden .pb-form-toggle__icon { background: rgba(139, 92, 246, 0.14); color: #c4b5fd; }
.pb-form-shell .pb-form-toggle--hidden .pb-switch:has(input:checked) { background: #8b5cf6; }
.pb-form-toggle--hidden .pb-switch:has(input:focus-visible) { outline-color: #8b5cf6; }

/* People rows: the creator picker row (avatar, name, role field, remove). */
/* The status column has one width, so every row's character field lines up. */
.pb-form-person { display: grid; grid-template-columns: auto minmax(0, 0.9fr) minmax(0, 1.1fr) 6rem auto; align-items: center; column-gap: 0.625rem; row-gap: 0.375rem; padding: 0.25rem 0.25rem 0.25rem 0; border-radius: 0.75rem; }
.pb-form-person__avatar { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 1.75rem; height: 1.75rem; border-radius: 0.5rem; background: var(--f-accent-tint); color: var(--f-accent-text); font-size: 0.75rem; line-height: 1rem; font-weight: 600; object-fit: cover; overflow: hidden; user-select: none; }
.pb-form-person__name { min-width: 0; font-size: 0.875rem; line-height: 1.25rem; font-weight: 500; color: var(--f-strong); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pb-form-inline { display: block; width: 100%; min-width: 0; padding: 0.375rem 0.625rem; border: 1px solid transparent; border-radius: 0.5rem; background: transparent; color: var(--f-text); font: inherit; font-size: 0.875rem; line-height: 1.25rem; transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease; }
.pb-form-inline::placeholder { color: var(--f-muted); }
:is(.pb-form-person, .pb-form-version):hover .pb-form-inline { border-color: var(--f-border); }
.pb-form-inline:focus { outline: none; border-color: #ff8904; background: var(--f-surface); box-shadow: 0 0 0 2px var(--f-ring); }
/* A voice actor's character: a boxed field like the Title, sized for the row. */
.pb-form-inline--field { padding: 0.5rem 0.875rem; border-color: var(--f-border); border-radius: 0.75rem; background: rgba(255, 255, 255, 0.7); }
.dark .pb-form-inline--field { background: rgba(255, 255, 255, 0.04); }
.pb-form-inline--name { width: calc(100% + 0.625rem); margin-left: -0.625rem; font-weight: 500; color: var(--f-strong); }
.pb-form-reveal { opacity: 0; }
:is(.pb-form-person, .pb-form-row, .pb-form-version):is(:hover, :focus-within) .pb-form-reveal, .pb-form-reveal:focus-visible { opacity: 1; }
@media (hover: none) { .pb-form-reveal { opacity: 1; } }

/* Voice actor status: the admin's small tab pills (file Details / Chapters / Subtitles). */

/* Versions: a checkbox, the text field, remove. */
.pb-form-version { display: flex; align-items: center; gap: 0.625rem; padding: 0.125rem 0.25rem 0.125rem 0; border-radius: 0.75rem; }
.pb-form-version .pb-form-inline { flex: 1 1 auto; }
.pb-form-check { position: relative; display: inline-flex; align-items: center; justify-content: center; flex: none; width: 1rem; height: 1rem; margin-left: 0.375rem; border: 2px solid var(--f-border); border-radius: 0.25rem; color: transparent; cursor: pointer; transition: background-color 0.15s ease, border-color 0.15s ease; }
.dark .pb-form-check { border-color: rgba(255, 255, 255, 0.2); }
.pb-form-check input { position: absolute; inset: -0.5rem; width: calc(100% + 1rem); height: calc(100% + 1rem); margin: 0; opacity: 0; cursor: pointer; }
.pb-form-check svg { width: 0.625rem; height: 0.625rem; }
.pb-form-check:has(input:checked) { background: var(--f-accent); border-color: var(--f-accent); color: #fff; }
.pb-form-check:has(input:focus-visible) { box-shadow: 0 0 0 2px var(--f-ring); }
/* Editing steps and versions: an icon, the name as a field, remove, and a done switch. */
.pb-form-row { display: flex; align-items: center; gap: 0.75rem; padding: 0.625rem 1rem; }
.pb-form-row__icon { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 1.75rem; height: 1.75rem; border-radius: 0.5rem; background: var(--f-accent-soft); color: var(--f-accent); }
.pb-form-row__icon svg { width: 0.875rem; height: 0.875rem; }
.pb-form-row__input { flex: 1 1 auto; }
/* A step's icon is a button that opens the icon choices. */
.pb-form-row__icon--pick { padding: 0; border: 0; cursor: pointer; transition: box-shadow 0.15s ease; }
.pb-form-row__icon--pick:hover, .pb-form-row__icon--pick[aria-expanded="true"] { box-shadow: 0 0 0 2px var(--f-ring); }
.pb-form-row__icon--pick:focus-visible { outline: none; box-shadow: 0 0 0 2px #ff8904; }
/* The icon choices: a row of icons under the step, lined up with its name field. */
.pb-form-card__rows > .pb-icon-pick { border-top: 0; }
.pb-icon-pick { display: flex; flex-wrap: wrap; gap: 0.375rem; padding: 0 1rem 0.875rem 3.5rem; }
.pb-icon-pick__option { display: inline-flex; align-items: center; justify-content: center; width: 2.25rem; height: 2.25rem; padding: 0; border: 1px solid var(--f-border); border-radius: 0.5rem; background: transparent; color: var(--f-label); cursor: pointer; transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease; }
.pb-icon-pick__option svg { width: 1rem; height: 1rem; }
.pb-icon-pick__option:hover { background: var(--f-soft); color: var(--f-strong); }
.pb-icon-pick__option[aria-pressed="true"] { border-color: var(--f-accent); background: var(--f-accent-soft); color: var(--f-accent); }
.pb-icon-pick__option:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--f-ring); border-color: #ff8904; }

/* Empty states inside a card. */
.pb-form-empty { margin: 0; padding: 0.375rem 0; font-size: 0.75rem; line-height: 1rem; color: var(--f-muted); }

/* Adding a voice actor: the creator picker panel (search, then options). */
.pb-form-pick { margin: 0 1rem 1rem; padding: 0.375rem; border: 1px solid var(--f-border); border-radius: 0.75rem; background: var(--f-surface); }
.pb-form-pick__search { display: block; width: 100%; padding: 0.5rem 0.75rem; border: 1px solid var(--f-border); border-radius: 0.5rem; background: var(--f-soft); color: var(--f-text); font: inherit; font-size: 0.875rem; line-height: 1.25rem; }
.pb-form-pick__search::placeholder { color: var(--f-muted); }
.pb-form-pick__search:focus { outline: none; border-color: #ff8904; background: var(--f-surface); box-shadow: 0 0 0 2px var(--f-ring); }
.pb-form-pick__list { max-height: 15rem; margin-top: 0.125rem; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--f-border) transparent; }
.pb-form-pick__group[hidden], .pb-form-pick__option[hidden], .pb-form-pick__empty[hidden] { display: none; }
.pb-form-pick__label { margin: 0; padding: 0.5rem 0.5rem 0.25rem; font-size: 0.75rem; line-height: 1rem; font-weight: 600; letter-spacing: 0.025em; text-transform: uppercase; color: var(--f-muted); }
.pb-form-pick__option { display: flex; align-items: center; gap: 0.625rem; width: 100%; padding: 0.375rem 0.5rem; border: 0; border-radius: 0.5rem; background: transparent; color: var(--f-strong); font: inherit; font-size: 0.875rem; line-height: 1.25rem; text-align: left; cursor: pointer; }
.pb-form-pick__option:hover, .pb-form-pick__option:focus-visible { background: var(--f-soft); outline: none; }
.pb-form-pick__empty { margin: 0; padding: 0.625rem 0.5rem; font-size: 0.875rem; color: var(--f-muted); }

/* Progress by hand, only when there are no steps. */

.pb-form-shell .pb-modal__error { margin: 0; }

/* Footer: the admin modal footer (bg-gray-50/60, Cancel + Save). */
.pb-form-foot { position: sticky; bottom: 0; z-index: 5; display: flex; align-items: center; justify-content: flex-end; gap: 0.75rem; padding: 1rem 2rem; border-top: 1px solid var(--f-line); background: #f9fafb; }
.dark .pb-form-foot { border-top-color: rgba(255, 255, 255, 0.06); background: #12171e; }
.pb-form-btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; padding: 0.625rem 1.25rem; border: 1px solid var(--f-border); border-radius: 0.75rem; background: var(--f-surface); color: var(--f-label); font: inherit; font-size: 0.875rem; line-height: 1.25rem; font-weight: 600; cursor: pointer; box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05); transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease; }
.pb-form-btn:hover { background: var(--f-soft); }
.pb-form-btn svg { width: 1rem; height: 1rem; }
.pb-form-btn--primary { border-color: transparent; background: var(--f-accent); color: #fff; }
.pb-form-btn--primary:hover { background: #f54900; }

/* The editor brings its own header and footer padding. */
.pb-modal__body:has(> .pb-form-shell), .pb-modal__panel:has(.pb-form-shell) .pb-modal__body { padding: 0; }
.pb-modal__panel:has(.pb-form-shell) { overflow: clip; }
.pb-modal__panel:has(.pb-form-shell) [data-pb-modal-close] { top: 1.25rem; right: 1.25rem; width: 2.25rem; height: 2.25rem; }

/* Narrow screens: as the admin, the role field drops under the name and inputs
   are 16px so phones don't zoom into them. */
@media (max-width: 767px) {
    .pb-form-shell input, .pb-form-shell textarea { font-size: 16px; }
}
@media (max-width: 560px) {
    .pb-form-head { padding: 1.25rem 4rem 1rem 1.25rem; }
    .pb-form-body { padding: 1.25rem; gap: 1.5rem; }
    .pb-form-foot { padding: 0.875rem 1.25rem; }
    .pb-form-grid { grid-template-columns: minmax(0, 1fr); }
    .pb-form-person { grid-template-columns: auto minmax(0, 1fr) auto; }
    .pb-form-person .pb-form-inline:not(.pb-form-inline--name) { grid-column: 2 / 4; grid-row: 2; border-color: var(--f-border); }
    .pb-form-person .pb-form-status { grid-column: 2 / 4; grid-row: 3; justify-self: start; }
    .pb-form-person .pb-form-iconbtn { grid-column: 3; grid-row: 1; }
    .pb-form-inline--name { grid-column: 2; }
}

/* Each card's ⋯ menu on the board (edit mode). */
/* Not the dragged copy, which floats with the pointer (.pb-ghost is position: fixed). */
.pb-card:not(.pb-ghost) { position: relative; }
/* Centred on the card's first line, so a card with only a title doesn't clip it. */
.pb-card__more { position: absolute; top: calc(0.6rem + (0.9rem * 1.35 - 2rem) / 2); right: 0.375rem; width: 2rem; height: 2rem; opacity: 0; transition: opacity 0.15s ease, background-color 0.15s ease; }
.pb-card:is(:hover, :focus-within) .pb-card__more, .pb-card__more[aria-expanded="true"] { opacity: 1; }
@media (hover: none) { .pb-card__more { opacity: 1; } }
[data-can-edit="1"] .pb-card__title { padding-right: 1.75rem; }
[data-can-edit="1"] .pb-card__top { padding-right: 2rem; }

@media (prefers-reduced-motion: reduce) {
    .pb-form-input, .pb-form-inline, .pb-form-toggle, .pb-form-check, .pb-form-btn, .pb-form-add, .pb-form-iconbtn, .pb-card__more, .pb-form-row__icon--pick, .pb-icon-pick__option { transition: none; }
}

/* Series: type a new one, or pick one already used from the chevron's list. */
.pb-form-input--suggest { padding-right: 2.75rem; }
.pb-form-control__toggle { position: absolute; right: 0.5rem; top: 50%; display: inline-flex; align-items: center; justify-content: center; width: 1.75rem; height: 1.75rem; padding: 0; border: 0; border-radius: 0.5rem; background: transparent; color: var(--f-muted); transform: translateY(-50%); cursor: pointer; transition: background-color 0.15s ease, color 0.15s ease; }
.pb-form-control__toggle:hover { background: var(--f-soft); color: var(--f-label); }
.pb-form-control__toggle .pb-dd__chevron { width: 1rem; height: 1rem; color: inherit; }
.pb-form-control:has([aria-expanded="true"]) .pb-form-control__toggle .pb-dd__chevron { transform: rotate(180deg); }
.pb-dd__option--active { background: var(--pb-track); }

/* Adding someone who isn't on the creator list: the last option in the picker. */
.pb-form-pick__new { color: var(--f-accent-text); }
.pb-form-pick__new svg { flex: none; width: 1.75rem; height: 1.75rem; padding: 0.375rem; border-radius: 0.5rem; background: var(--f-accent-soft); }
.pb-form-pick__new b { font-weight: 600; }
.pb-form-pick__group + .pb-form-pick__new:not([hidden]) { margin-top: 0.25rem; }

/* The dragged copy floats with the pointer. The compact card and stage rules
   above set position: relative, which would otherwise leave it in the page flow. */
.pb-card.pb-ghost, .pb-column.pb-ghost { position: fixed; }

/* Voice actor status: a small dropdown, tinted by what it says. */
.pb-form-status.pb-dd__trigger { display: inline-flex; align-items: center; gap: 0.25rem; padding: 0.25rem 0.375rem 0.25rem 0.625rem; border: 1px solid transparent; border-radius: 0.5rem; background: #f3f4f6; color: var(--f-hint); font: inherit; font-size: 0.75rem; line-height: 1rem; font-weight: 600; letter-spacing: 0.025em; text-transform: uppercase; white-space: nowrap; cursor: pointer; transition: border-color 0.15s ease, background-color 0.15s ease; }
.dark .pb-form-status.pb-dd__trigger { background: rgba(255, 255, 255, 0.06); }
.pb-form-status.pb-dd__trigger .pb-dd__chevron { width: 0.75rem; height: 0.75rem; color: currentColor; opacity: 0.7; }
.pb-form-status.pb-dd__trigger[data-value="in"] { background: #f0fdf4; color: #008236; }
.dark .pb-form-status.pb-dd__trigger[data-value="in"] { background: rgba(34, 197, 94, 0.12); color: #05df72; }
.pb-form-status.pb-dd__trigger[data-value="retake"] { background: var(--f-chip-bg); color: var(--f-chip-text); }
.pb-form-status.pb-dd__trigger:hover, .pb-form-status.pb-dd__trigger[aria-expanded="true"] { border-color: var(--f-border); }
.pb-form-status.pb-dd__trigger:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--f-ring); }
