/*
 * The gig poster studio at /tools/poster/ — laid out as an editor.
 *
 * Wide screens get three panes: what the poster says on the left, the poster
 * itself in the middle at the size the window allows, and how it looks on the
 * right. The editor is one window tall and each rail scrolls on its own, so
 * the poster never has to share height with a form. Narrower screens stack the
 * rails beside a sticky poster; a phone gets one column, poster first.
 */

/* ---- page ------------------------------------------------------------------ */

.ps-wrap { margin: 96px auto 4rem; padding: 0 1.25rem; color: #ccc; max-width: 1840px; }

.ps-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: .4rem 1.5rem; margin-bottom: 1rem; }
.ps-head h1 {
    font-family: 'Inter', system-ui, sans-serif; font-weight: 800; letter-spacing: -0.02em;
    color: #fff; font-size: clamp(1.6rem, 2.6vw, 2.2rem); line-height: 1.1; margin: 0;
}
.ps-tagline { color: #8f8f8f; max-width: 760px; line-height: 1.55; margin: 0; font-size: .92rem; }

.ps-error { background: rgba(255,0,0,.1); border: 1px solid #ff0000; color: #ff9999; padding: .8rem 1rem; border-radius: 4px; margin-bottom: 1rem; }
.ps-noscript { background: #141414; border: 1px solid #333; padding: 1rem; border-radius: 5px; margin-bottom: 1rem; color: #aaa; }

/* ---- the editor --------------------------------------------------------------- */

.ps-editor {
    display: grid;
    grid-template-columns: 330px minmax(0, 1fr) 370px;
    gap: .9rem;
    height: calc(100vh - 104px);
    min-height: 640px;
    scroll-margin-top: 92px;
}

.ps-rail {
    display: flex; flex-direction: column; min-height: 0;
    background: #0d0d0d; border: 1px solid #222; border-radius: 8px;
}
.ps-rail-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: .9rem; }
.ps-rail-body[hidden] { display: none; }

.ps-rail-tabs { display: flex; border-bottom: 1px solid #222; flex: 0 0 auto; }
.ps-rail-tab {
    flex: 1 1 0; background: none; border: 0; border-bottom: 2px solid transparent;
    color: #8c8c8c; padding: .75rem .5rem .65rem; font-size: .78rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: .08em; cursor: pointer; font-family: inherit;
    margin-bottom: -1px;
}
.ps-rail-tab:hover { color: #ddd; }
.ps-rail-tab.is-active { color: #fff; border-bottom-color: #ff0000; }
.ps-rail-tab span { color: #666; font-weight: 600; margin-left: .25rem; }

/* Stickers: a card each, a row of chips per choice. */
.ps-stickers { display: flex; flex-direction: column; gap: .7rem; margin-bottom: .7rem; }
.ps-stickers:empty { display: none; }
.ps-sticker { border: 1px solid #262626; border-radius: 6px; padding: .6rem; background: #111; }
.ps-sticker.is-selected { border-color: #ff0000; }
.ps-sticker-head { display: flex; gap: .45rem; align-items: center; margin-bottom: .45rem; }
.ps-sticker-head .ps-select { flex: 1 1 auto; }
.ps-sticker-text { width: 100%; margin-bottom: .45rem; }
.ps-sticker-row { display: flex; gap: .5rem; align-items: baseline; margin-top: .35rem; }
.ps-sticker-label { flex: 0 0 3.6rem; font-size: .7rem; color: #777; text-transform: uppercase; letter-spacing: .06em; }
.ps-chips-inline { display: flex; flex-wrap: wrap; gap: .3rem; }
.ps-chip:disabled { opacity: .35; cursor: not-allowed; }

/* Sponsor logos waiting to go on the poster. */
.ps-sponsors { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: .6rem; }
.ps-sponsors:empty { display: none; }
/* Mid grey, so a black logo and a white one both show. */
.ps-sponsor { position: relative; background: #8a8a8a; border: 1px solid #2c2c2c; border-radius: 4px; line-height: 0; }
.ps-sponsor canvas { width: 96px; height: 52px; }
.ps-sponsor-remove { position: absolute; top: -8px; right: -8px; width: 20px; height: 20px; border-radius: 50%; border: 0; background: #ff0000; color: #fff; font-size: .8rem; line-height: 20px; cursor: pointer; padding: 0; }

/* A field for another bill mode. .ps-row and .ps-field set their own display,
   which would otherwise beat the hidden attribute. */
[data-bill][hidden] { display: none !important; }

.ps-panel { border-bottom: 1px solid #1d1d1d; padding: .2rem 0 1.1rem; margin-bottom: 1rem; }
.ps-panel:last-child { border-bottom: 0; margin-bottom: 0; padding-bottom: .2rem; }
.ps-panel h2 { color: #fff; font-size: .76rem; text-transform: uppercase; letter-spacing: .1em; border-left: 3px solid #ff0000; padding-left: .6rem; margin: 0 0 .9rem; }

/* The middle pane: the poster, with the whole toolbar in one row above it so
   no height goes to buttons. */
.ps-stage {
    display: flex; flex-direction: column; min-width: 0; min-height: 0; position: relative;
    container-type: inline-size; container-name: stage;
    background: #080808; border: 1px solid #1d1d1d; border-radius: 8px; overflow: hidden;
    background-image: radial-gradient(#161616 1px, transparent 1px); background-size: 18px 18px;
}
.ps-stage-bar {
    display: flex; flex-wrap: wrap; align-items: center; gap: .45rem; flex: 0 0 auto;
    padding: .55rem .6rem; background: rgba(12,12,12,.92); border-bottom: 1px solid #1d1d1d;
}
.ps-stage-bar .ps-spacer { flex: 1 1 auto; }
.ps-bar-btn {
    background: #151515; border: 1px solid #2f2f2f; color: #ddd; border-radius: 5px;
    padding: .45rem .8rem; font-size: .8rem; font-weight: 600; cursor: pointer; font-family: inherit;
    white-space: nowrap;
}
.ps-bar-btn:hover:not(:disabled) { border-color: #ff0000; color: #fff; }
.ps-bar-btn:disabled { opacity: .4; cursor: default; }
.ps-bar-btn[hidden] { display: none; }
.ps-bar-btn--icon { padding: .45rem .62rem; }
.ps-bar-btn--primary { background: #ff0000; border-color: #ff0000; color: #fff; }
.ps-bar-btn--primary:hover:not(:disabled) { background: #d51007; }
.ps-bar-btn--outline { background: transparent; border-color: #ff0000; color: #ff4d4d; }
.ps-stage-hint { font-size: .74rem; color: #666; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; flex: 0 1 auto; }

.ps-canvas-box {
    position: relative; flex: 1 1 0; min-height: 0; overflow: hidden;
    display: flex; align-items: center; justify-content: center; padding: 1.1rem;
}
.ps-canvas-box canvas { display: block; box-shadow: 0 14px 44px rgba(0,0,0,.7); cursor: grab; }
.ps-canvas-box canvas.ps-dragging { cursor: grabbing; }
.ps-drag-hint { position: absolute; left: 50%; bottom: .6rem; transform: translateX(-50%); font-size: .72rem; color: #8a8a8a; background: rgba(0,0,0,.6); padding: .25rem .6rem; border-radius: 20px; pointer-events: none; }

.ps-export-status { font-size: .76rem; color: #8fbf95; min-height: 1em; }
.ps-export-status.is-error { color: #e39a9a; }

/* The toolbar stays one row as the pane narrows: the hint goes first. */
@container stage (max-width: 940px) { .ps-stage-hint { display: none; } }
@container stage (max-width: 680px) { .ps-bar-label { display: none; } }
@container stage (max-width: 560px) { .ps-bar-btn { padding: .42rem .6rem; font-size: .76rem; } }

/* "Show me 12 versions": a grid over the poster, which stays where it was. */
.ps-versions {
    position: absolute; inset: 0; z-index: 6; display: flex; flex-direction: column;
    background: rgba(8,8,8,.97);
}
.ps-versions[hidden] { display: none; }
.ps-versions-head { display: flex; align-items: center; gap: .45rem; padding: .6rem .8rem; border-bottom: 1px solid #1d1d1d; flex: 0 0 auto; }
.ps-versions-head strong { color: #fff; font-size: .9rem; }
.ps-versions-head .ps-spacer { flex: 1 1 auto; }
.ps-versions-note { margin: .6rem .9rem 0; font-size: .76rem; color: #8a8a8a; flex: 0 0 auto; }
.ps-versions-grid {
    flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: .8rem .9rem 1rem;
    display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .9rem .8rem;
    align-content: start;
}
.ps-version { display: flex; flex-direction: column; gap: .35rem; min-width: 0; }
.ps-version-use {
    display: block; padding: 0; line-height: 0; cursor: pointer; background: #111;
    border: 2px solid transparent; border-radius: 4px; overflow: hidden;
}
.ps-version-use:hover, .ps-version-use:focus-visible { border-color: #ff0000; outline: none; }
.ps-version-use canvas { display: block; width: 100%; height: auto; }
.ps-version.is-picked .ps-version-use { border-color: #ff0000; }
.ps-version-foot { display: flex; flex-direction: column; align-items: flex-start; gap: .15rem; font-size: .72rem; color: #8a8a8a; min-width: 0; }
.ps-version-foot span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ps-version-more { background: none; border: 0; padding: 0; color: #ff4d4d; font-size: .72rem; cursor: pointer; font-family: inherit; }
.ps-version-more:hover { color: #fff; }
#ps-versions[aria-expanded="true"] { border-color: #ff0000; color: #fff; }

/* The share link, as a card over the foot of the poster. */
.ps-share-out {
    display: none; position: absolute; left: 50%; bottom: 1rem; transform: translateX(-50%);
    width: min(520px, calc(100% - 2rem)); z-index: 5;
    background: #101a10; border: 1px solid #2c4a2c; border-radius: 6px; padding: .8rem .9rem;
    box-shadow: 0 12px 30px rgba(0,0,0,.6);
}
.ps-share-out.is-error { background: #1a1010; border-color: #4a2c2c; }
.ps-share-out p { margin: 0 0 .5rem; font-size: .84rem; color: #9fd8a7; }
.ps-share-out.is-error p { color: #e39a9a; }
.ps-share-link { display: flex; gap: .5rem; }
.ps-share-link input { flex: 1; min-width: 0; background: #0a0a0a; border: 1px solid #333; color: #ddd; padding: .5rem .7rem; border-radius: 4px; font-size: .8rem; font-family: monospace; }
.ps-share-link button { background: #2c4a2c; border: none; color: #dff5df; padding: .5rem .9rem; border-radius: 4px; cursor: pointer; font-size: .8rem; font-weight: 700; }
.ps-share-close { position: absolute; top: .3rem; right: .45rem; background: none; border: 0; color: #7a9a7a; font-size: 1rem; cursor: pointer; }

.ps-select-box { position: absolute; border: 2px dashed #ff4d4d; border-radius: 3px; pointer-events: none; box-shadow: 0 0 0 1px rgba(0,0,0,.6); }

/* ---- fields ---------------------------------------------------------------------- */

.ps-field { margin-bottom: .85rem; }
.ps-field:last-child { margin-bottom: 0; }
.ps-field label { display: block; margin-bottom: .3rem; font-size: .7rem; color: #8c8c8c; text-transform: uppercase; letter-spacing: .07em; }
.ps-field input[type="text"], .ps-field textarea {
    width: 100%; background: #161616; border: 1px solid #2c2c2c; color: #eee;
    padding: .55rem .7rem; border-radius: 4px; font-size: .9rem; font-family: inherit;
}
.ps-field input:focus, .ps-field textarea:focus { outline: none; border-color: #ff0000; }
.ps-field textarea { min-height: 80px; resize: vertical; }
.ps-hint { font-size: .72rem; color: #666; margin-top: .3rem; }
.ps-row { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }

.ps-chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.ps-chips label {
    margin: 0; border: 1px solid #2f2f2f; border-radius: 4px; padding: .42rem .7rem;
    cursor: pointer; font-size: .8rem; color: #bbb; text-transform: none; letter-spacing: 0;
    transition: border-color .12s, color .12s, background .12s;
}
.ps-chips input { position: absolute; opacity: 0; pointer-events: none; }
.ps-chips label:has(input:checked) { border-color: #ff0000; color: #fff; background: rgba(255,0,0,.09); }
.ps-chips label:hover { border-color: #4a4a4a; }

/* Size chips carry their pixel dimensions underneath the name — the one fact
   that tells you whether you are about to download something you can print. */
.ps-chips--size label { display: flex; flex-direction: column; gap: .12rem; line-height: 1.25; }
.ps-size-dims { font-size: .66rem; color: #666; letter-spacing: .03em; }
.ps-chips--size label:has(input:checked) .ps-size-dims { color: #c98c8c; }

/* Gig lookup */
.ps-lookup { position: relative; padding-bottom: .8rem; margin-bottom: .9rem; border-bottom: 1px solid #1f1f1f; }
.ps-lookup input { width: 100%; background: #161616; border: 1px solid #2c2c2c; color: #eee; padding: .55rem .7rem; border-radius: 4px; font-size: .9rem; font-family: inherit; }
.ps-lookup input:focus { outline: none; border-color: #ff0000; }
.ps-lookup-results { display: none; position: absolute; left: 0; right: 0; top: 100%; z-index: 20; background: #141414; border: 1px solid #333; border-radius: 4px; max-height: 300px; overflow-y: auto; box-shadow: 0 12px 28px rgba(0,0,0,.65); }
.ps-lookup-results.is-open { display: block; }
.ps-lookup-results button {
    display: block; width: 100%; text-align: left; background: none; border: 0;
    border-bottom: 1px solid #222; padding: .6rem .8rem; cursor: pointer;
    color: #ddd; font-family: inherit; font-size: .86rem; line-height: 1.4;
}
.ps-lookup-results button:last-child { border-bottom: 0; }
.ps-lookup-results button:hover, .ps-lookup-results button:focus { background: #1e1e1e; color: #fff; outline: none; }
.ps-lookup-results .ps-lookup-meta { display: block; color: #7d7d7d; font-size: .76rem; margin-top: .12rem; }
.ps-lookup-results .ps-lookup-empty { padding: .7rem .8rem; color: #7d7d7d; font-size: .84rem; }
.ps-prefilled { color: #8fbf95; }

.ps-swatches { display: flex; flex-wrap: wrap; gap: .5rem; }
.ps-swatches label { position: relative; width: 30px; height: 30px; border-radius: 50%; cursor: pointer; border: 2px solid transparent; box-shadow: inset 0 0 0 1px rgba(255,255,255,.16); }
.ps-swatches input { position: absolute; opacity: 0; pointer-events: none; }
.ps-swatches label:has(input:checked) { border-color: #fff; }
.ps-swatches .ps-swatch-custom { background: conic-gradient(#e21d1d, #ffb000, #beff00, #00d6e0, #7a3cff, #e80082, #e21d1d); }
.ps-swatches .ps-swatch-custom input[type="color"] { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; pointer-events: auto; }

.ps-art-row { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }
.ps-file-btn { display: inline-block; background: #1a1a1a; border: 1px solid #353535; color: #ddd; padding: .5rem .9rem; border-radius: 4px; cursor: pointer; font-size: .82rem; }
.ps-file-btn:hover { border-color: #ff0000; color: #fff; }
.ps-file-btn input { display: none; }

.ps-toggle { display: flex; align-items: flex-start; gap: .55rem; font-size: .83rem; color: #bbb; cursor: pointer; }
.ps-toggle input { margin-top: .18rem; accent-color: #ff0000; }
.ps-locked { color: #666; cursor: default; }
.ps-locked a { color: #ff4d4d; }

.ps-select {
    width: 100%; background: #161616; border: 1px solid #2c2c2c; color: #eee;
    padding: .5rem .7rem; border-radius: 4px; font-size: .88rem; font-family: inherit;
}
.ps-select:focus { outline: none; border-color: #ff0000; }
.ps-logo-treatments { margin-top: .5rem; }
.ps-print-field { margin-top: .8rem; }

/* ---- templates, in the left rail ---------------------------------------------------- */

.ps-presets { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .55rem; }
.ps-preset {
    background: #111; border: 1px solid #262626; border-radius: 6px; padding: .45rem .45rem .5rem;
    cursor: pointer; font-family: inherit; color: #9a9a9a; text-align: center;
    transition: border-color .12s, color .12s;
}
.ps-preset:hover { border-color: #4a4a4a; color: #ddd; }
.ps-preset.is-active { border-color: #ff0000; color: #fff; background: rgba(255,0,0,.07); }
/* A fixed box so a story next to a Facebook cover does not make the grid jump. */
.ps-preset-thumb { display: block; width: 100%; height: 150px; object-fit: contain; margin-bottom: .4rem; }
.ps-preset-name { display: block; font-size: .72rem; line-height: 1.3; }
.ps-presets-all { display: block; margin-top: .9rem; color: #ff4d4d; font-size: .8rem; text-decoration: none; text-align: center; }
.ps-presets-all:hover { text-decoration: underline; }

/* ---- Customise ---------------------------------------------------------------------- */

.ps-panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: .9rem; }
.ps-panel-head h2 { margin: 0; }
.ps-reset { background: none; border: 1px solid #333; color: #bbb; border-radius: 4px; padding: .3rem .6rem; font-size: .72rem; cursor: pointer; font-family: inherit; }
.ps-reset:hover:not(:disabled) { border-color: #ff0000; color: #fff; }
.ps-reset:disabled { opacity: .45; cursor: default; }
.ps-tabs { display: flex; flex-wrap: wrap; gap: .1rem; border-bottom: 1px solid #242424; margin-bottom: .9rem; }
.ps-tab { background: none; border: 0; border-bottom: 2px solid transparent; color: #8c8c8c; padding: .45rem .5rem; font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; cursor: pointer; font-family: inherit; margin-bottom: -1px; }
.ps-tab:hover { color: #ddd; }
.ps-tab.is-active { color: #fff; border-bottom-color: #ff0000; }
.ps-custom-label { font-size: .68rem; color: #8c8c8c; text-transform: uppercase; letter-spacing: .07em; margin-bottom: .3rem; }
.ps-chips--small { gap: .3rem; }
.ps-chip { display: inline-flex; align-items: center; gap: .35rem; background: none; border: 1px solid #2f2f2f; border-radius: 4px; padding: .34rem .55rem; font-size: .76rem; color: #bbb; cursor: pointer; font-family: inherit; }
.ps-chip:hover { border-color: #4a4a4a; color: #eee; }
.ps-chip.is-on { border-color: #ff0000; color: #fff; background: rgba(255,0,0,.09); }
.ps-chip-dot { width: 11px; height: 11px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(255,255,255,.25); }
.ps-chip-trio { display: inline-flex; gap: 2px; }
.ps-chip-custom input[type="color"] { width: 18px; height: 18px; padding: 0; border: 0; background: none; cursor: pointer; }
.ps-pane.is-waiting .ps-custom-row { opacity: .55; }
.ps-needs-art { display: none; margin: 0 0 .8rem; }
.ps-pane.is-waiting .ps-needs-art { display: block; }
.ps-faces { max-height: 230px; overflow-y: auto; padding-right: .25rem; }
.ps-chip.ps-face { padding: .3rem .45rem; background: #141414; }
.ps-face-img { display: block; height: 20px; width: auto; max-width: 140px; }
.ps-range { flex: 1 1 160px; accent-color: #ff0000; }
.ps-range-value { min-width: 3.4em; font-size: .78rem; color: #bbb; text-align: right; }

.ps-element { border: 1px solid #222; border-radius: 5px; padding: .45rem .5rem; margin-bottom: .4rem; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .4rem; }
.ps-element.is-selected { border-color: #ff0000; background: rgba(255,0,0,.06); }
.ps-element.is-hidden .ps-element-name { color: #666; text-decoration: line-through; }
.ps-element-name { background: none; border: 0; color: #eee; font-size: .82rem; font-weight: 700; cursor: pointer; font-family: inherit; padding: 0; text-align: left; }
.ps-element-tools { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem; }
.ps-element-show { display: inline-flex; align-items: center; gap: .3rem; font-size: .74rem; color: #aaa; margin-right: .15rem; }
.ps-element-show input { accent-color: #ff0000; }
.ps-element-size { min-width: 2.8em; text-align: center; font-size: .74rem; color: #bbb; }
.ps-icon-btn { background: #161616; border: 1px solid #2f2f2f; color: #ddd; border-radius: 4px; width: 26px; height: 26px; cursor: pointer; font-size: .82rem; line-height: 1; font-family: inherit; }
.ps-icon-btn:hover:not(:disabled) { border-color: #ff0000; }
.ps-icon-btn:disabled { opacity: .35; cursor: default; }
.ps-select--small { width: auto; max-width: 140px; padding: .28rem .35rem; font-size: .74rem; }
.ps-element-add { font-size: .78rem; color: #8c8c8c; display: flex; flex-wrap: wrap; align-items: center; gap: .3rem; margin-top: .5rem; }

/* On a phone, a small copy of the poster stays in view while the controls scroll. */
.ps-mini { position: fixed; right: 12px; bottom: 12px; z-index: 40; background: #0b0b0b; border: 1px solid #333; border-radius: 6px; padding: 4px; box-shadow: 0 8px 24px rgba(0,0,0,.6); cursor: pointer; }
.ps-mini canvas { display: block; width: 120px; height: auto; }

/* ---- scrollbars -------------------------------------------------------------------- */
/* Thin, dark, and red on hover, in the rails and every list inside them.
   Chromium and Safari take the ::-webkit-scrollbar styles; Firefox, which has
   only the standard properties, gets those — and only those, because Chromium
   drops its own styling the moment the standard ones are set. */

.ps-rail-body::-webkit-scrollbar, .ps-faces::-webkit-scrollbar,
.ps-lookup-results::-webkit-scrollbar, .ps-versions-grid::-webkit-scrollbar { width: 10px; height: 10px; }
.ps-rail-body::-webkit-scrollbar-track, .ps-faces::-webkit-scrollbar-track,
.ps-lookup-results::-webkit-scrollbar-track, .ps-versions-grid::-webkit-scrollbar-track { background: transparent; }
.ps-rail-body::-webkit-scrollbar-thumb, .ps-faces::-webkit-scrollbar-thumb,
.ps-lookup-results::-webkit-scrollbar-thumb, .ps-versions-grid::-webkit-scrollbar-thumb { background: #2c2c2c; border-radius: 10px; border: 3px solid #0d0d0d; }
.ps-rail-body::-webkit-scrollbar-thumb:hover, .ps-faces::-webkit-scrollbar-thumb:hover,
.ps-lookup-results::-webkit-scrollbar-thumb:hover, .ps-versions-grid::-webkit-scrollbar-thumb:hover { background: #ff0000; }
@supports not selector(::-webkit-scrollbar) {
    .ps-rail-body, .ps-faces, .ps-lookup-results, .ps-versions-grid { scrollbar-width: thin; scrollbar-color: #2c2c2c transparent; }
}

/* ---- below the editor ------------------------------------------------------------------- */

/* Genre landing page extras. The example sits beside its caption: on a genre
   page the caption is doing real work, explaining that the bill is fictional
   but the layout is not. */
.ps-genre-example {
    display: flex; gap: 1.4rem; align-items: flex-start; margin: 2.5rem 0 0; max-width: 1180px;
    background: #0f0f0f; border: 1px solid #242424; border-radius: 6px; padding: 1.2rem;
}
.ps-genre-example img { width: 190px; height: auto; flex-shrink: 0; border-radius: 3px; box-shadow: 0 6px 20px rgba(0,0,0,.55); }
.ps-genre-example figcaption { color: #8f8f8f; font-size: .88rem; line-height: 1.65; }
.ps-genre-example figcaption strong { color: #ddd; }

.ps-below { max-width: 1180px; }
.ps-genre-extra { margin-top: 3.5rem; border-top: 1px solid #222; padding-top: 2.5rem; }
.ps-genre-extra h2 {
    color: #fff; font-size: 1rem; text-transform: uppercase; letter-spacing: .08em;
    border-left: 4px solid #ff0000; padding-left: .75rem; margin: 0 0 1rem;
}
.ps-genre-extra h2 + .bng-genres, .ps-genre-extra ul + h2 { margin-bottom: 2rem; }
.ps-genre-extra .bng-genres { margin-bottom: 2.2rem; }
.ps-genre-note { color: #8f8f8f; font-size: .88rem; line-height: 1.6; margin: 0 0 1rem; }
.ps-genre-events { list-style: none; padding: 0; margin: 0 0 1rem; }
.ps-genre-events li { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; border-bottom: 1px solid #1e1e1e; padding: .7rem 0; }
.ps-genre-events a { color: #eee; text-decoration: none; font-size: .93rem; }
.ps-genre-events a:hover { color: #ff4d4d; }
.ps-genre-events span { color: #7d7d7d; font-size: .8rem; }
.ps-genre-all { display: inline-block; color: #ff4d4d; font-size: .85rem; font-weight: 700; text-decoration: none; margin-bottom: 2.2rem; }
.ps-genre-all:hover { text-decoration: underline; }

.ps-seo { margin-top: 4rem; border-top: 1px solid #222; padding-top: 2.5rem; }
.ps-seo h2 { color: #fff; font-family: 'Inter', system-ui, sans-serif; font-weight: 800; letter-spacing: -0.02em; font-size: 1.5rem; margin-bottom: 1rem; }
.ps-seo h3 { color: #eee; font-size: 1rem; margin: 1.6rem 0 .5rem; }
.ps-seo p, .ps-seo li { color: #9a9a9a; line-height: 1.7; font-size: .93rem; }
.ps-seo ul { padding-left: 1.2rem; }
.ps-seo p + p { margin-top: .9rem; }
.ps-seo a { color: #ff4d4d; }

/* ---- smaller screens --------------------------------------------------------------------- */

/* A laptop keeps three panes, with slimmer rails. */
@media (max-width: 1439px) {
    .ps-editor { grid-template-columns: 290px minmax(0, 1fr) 320px; gap: .7rem; }
}

/* Both rails in one column beside a sticky poster. */
@media (max-width: 1199px) {
    .ps-editor { grid-template-columns: minmax(300px, 380px) minmax(0, 1fr); height: auto; min-height: 0; align-items: start; }
    .ps-rail { grid-column: 1; }
    .ps-rail-body { overflow: visible; }
    .ps-stage { grid-column: 2; grid-row: 1 / span 2; position: sticky; top: 90px; height: calc(100vh - 104px); min-height: 520px; }
}

/* One column, poster first. */
@media (max-width: 899px) {
    .ps-wrap { margin-top: 84px; padding: 0 .75rem; }
    .ps-editor { display: flex; flex-direction: column; align-items: stretch; }
    .ps-stage { order: -1; position: static; height: auto; min-height: 0; }
    .ps-canvas-box { flex: 0 0 auto; padding: .8rem; }
    /* Room for a few rows of versions over a poster only a screen tall. */
    .ps-canvas-box.has-versions { min-height: 78vh; }
    .ps-versions-grid { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: .7rem .6rem; }
}

@media (max-width: 640px) {
    .ps-genre-example { flex-direction: column; }
    .ps-genre-example img { width: 100%; max-width: 260px; align-self: center; }
}
