/* ==========================================================================
   Reel Studio kit, part 3 (find): Find viral videos (RSK.FindBoard) and the "reference picked" strip (RSK.FindPick).
   Builds on system.css ("Graphite"): the same tokens, radii, type sizes (13/14/15/17/20/32), glass recipe, and its
   .btn / .segmented / .switch / .chip / .tip / .toast / .progress / .rsk-badge / .rsk-state / .rsk-skel / .rsk-modal.
   Every class here starts with rskf- so nothing in system.css, media.css or the core kit is overridden.
   One new value (reason in notes-find.md): --rskf-search-h, the 48 px topic box.
   ========================================================================== */
:root { --rskf-search-h: 48px; }

/* ---------- shared ---------- */
.rskf { position: relative; min-width: 0; color: var(--fg-2); font: 400 var(--t-15)/1.5 var(--font-sans); }
.rskf *, .rskf *::before, .rskf *::after { box-sizing: border-box; }
.rskf [hidden] { display: none !important; }
.rskf p { margin: 0; }
/* the creators' own words (captions, handles) and what she types: other scripts fall back to a face that has them */
.rskf-ugc-serif { font-family: var(--font-serif), "Noto Serif TC", "PMingLiU", "Yu Mincho", "Batang", serif; }
.rskf-ugc { font-family: var(--font-sans), "Noto Sans TC", "Microsoft JhengHei", "Malgun Gothic", "Yu Gothic UI", "Nirmala UI", "Leelawadee UI", sans-serif; }
.rskf-handle { overflow-wrap: anywhere; }
.rskf a.btn, a.btn.rskf-link { text-decoration: none; }

/* glass: the start box's panel recipe (system.css 18) and the cards' thin frost (system.css 19) */
.rskf-panel { position: relative; border-radius: var(--r-20); background: var(--glass); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); box-shadow: var(--rim-top), var(--shadow-float); }
.rskf-panel::after, .rskf-card::after, .rskf-rtile::after, .rskf-dlg::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none; background: var(--rim);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}

.rskf-sec-title { margin: 0; font-size: var(--t-20); font-weight: 600; line-height: 1.3; color: var(--fg-1); letter-spacing: -0.01em; }
.rskf-tipbtn { display: inline-grid; place-items: center; width: 24px; height: 24px; margin: -3px 0 -3px 2px; border-radius: 50%; color: var(--fg-3); vertical-align: middle; transition: color var(--t-fast) var(--ease), background var(--t-fast) var(--ease); }
.rskf-tipbtn:hover, .rskf-tipbtn:focus-visible { color: var(--fg-1); background: var(--surface-3); }
.rskf-tipbtn .i { width: 16px; height: 16px; }

/* ---------- the board ---------- */
.rskf-board { container: rskf / inline-size; display: flex; flex-direction: column; gap: var(--s-6); }

/* the search card: title, topic box, the English topic words, recent searches */
.rskf-search { width: 100%; max-width: 1480px; display: flex; flex-direction: column; gap: var(--s-4); padding: var(--s-5); }
.rskf-search:focus-within { box-shadow: var(--rim-top), 0 0 0 1px rgba(110, 160, 255, 0.35), var(--shadow-float); }
.rskf-search__head { display: flex; flex-direction: column; gap: 6px; }
.rskf-title { margin: 0; font: 400 var(--t-32)/1.1 var(--font-serif); color: var(--fg-1); letter-spacing: -0.01em; }
.rskf-lede { font-size: var(--t-15); line-height: 1.5; color: var(--fg-2); }
.rskf-form { display: flex; align-items: center; gap: var(--s-2); }
.rskf-field { position: relative; flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: var(--s-3); height: var(--rskf-search-h); padding: 0 6px 0 var(--s-4); border-radius: var(--r-full); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line-2); transition: box-shadow var(--t-fast) var(--ease); }
.rskf-field:focus-within { box-shadow: inset 0 0 0 1px var(--accent-line); }
.rskf-field > .i { width: 20px; height: 20px; color: var(--fg-3); }
.rskf-field input { flex: 1 1 auto; min-width: 0; height: 100%; padding: 0; border: 0; outline: none; background: transparent; color: var(--fg-1); font-size: var(--t-17); }
.rskf-field input::placeholder { color: var(--fg-3); }
.rskf-clear { flex: none; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; color: var(--fg-3); transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease); }
.rskf-clear:hover { background: var(--surface-4); color: var(--fg-1); }
.rskf-go { height: var(--rskf-search-h); min-width: 128px; padding: 0 var(--s-6); font-size: var(--t-15); }
.rskf-go .i { width: 18px; height: 18px; }
.rskf-form__hint { min-height: 20px; margin-top: calc(var(--s-2) * -1); padding: 0 var(--s-4); font-size: var(--t-13); line-height: 1.45; color: var(--warning); }
.rskf-form__hint:empty { display: none; }

