/* Pinned posts as a stage (2026-11-22, pins-stage.js, record Server/docs/Pinned_Posts_Stage_2026-11-22.md). Loaded after pins.css.
   Look: like the feed cards - the style's corner radius (square in most styles, capped at 10 px), ONE frame of the same thickness on all four sides,
   frame style from the content type (data-frame = aiTodayFeed.frameFor(kind): strong / solid / short-dash / long-dash / none), frame colour = the colour of all
   card frames (--frame-line / --card-line); only special posts get their own colour, priority shared > interaction > game (like the cards).
   Tokens from package 6 (content-tokens.css, 2026-11-22): --type-<kind>-ink for the kind icon, --frame-line, --frame-game, --frame-interaction, --frame-shared;
   thickness --frame-strong / --frame-solid of the style (capped at 4 / 3 px on the small pins). Without content-tokens.css the old kind colours and --game-glow apply.
   Fade: html[data-pin-fade=out] hides every pin over 3 s (fully transparent), html[data-pin-fade=in] shows them at once; a pin that plays stays. */
/* Michael 2026-11-23: the mouse over the rails shows them AT ONCE (no fade-in), leaving them fades them out over 3 s */
:root{--pin-fade-out:3s;--pin-fade-in:0s;--pin-media-opacity:.5}
:is(.pin-item,.pin-drawer-item)[data-type=news]{--pin-type:var(--type-news-ink,var(--type-news,var(--kind-color)))}
:is(.pin-item,.pin-drawer-item)[data-type=products]{--pin-type:var(--type-products-ink,var(--type-products,var(--kind-color)))}
:is(.pin-item,.pin-drawer-item)[data-type=creative]{--pin-type:var(--type-creative-ink,var(--type-creative,var(--kind-color)))}
:is(.pin-item,.pin-drawer-item)[data-type=discussions]{--pin-type:var(--type-discussions-ink,var(--type-discussions,var(--kind-color)))}
:is(.pin-item,.pin-drawer-item)[data-type=opinions]{--pin-type:var(--type-opinions-ink,var(--type-opinions,var(--kind-color)))}
:is(.pin-item,.pin-drawer-item)[data-type=community]{--pin-type:var(--type-community-ink,var(--type-community,var(--kind-color)))}

/* No frame on the pinned posts (Michael 2026-11-23): no border, no dashed outline, no glow. The outline SVG of the markup stays hidden. */
.pin-outline{display:none}
:is(.pin-item,.pin-drawer-item):focus-visible{outline:2px solid var(--accent-text,var(--accent));outline-offset:2px}

/* the post's picture or the playing video behind the text, 50 % opacity; text and controls lie above it */
.pin-media{position:absolute;inset:0;z-index:0;overflow:hidden;opacity:var(--pin-media-opacity);pointer-events:none;container-type:size}
.pin-media:empty{display:none}
.pin-media>:is(img,video){position:absolute;inset:0;width:100%;height:100%;object-fit:cover;display:block}
.pin-media>.pin-video{background:#000}
.pin-media>iframe{position:absolute;top:50%;left:50%;width:max(100cqw,177.78cqh);height:max(100cqh,56.25cqw);transform:translate(-50%,-50%);border:0;pointer-events:none}
.pin-item>:is(.pin-meta,.pin-title),.pin-drawer-item>:is(.pin-drawer-meta,.pin-drawer-post,.pin-controls){position:relative;z-index:1}
/* rails: the buttons sit in the bottom right corner, the title flows around them (pins-stage.js fitTitle: two floats, cut after the last whole word with …) */
.pin-item>.pin-controls{position:absolute;right:6px;bottom:6px;z-index:2;margin:0;min-height:0}
/* Pins list: the buttons in the row's bottom right corner, below the unpin cross (the row keeps 36 px free on the right for both) */
.pin-drawer-item>.pin-controls{position:absolute;right:7px;bottom:7px;z-index:2;margin:0;min-height:0}
.pin-drawer-item:has(>.pin-controls){min-height:66px}
.pin-drawer-item:has(>.pin-controls .pin-control+.pin-control:not(.pin-control-pause):not(.pin-control-stop)){padding-bottom:34px}
.pin-item>.pin-title{display:block;-webkit-line-clamp:none;line-clamp:none}
.pin-title-room{float:right;width:0;height:calc(100% - var(--pin-controls-h,0px))}
.pin-title-gap{float:right;clear:right;width:var(--pin-controls-w,0px);height:var(--pin-controls-h,0px)}
.pin-drawer-item:has(>.pin-media){border:0}
.pin-drawer-item>.pin-drawer-remove{z-index:4}
:is(.pin-item,.pin-drawer-item):is([data-pin-media],.pin-playing) :is(.pin-title,.pin-meta,.pin-drawer-post,.pin-drawer-meta){text-shadow:0 0 2px var(--surface),0 0 6px var(--surface),0 0 10px var(--surface)}

/* a small play button at the bottom RIGHT (Michael 2026-11-23), the main one in the corner, more buttons to its left; while something plays, pause (in the
   corner) and stop take their place - the player itself has no other controls. row-reverse: the first button in the markup is the one in the corner. */
.pin-controls{display:flex;flex:0 0 auto;flex-direction:row-reverse;justify-content:flex-start;align-items:center;gap:4px;min-height:22px;margin-top:auto}
.pin-control{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;width:20px;height:20px;padding:0;border:1px solid color-mix(in srgb,var(--ink) 22%,transparent);border-radius:var(--r-chip,999px);background:color-mix(in srgb,var(--surface) 86%,transparent);color:var(--ink);cursor:pointer;text-decoration:none;box-shadow:none}
.pin-control-main{width:22px;height:22px;border-color:transparent;background:var(--accent-fill,var(--accent));color:var(--button-ink,var(--accent-ink,#fff))}
.pin-control svg{width:11px;height:11px;fill:currentColor;stroke:none}
.pin-control:not(.pin-control-main) svg{fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
.pin-control:is(:hover,:focus-visible){outline:2px solid var(--accent-text,var(--accent));outline-offset:1px}
:is(.pin-item,.pin-drawer-item):not([data-pin-state]) :is(.pin-control-pause,.pin-control-stop){display:none}
:is(.pin-item,.pin-drawer-item)[data-pin-state] .pin-control[data-pin-play]{display:none}
:is(.pin-item,.pin-drawer-item)[data-pin-state] .pin-control-stop svg{fill:currentColor;stroke:none}
.pin-progress{display:none;position:absolute;left:0;right:0;bottom:0;z-index:2;height:2px;pointer-events:none}
:is(.pin-item,.pin-drawer-item)[data-pin-state]>.pin-progress{display:block}
.pin-progress>span{display:block;width:100%;height:100%;background:var(--accent-text,var(--accent));transform:scaleX(0);transform-origin:left center;transition:transform .25s linear}

/* fade: hidden pins are fully transparent after 3 s; the mouse over the rails (or a tap, a keyboard focus, dragging, a new pin) brings both rails back */
:root[data-pin-rails=on] .pin-item{transition:opacity var(--pin-fade-in) ease,background .15s}
:root[data-pin-fade=out] .pin-slot>.pin-item:not(.pin-playing):not(:focus-visible):not(:has(:focus-visible)){opacity:0;transition:opacity var(--pin-fade-out) ease,background .15s}
@media(forced-colors:active){.pin-item::after{border-color:CanvasText}.pin-media{opacity:.25}:root[data-pin-fade=out] .pin-slot>.pin-item:not(.pin-playing):not(:focus-visible):not(:has(:focus-visible)){opacity:1}}