.rskf-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); min-width: 0; }
.rskf-row__label { display: inline-flex; align-items: center; min-height: 32px; margin-right: var(--s-1); font-size: var(--t-13); color: var(--fg-3); white-space: nowrap; }
.rskf-word { display: inline-flex; align-items: center; gap: 2px; height: var(--h-32); padding: 0 4px 0 12px; border-radius: var(--r-full); background: var(--surface-3); color: var(--fg-1); font-size: var(--t-14); white-space: nowrap; }
.rskf-word__x { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; color: var(--fg-3); transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease); }
.rskf-word__x:hover { background: var(--surface-4); color: var(--fg-1); }
.rskf-word__x .i { width: 14px; height: 14px; }
.rskf-addword { display: inline-flex; align-items: center; gap: 6px; height: var(--h-32); padding: 0 12px 0 10px; border-radius: var(--r-full); color: var(--fg-2); font-size: var(--t-14); box-shadow: inset 0 0 0 1px var(--line-3); transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease); }
.rskf-addword:hover { background: var(--surface-3); color: var(--fg-1); }
.rskf-addword .i { width: 16px; height: 16px; }
.rskf-wordin { width: 220px; max-width: 100%; height: var(--h-32); padding: 0 12px; border-radius: var(--r-full); border: 1px solid var(--accent-line); background: var(--well); color: var(--fg-1); font-size: var(--t-14); outline: none; }
.rskf-wordin::placeholder { color: var(--fg-3); }
.rskf-words__hint { flex: 1 1 100%; font-size: var(--t-13); line-height: 1.45; color: var(--fg-3); }
.rskf-words__hint.is-warn { color: var(--warning); }
.rskf-words__busy { display: inline-flex; align-items: center; gap: 6px; height: var(--h-32); font-size: var(--t-14); color: var(--fg-2); }
.rskf-words__busy .i { width: 16px; height: 16px; animation: spin 0.9s linear infinite; color: var(--fg-3); }
.rskf-recent-row .chip--control { font-size: var(--t-14); }
.rskf-recent-row .chip--control .rskf-when { color: var(--fg-3); font-weight: 400; }

/* first visit: recent searches as tiles of their three most played covers */
.rskf-first { width: 100%; max-width: 1480px; display: flex; flex-direction: column; gap: var(--s-4); }
.rskf-first__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px var(--s-4); }
.rskf-first__sub { font-size: var(--t-14); color: var(--fg-3); }
.rskf-rtiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(232px, 1fr)); gap: var(--s-4); }
.rskf-rtile { position: relative; display: flex; flex-direction: column; min-width: 0; padding: 0; border-radius: var(--r-14); background: var(--glass-card); -webkit-backdrop-filter: blur(16px) saturate(140%); backdrop-filter: blur(16px) saturate(140%); box-shadow: var(--shadow-card); color: inherit; text-align: left; cursor: pointer; transition: background var(--t-fast) var(--ease), transform var(--t-fast) var(--ease); }
.rskf-rtile:hover { background: var(--glass-card-hover); transform: translateY(-2px); }
.rskf-rtile:focus-visible { outline: 2px solid var(--ring); outline-offset: 3px; }
.rskf-rtile__pics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2px; overflow: hidden; border-radius: var(--r-14) var(--r-14) 0 0; background: #17191E; }
.rskf-rtile__pics img { display: block; width: 100%; aspect-ratio: 9 / 16; object-fit: cover; }
.rskf-rtile__body { display: flex; flex-direction: column; gap: 4px; padding: 12px 16px 14px; }
.rskf-rtile__name { font-size: var(--t-17); font-weight: 600; line-height: 1.3; color: var(--fg-1); }
.rskf-rtile__meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px var(--s-3); font-size: var(--t-13); color: var(--fg-3); }
.rskf-rtile__top { font-size: var(--t-14); color: var(--fg-2); }
.rskf-rtile__top b { color: var(--fg-1); font-weight: 600; }

/* ---------- results ---------- */
.rskf-results { display: flex; flex-direction: column; gap: var(--s-4); min-width: 0; }
.rskf-rhead { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--s-3) var(--s-6); }
.rskf-rhead__titles { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1 1 380px; }
.rskf-rhead__title { margin: 0; font-size: var(--t-20); font-weight: 600; line-height: 1.3; color: var(--fg-1); letter-spacing: -0.01em; }
.rskf-rhead__usual { font-size: var(--t-14); line-height: 1.5; color: var(--fg-2); }
.rskf-rhead__usual b { color: var(--fg-1); font-weight: 600; }
.rskf-rhead__tools { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2) var(--s-3); }
.rskf-ctl { display: inline-flex; align-items: center; gap: var(--s-2); }
.rskf-ctl__label { font-size: var(--t-13); color: var(--fg-3); white-space: nowrap; }
.rskf-count { margin-left: 6px; color: var(--fg-3); font-weight: 400; font-variant-numeric: tabular-nums; }
.segmented button[aria-pressed="true"] .rskf-count { color: var(--fg-2); }
.rskf-toggle { display: inline-flex; align-items: center; gap: var(--s-2); min-height: 32px; padding: 0 4px; font-size: var(--t-14); color: var(--fg-2); cursor: pointer; white-space: nowrap; }
.rskf-toggle:hover { color: var(--fg-1); }

/* the grid: vertical covers; a results grid is uniform on purpose (its covers differ) */
.rskf-grid { --rskf-card-min: clamp(168px, 12.5cqi, 264px); display: grid; grid-template-columns: repeat(auto-fill, minmax(var(--rskf-card-min), 1fr)); gap: var(--s-4); align-items: stretch; }
.rskf-card { position: relative; display: flex; flex-direction: column; min-width: 0; padding: 0; border-radius: var(--r-14); background: var(--glass-card); -webkit-backdrop-filter: blur(16px) saturate(140%); backdrop-filter: blur(16px) saturate(140%); box-shadow: var(--shadow-card); color: inherit; text-align: left; cursor: pointer; transition: background var(--t-fast) var(--ease), transform var(--t-fast) var(--ease); }
.rskf-card:hover { background: var(--glass-card-hover); transform: translateY(-2px); }
.rskf-card:active { transform: none; }
.rskf-card__hit { position: absolute; inset: 0; z-index: 2; width: 100%; height: 100%; padding: 0; border-radius: inherit; background: transparent; cursor: pointer; }
.rskf-card__hit:focus-visible { outline: 2px solid var(--ring); outline-offset: 3px; }
.rskf-card.is-open { background: var(--glass-card-selected); box-shadow: 0 0 0 1px var(--accent), var(--shadow-card); }
.rskf-card__pic { position: relative; display: block; aspect-ratio: 9 / 16; overflow: hidden; border-radius: var(--r-14) var(--r-14) 0 0; background: #17191E; }
.rskf-card__pic img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform var(--t-med) var(--ease); }
.rskf-card:hover .rskf-card__pic img { transform: scale(1.03); }
.rskf-nocover { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end; gap: 6px; padding: 14px; background: repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.025) 0 10px, transparent 10px 20px), #17191E; color: var(--fg-2); font-size: var(--t-14); line-height: 1.45; }
.rskf-nocover b { font-size: var(--t-13); font-weight: 500; color: var(--fg-3); }
.rskf-mark { position: absolute; z-index: 1; display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 9px; border-radius: var(--r-full); background: rgba(8, 9, 12, 0.8); color: #fff; font-size: var(--t-13); font-weight: 500; white-space: nowrap; }
.rskf-mark .i { width: 14px; height: 14px; }
.rskf-mark--top { top: 8px; left: 8px; }
.rskf-mark--saved { top: 8px; right: 8px; }
.rskf-mark--saved .i { color: var(--accent-fg); }
.rskf-card__body { flex: 1 1 auto; display: flex; flex-direction: column; gap: 6px; min-width: 0; padding: 12px 14px 14px; }
.rskf-plays { font-size: var(--t-14); line-height: 1.25; color: var(--fg-2); }
.rskf-plays b { margin-right: 4px; font-size: var(--t-20); font-weight: 600; color: var(--fg-1); letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.rskf-ratio { font-size: var(--t-13); font-weight: 500; line-height: 1.35; color: var(--success); }
.rskf-ratio.is-low { color: var(--fg-3); font-weight: 400; }
.rskf-card__cap { font-size: var(--t-14); line-height: 1.45; color: var(--fg-2); overflow-wrap: anywhere; }
.rskf-card__meta { margin-top: auto; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px var(--s-2); padding-top: 4px; font-size: var(--t-13); line-height: 1.4; color: var(--fg-3); }
.rskf-card__meta .rskf-handle { color: var(--fg-2); }
.rskf-card .rsk-badge { align-self: flex-start; }
.rskf-more { align-self: center; }
/* the results column, and from a 2300 px container the picked Reel pinned beside it (cover 360 + its words) with smaller
   covers in the grid: a huge screen shows many Reels and the one picked, large, without an overlay */
.rskf-rmain { display: flex; flex-direction: column; gap: var(--s-4); min-width: 0; }
.rskf-rcol { display: flex; flex-direction: column; gap: var(--s-4); min-width: 0; }
.rskf-rmain.is-wide { display: grid; grid-template-columns: minmax(0, 1fr) 952px; gap: var(--s-6); align-items: start; }
.rskf-rmain.is-wide .rskf-grid { grid-template-columns: repeat(auto-fill, minmax(168px, 176px)); justify-content: space-between; }
.rskf-pin { position: sticky; top: calc(var(--rsk-top, 0px) + 16px); min-width: 0; }
.rskf-pin .rskf-dlg { --rskf-dlg-h: min(640px, calc(100vh - var(--rsk-top, 0px) - 32px)); width: 100%; grid-template-columns: auto minmax(0, 1fr); animation: none; }
.rskf-empty { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-3); padding: var(--s-5); border-radius: var(--r-14); background: var(--glass-card); box-shadow: inset 0 0 0 1px var(--line-1); font-size: var(--t-15); color: var(--fg-2); }

/* left out of the search: a plain list (the search keeps no cover for these) */
.rskf-left { display: flex; flex-direction: column; gap: var(--s-3); padding-top: var(--s-4); border-top: 1px solid var(--line-1); }
.rskf-left__sub { font-size: var(--t-14); line-height: 1.5; color: var(--fg-3); max-width: 90ch; }
.rskf-left__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.rskf-lrow { display: grid; grid-template-columns: minmax(110px, 140px) minmax(140px, 220px) minmax(0, 1fr) auto; align-items: center; gap: var(--s-2) var(--s-4); padding: 10px 4px; border-top: 1px solid var(--line-1); font-size: var(--t-14); }
.rskf-lrow:first-child { border-top: 0; }
.rskf-lrow__plays { color: var(--fg-2); white-space: nowrap; }
.rskf-lrow__plays b { color: var(--fg-1); font-weight: 600; font-variant-numeric: tabular-nums; }
.rskf-lrow .rskf-handle { color: var(--fg-1); }
.rskf-lrow__what { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.rskf-lrow__why { color: var(--fg-1); }
.rskf-lrow__cap { color: var(--fg-3); font-size: var(--t-13); overflow-wrap: anywhere; }

/* searching: what is being read, then the results */
.rskf-prog { width: 100%; max-width: 760px; display: flex; flex-direction: column; gap: var(--s-4); padding: var(--s-5); }
.rskf-prog__top { display: flex; align-items: flex-start; gap: var(--s-3); }
.rskf-prog__titles { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.rskf-prog__title { margin: 0; font-size: var(--t-20); font-weight: 600; line-height: 1.3; color: var(--fg-1); letter-spacing: -0.01em; }
.rskf-prog__sub { font-size: var(--t-14); color: var(--fg-3); }
.rskf-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--s-3); }
.rskf-step { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: var(--s-3); align-items: start; font-size: var(--t-15); line-height: 1.45; color: var(--fg-3); }
.rskf-step > .i { width: 18px; height: 18px; margin-top: 2px; color: var(--fg-4); }
.rskf-step.is-done { color: var(--fg-2); }
.rskf-step.is-done > .i { color: var(--success); }
.rskf-step.is-now { color: var(--fg-1); }
.rskf-step.is-now > .i { color: var(--accent-fg); animation: spin 0.9s linear infinite; }
.rskf-step b { color: var(--fg-1); font-weight: 600; font-variant-numeric: tabular-nums; }
.rskf-prog .progress__bar { flex: 1 1 auto; width: auto; }
.rskf-prog .progress__fill.is-open { width: 34% !important; animation: rskf-slide 1.6s var(--ease) infinite; }
@keyframes rskf-slide { from { transform: translateX(-100%); } to { transform: translateX(300%); } }
.rskf-skelgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(clamp(168px, 12.5cqi, 264px), 1fr)); gap: var(--s-4); }
.rskf-skel__pic { display: grid; place-items: center; aspect-ratio: 9 / 16; background: var(--surface-2); color: var(--surface-4); }
.rskf-skel__pic .i { width: 40px; height: 40px; stroke-width: 1.25; }
.rskf-skel--search { height: 172px; border-radius: var(--r-20); }
.rskf-loading { display: flex; align-items: center; gap: var(--s-2); font-size: var(--t-15); color: var(--fg-2); }
.rskf-loading .i { width: 18px; height: 18px; color: var(--fg-3); animation: spin 0.9s linear infinite; }

/* nothing found, error */
.rskf-state { width: 100%; max-width: 1480px; }
.rskf-state .rsk-state__text b { color: var(--fg-1); font-weight: 600; }
.rskf-state__icon { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; background: var(--surface-3); color: var(--fg-2); }
.rskf-state__icon .i { width: 22px; height: 22px; }
.rskf-state.is-bad .rskf-state__icon { color: var(--danger, #F28B82); }
.rskf-state__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--s-2); margin-top: var(--s-1); }

/* ---------- compact: the top results only, for an assistant's message or a 380 px panel ---------- */
.rskf-compact { container: rskfc / inline-size; display: flex; flex-direction: column; gap: var(--s-3); padding: var(--s-4); }
.rskf-chead { display: flex; flex-direction: column; gap: 2px; }
.rskf-chead__kicker { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 2px; font-size: var(--t-13); font-weight: 500; color: var(--accent-fg); }
.rskf-chead__kicker .i { width: 14px; height: 14px; }
.rskf-chead__title { margin: 0; font-size: var(--t-17); font-weight: 600; line-height: 1.35; color: var(--fg-1); }
.rskf-chead__meta { font-size: var(--t-14); line-height: 1.45; color: var(--fg-3); }
.rskf-cgrid { display: grid; grid-template-columns: repeat(var(--rskf-n, 3), minmax(0, 1fr)); gap: var(--s-2); align-items: stretch; }
.rskf-card--mini .rskf-card__body { gap: 4px; padding: 10px 12px 12px; }
.rskf-card--mini .rskf-plays b { font-size: var(--t-20); }
.rskf-card--mini .rskf-mark { height: 24px; padding: 0 7px; }
.rskf-cfoot { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2) var(--s-3); }
.rskf-cfoot .rsk-small { flex: 1 1 200px; }

/* ---------- the detail (over the page; inline in the kit gallery) ---------- */
/* .rskf-modal also carries .rsk-modal (the kit's scrim and centring) and .rskf (type); fixed must win over .rskf's relative */
.rskf-modal { position: fixed; inset: 0; z-index: 96; }
.rskf-dlg { --rskf-dlg-h: min(640px, calc(100vh - 32px)); position: relative; display: grid; grid-template-columns: auto minmax(0, 600px); grid-template-rows: var(--rskf-dlg-h); width: fit-content; max-width: 100%; border-radius: var(--r-20); background: var(--glass-strong); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); box-shadow: var(--rim-top), var(--shadow-float); overflow: hidden; animation: pop var(--t-med) var(--ease); }
.rskf-dlg--inline { --rskf-dlg-h: 640px; animation: none; }
.rskf-dlg__pic { position: relative; height: 100%; aspect-ratio: 9 / 16; overflow: hidden; background: #050608; }
.rskf-dlg__pic img { display: block; width: 100%; height: 100%; object-fit: cover; }
.rskf-dlg__info { display: flex; flex-direction: column; gap: var(--s-4); min-height: 0; padding: var(--s-5) var(--s-6) var(--s-6); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--surface-4) transparent; }
.rskf-dlg__top { display: flex; align-items: center; gap: var(--s-2); min-height: 36px; }
.rskf-dlg__who { flex: 1 1 auto; min-width: 0; margin: 0; font-size: var(--t-17); font-weight: 600; line-height: 1.35; color: var(--fg-1); }
.rskf-dlg__nav { display: flex; align-items: center; gap: 2px; flex: none; }
.rskf-dlg__pos { min-width: 64px; padding: 0 4px; font-size: var(--t-13); color: var(--fg-3); text-align: center; white-space: nowrap; font-variant-numeric: tabular-nums; }
.rskf-dlg__big { display: flex; flex-direction: column; gap: 4px; }
.rskf-dlg__plays { font-size: var(--t-17); color: var(--fg-2); line-height: 1.2; }
.rskf-dlg__plays b { margin-right: 6px; font-size: var(--t-32); font-weight: 600; color: var(--fg-1); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.rskf-dlg__big .rskf-ratio { font-size: var(--t-15); }
.rskf-dlg__when { font-size: var(--t-14); color: var(--fg-3); }
.rskf-dlg__big .rsk-badge { align-self: flex-start; margin-top: 4px; }
.rskf-dlg__actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); }
.rskf-dlg__ig { padding: 0 var(--s-3); }
.rskf-dlg__actions .btn[aria-pressed="true"] { background: var(--accent-wash); border-color: var(--accent-line); }
.rskf-dlg__actions .btn[aria-pressed="true"] .i { color: var(--accent-fg); }
.rskf-dlg__next { display: flex; gap: var(--s-2); margin-top: calc(var(--s-2) * -1); font-size: var(--t-13); line-height: 1.45; color: var(--fg-3); }
.rskf-dlg__next .i { width: 16px; height: 16px; margin-top: 1px; flex: none; }
.rskf-facts { display: flex; flex-direction: column; gap: var(--s-3); margin: 0; padding-top: var(--s-4); border-top: 1px solid var(--line-1); }
.rskf-fact { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: var(--s-3); }
.rskf-fact dt { padding-top: 2px; font-size: var(--t-13); line-height: 1.45; color: var(--fg-3); }
.rskf-fact dd { margin: 0; font-size: var(--t-15); line-height: 1.5; color: var(--fg-1); }
.rskf-dlg__sec { display: flex; flex-direction: column; gap: var(--s-2); }
.rskf-dlg__h { margin: 0; font-size: var(--t-14); font-weight: 600; color: var(--fg-1); }
.rskf-dlg__why { font-size: var(--t-15); line-height: 1.55; color: var(--fg-2); }
.rskf-capwell { max-height: 220px; overflow-y: auto; padding: 12px 14px; border-radius: var(--r-14); background: var(--well); box-shadow: inset 0 0 0 1px var(--line-1); font-size: var(--t-14); line-height: 1.55; color: var(--fg-2); white-space: pre-wrap; overflow-wrap: anywhere; scrollbar-width: thin; scrollbar-color: var(--surface-4) transparent; }
@media (max-width: 760px) {
  .rskf-dlg { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto; width: 100%; max-height: calc(100vh - 32px); overflow-y: auto; }
  .rskf-dlg__pic { height: 44vh; justify-self: center; border-radius: 0 0 var(--r-14) var(--r-14); }
  .rskf-dlg__info { overflow: visible; }
}

/* ---------- the reference picked (start box hand-off) ---------- */
.rskf-pick { container: rskfp / inline-size; padding: var(--s-4) var(--s-5) var(--s-4) var(--s-4); }
.rskf-pick__in { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "pics head" "pics body"; grid-template-rows: auto 1fr; gap: var(--s-2) var(--s-5); align-items: start; }
.rskf-pick.is-over { box-shadow: var(--rim-top), 0 0 0 2px var(--accent-line), var(--shadow-float); }
.rskf-pick__pics { grid-area: pics; display: flex; gap: var(--s-3); }
.rskf-pick__fig { margin: 0; display: flex; flex-direction: column; gap: 6px; width: 100px; }
.rskf-pick__img { position: relative; display: block; width: 100px; aspect-ratio: 9 / 16; overflow: hidden; border-radius: var(--r-10); background: #050608; }
.rskf-pick__img img, .rskf-pick__img video { display: block; width: 100%; height: 100%; object-fit: cover; }
.rskf-pick__img::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px var(--line-2); pointer-events: none; }
.rskf-pick__fig figcaption { font-size: var(--t-13); line-height: 1.3; color: var(--fg-3); }
.rskf-pick__head { grid-area: head; display: flex; flex-direction: column; gap: 4px; min-width: 0; padding-top: 2px; }
.rskf-pick__body { grid-area: body; display: flex; flex-direction: column; gap: var(--s-2); min-width: 0; }
.rskf-pick__kicker { font-size: var(--t-13); color: var(--accent-fg); }
.rskf-pick__title { margin: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px var(--s-3); font-size: var(--t-17); font-weight: 600; line-height: 1.35; color: var(--fg-1); }
.rskf-pick__title .rskf-plays { font-weight: 400; }
.rskf-pick__title .rskf-plays b { font-size: var(--t-17); }
.rskf-pick__cap { font-size: var(--t-14); line-height: 1.45; color: var(--fg-2); overflow-wrap: anywhere; }
.rskf-pick__why { font-size: var(--t-14); line-height: 1.5; color: var(--fg-1); max-width: 72ch; }
.rskf-pick__actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); margin-top: var(--s-1); }
.rskf-pick__ok { display: flex; align-items: flex-start; gap: var(--s-2); font-size: var(--t-15); line-height: 1.45; color: var(--fg-1); }
.rskf-pick__ok .i { flex: none; width: 18px; height: 18px; margin-top: 2px; color: var(--success); }
.rskf-pick__bad { display: flex; align-items: flex-start; gap: var(--s-2); font-size: var(--t-14); line-height: 1.45; color: var(--warning); }
.rskf-pick__bad .i { flex: none; width: 16px; height: 16px; margin-top: 2px; }
.rskf-pick__note { font-size: var(--t-13); line-height: 1.45; color: var(--fg-3); }
.rskf-file { position: relative; overflow: hidden; }
.rskf-file input[type=file] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; font-size: 0; }
.rskf-file:has(input:focus-visible) { outline: 2px solid var(--ring); outline-offset: 2px; }
.rskf-pick__x { position: absolute; top: 10px; right: 10px; }
.rskf-pick.has-x .rskf-pick__head { padding-right: 36px; }

/* ---------- toasts without a shell: top right, like the media kit ---------- */
.rskf-toasts { position: fixed; right: 20px; top: 16px; z-index: 100; display: flex; justify-content: flex-end; max-width: calc(100vw - 40px); pointer-events: none; }
.rskf-toasts .toast { pointer-events: auto; border-radius: var(--r-14); padding-top: 8px; padding-bottom: 8px; box-shadow: var(--rim-top), var(--shadow-float); background: var(--glass-strong); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); }
.rskf-toast { max-width: min(560px, calc(100vw - 40px)); }

/* ---------- container sizes: full page, tool page, 380 px panel ---------- */
@container rskf (max-width: 760px) {
  .rskf-rhead__tools { width: 100%; }
  .rskf-lrow { grid-template-columns: minmax(0, 1fr) auto; }
  .rskf-lrow__what { grid-column: 1 / -1; grid-row: 2; }
}
@container rskf (max-width: 560px) {
  .rskf-search { padding: var(--s-4); gap: var(--s-3); }
  .rskf-title { font-size: var(--t-20); font-family: var(--font-sans); font-weight: 600; letter-spacing: -0.01em; }
  .rskf-lede { font-size: var(--t-14); }
  .rskf-go { min-width: 0; width: var(--rskf-search-h); padding: 0; }
  .rskf-go .i { width: 20px; height: 20px; }
  .rskf-go__text { display: none; }
  .rskf-word, .rskf-addword { height: var(--h-28); font-size: var(--t-13); }
  .rskf-recent-row .rskf-when { display: none; }
  .rskf-row__label { flex: 1 1 100%; min-height: 20px; }
  .rskf-grid, .rskf-skelgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-3); }
  .rskf-card__body { padding: 10px 12px 12px; }
  .rskf-plays b { font-size: var(--t-17); }
  .rskf-rhead__tools { flex-direction: column; align-items: stretch; }
  .rskf-ctl { display: flex; flex-direction: column; align-items: stretch; gap: 4px; }
  .rskf-rhead__tools .segmented { align-self: stretch; }
  .rskf-rhead__tools .segmented button { flex: 1 1 0; padding: 0 6px; }
  .rskf-rtiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-3); }
  .rskf-rtile__body { padding: 10px 12px 12px; }
  .rskf-prog { padding: var(--s-4); }
}
@container rskfp (max-width: 520px) {
  .rskf-pick__in { grid-template-areas: "pics head" "body body"; grid-template-rows: auto auto; gap: var(--s-3) var(--s-4); }
  .rskf-pick__fig, .rskf-pick__img { width: 76px; }
  .rskf-pick__title { font-size: var(--t-15); }
  .rskf-pick__title .rskf-plays b { font-size: var(--t-15); }
}
@media (prefers-reduced-motion: reduce) { .rskf-prog .progress__fill.is-open { animation: none; } }
