/* Create Folder tool (mounted inside Profile Studio). Everything is scoped under .cf-tool so nothing leaks into the host page.
   Colours come from the host's own tokens when it has them (Studio), with the DESIGN.md values as the fallback. */
.cf-tool {
  --cf-surface: var(--bg-surface, #0e1118);
  --cf-card: var(--bg-card, #151923);
  --cf-text: var(--text-primary, hsl(0 0% 98%));
  --cf-text-2: var(--text-secondary, hsl(240 5% 75%));
  --cf-muted: var(--text-muted, hsl(240 5% 58%));
  --cf-border: rgba(255, 255, 255, 0.08);
  --cf-accent: var(--accent, #00f5a0);
  --cf-accent-light: #6dfac4;
  --cf-on-accent: #04130d;
  --cf-danger: #ff8f8f;
  --cf-ease: cubic-bezier(0.2, 0, 0, 1);
  color: var(--cf-text);
  font: inherit;
  max-width: 920px;
  margin: 0 auto;
  padding: 8px 4px 72px;
  box-sizing: border-box;
}
.cf-tool *, .cf-tool *::before, .cf-tool *::after { box-sizing: border-box; }
.cf-tool [hidden] { display: none !important; }
.cf-tool .cf-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.cf-tool :focus-visible { outline: 2px solid var(--cf-accent-light); outline-offset: 2px; }

.cf-title { font: 800 clamp(1.6rem, 3.4vw, 2.2rem)/1.1 Outfit, system-ui, sans-serif; margin: 0 0 8px; }
.cf-lede { color: var(--cf-text-2); max-width: 65ch; margin: 0 0 8px; }
.cf-profile { color: var(--cf-accent-light); font-weight: 600; margin: 0 0 24px; min-height: 1.4em; }
.cf-setup-return { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin: -8px 0 24px; padding: 12px 16px; border-radius: 14px; background: rgba(0, 245, 160, 0.07); border: 1px solid rgba(0, 245, 160, 0.3); }
.cf-setup-return[hidden] { display: none; }
.cf-setup-return p { margin: 0; color: var(--cf-text); font-size: 0.92rem; }
.cf-step { margin: 0 0 32px; animation: cf-rise 0.3s var(--cf-ease); }
.cf-h { display: flex; align-items: center; gap: 12px; font: 700 1.15rem Outfit, system-ui, sans-serif; margin: 0 0 14px; }
.cf-sub { font: 700 1rem Outfit, system-ui, sans-serif; margin: 18px 0 10px; }
.cf-n { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--cf-card); border: 1px solid var(--cf-border); font: 700 0.85rem Inter, system-ui, sans-serif; color: var(--cf-text-2); }
.cf-hint { color: var(--cf-muted); font-size: 0.92rem; margin: 0 0 14px; max-width: 65ch; }
.cf-status { color: var(--cf-muted); font-size: 0.9rem; min-height: 1.4em; margin: 8px 0 0; }

.cf-types { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.cf-type, .cf-look, .cf-chip, .cf-row, .cf-mode { font: inherit; color: inherit; cursor: pointer; text-align: left; border: 1px solid var(--cf-border); background: var(--cf-card); border-radius: 14px; transition: border-color 0.2s var(--cf-ease), background 0.2s var(--cf-ease), transform 0.2s var(--cf-ease); }
.cf-type { padding: 16px; display: flex; flex-direction: column; gap: 4px; min-height: 84px; }
.cf-type strong { font: 700 1.05rem Outfit, system-ui, sans-serif; }
.cf-type span { color: var(--cf-muted); font-size: 0.85rem; }
.cf-type:hover, .cf-look:hover, .cf-chip:hover, .cf-row:hover, .cf-mode:hover { border-color: rgba(0, 245, 160, 0.35); transform: translateY(-1px); }
.cf-type[aria-checked="true"], .cf-look[aria-checked="true"], .cf-chip[aria-checked="true"], .cf-chip[aria-pressed="true"], .cf-row[aria-checked="true"], .cf-mode[aria-pressed="true"] { border-color: rgba(0, 245, 160, 0.6); background: rgba(0, 245, 160, 0.07); }

.cf-search { position: relative; max-width: 560px; }
.cf-input { width: 100%; min-height: 48px; padding: 0 16px; border-radius: 12px; border: 1px solid var(--cf-border); background: var(--cf-surface); color: var(--cf-text); font: inherit; }
.cf-input:focus { border-color: rgba(0, 245, 160, 0.6); outline: none; box-shadow: 0 0 0 3px rgba(0, 245, 160, 0.15); }
.cf-results { position: absolute; z-index: 5; left: 0; right: 0; margin: 6px 0 0; padding: 6px; list-style: none; background: var(--cf-surface); border: 1px solid var(--cf-border); border-radius: 14px; max-height: 360px; overflow: auto; box-shadow: 0 18px 40px rgba(0, 0, 0, 0.5); }
.cf-result { display: flex; align-items: center; gap: 12px; padding: 8px 10px; min-height: 52px; border-radius: 10px; cursor: pointer; }
.cf-result[aria-selected="true"], .cf-result:hover { background: rgba(255, 255, 255, 0.06); }
.cf-thumb { width: 40px; height: 40px; border-radius: 8px; background: var(--cf-card) center / contain no-repeat; flex: none; }
.cf-result-main { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.cf-result-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cf-result-sub { color: var(--cf-muted); font-size: 0.82rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cf-badge { font-size: 0.75rem; font-weight: 600; color: var(--cf-text-2); border: 1px solid var(--cf-border); border-radius: 999px; padding: 2px 10px; white-space: nowrap; }
.cf-badge-accent { color: var(--cf-accent-light); border-color: rgba(0, 245, 160, 0.45); }
/* Kaptain already makes this one: its own folder is offered instead of a copy. */
.cf-official-card { display: flex; gap: 16px; align-items: center; padding: 14px; border: 1px solid var(--cf-border); border-radius: 16px; background: rgba(255, 255, 255, 0.03); margin-bottom: 14px; }
.cf-official-card .cf-hint { margin: 6px 0 0; }
.cf-official-art { position: relative; flex: 0 0 auto; width: 120px; border-radius: 12px; overflow: hidden; }
.cf-official-art[data-shape="portrait"] { width: 88px; }
.cf-official-art img { display: block; width: 100%; height: auto; }
.cf-official-hover { position: absolute; inset: 0; opacity: 0; transition: opacity 0.2s; }
.cf-official-art:hover .cf-official-hover { opacity: 1; }
.cf-result[aria-disabled="true"] { opacity: 0.55; cursor: not-allowed; }
.cf-gated { margin-top: 12px; padding: 14px; border: 1px solid rgba(255, 212, 121, 0.45); border-radius: 14px; background: rgba(255, 212, 121, 0.06); }
.cf-gated p { margin: 0 0 10px; }
.cf-masked { -webkit-text-security: disc; }
.cf-gated-row { display: flex; gap: 10px; flex-wrap: wrap; }
.cf-gated-row .cf-input { flex: 1 1 200px; min-height: 44px; }
@media (max-width: 520px) { .cf-official-card { flex-direction: column; align-items: flex-start; } }
.cf-picked { display: flex; align-items: center; gap: 12px; margin-top: 14px; padding: 10px 14px; border: 1px solid rgba(0, 245, 160, 0.4); border-radius: 14px; background: rgba(0, 245, 160, 0.06); max-width: 560px; }
.cf-picked .cf-thumb { width: 48px; height: 48px; }
.cf-picked button { margin-left: auto; }

.cf-looks { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.cf-look { padding: 8px; display: flex; flex-direction: column; gap: 8px; }
.cf-look-img { aspect-ratio: 16 / 9; border-radius: 8px; background: var(--cf-surface) center / cover no-repeat; }
.cf-look[data-shape="portrait"] .cf-look-img { aspect-ratio: 2 / 3; }
.cf-look-name { font-weight: 600; font-size: 0.9rem; padding: 0 2px 2px; }
.cf-ratio { display: flex; gap: 8px; margin-top: 16px; }
.cf-chip { min-height: 44px; padding: 0 18px; font-weight: 600; }

.cf-preview-wrap { display: grid; grid-template-columns: minmax(180px, 340px) 1fr; gap: 24px; align-items: start; }
.cf-preview-col { display: flex; flex-direction: column; gap: 10px; align-items: stretch; }
.cf-callout { display: flex; gap: 10px; align-items: flex-start; margin: 0; padding: 10px 12px; border-radius: 12px; border: 1px solid rgba(0, 245, 160, 0.45); background: rgba(0, 245, 160, 0.08); color: var(--cf-text); font-size: 0.88rem; line-height: 1.4; pointer-events: none; }
.cf-callout svg { flex: none; margin-top: 2px; color: var(--cf-accent-light); }
.cf-preview { position: relative; display: grid; place-items: center; border-radius: 14px; border: 1px solid var(--cf-border); background: var(--cf-surface); min-height: 200px; padding: 10px; overflow: hidden; cursor: zoom-in; }
.cf-prev-img { grid-area: 1 / 1; max-width: 100%; max-height: 420px; border-radius: 10px; display: block; transition: opacity 0.25s var(--cf-ease); }
.cf-prev-hover { opacity: 0; }
.cf-preview:hover .cf-prev-hover, .cf-preview:focus-visible .cf-prev-hover, .cf-preview.is-hover .cf-prev-hover { opacity: 1; }
.cf-preview:hover .cf-prev-cover, .cf-preview:focus-visible .cf-prev-cover, .cf-preview.is-hover .cf-prev-cover { opacity: 0; }
.cf-hover-toggle { align-self: flex-start; }
.cf-create-side { display: flex; flex-direction: column; gap: 14px; align-items: flex-start; }
.cf-primary, .cf-secondary { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 24px; border-radius: 12px; font: 700 1rem Inter, system-ui, sans-serif; text-decoration: none; cursor: pointer; border: 1px solid transparent; }
.cf-primary { background: var(--cf-accent); color: var(--cf-on-accent); }
.cf-primary:hover:not(:disabled) { background: var(--cf-accent-light); }
.cf-primary:disabled { opacity: 0.45; cursor: not-allowed; }
.cf-secondary { background: transparent; color: var(--cf-text); border-color: var(--cf-border); }
.cf-secondary:hover { border-color: rgba(0, 245, 160, 0.4); }
.cf-link-btn { background: none; border: 0; color: var(--cf-text-2); cursor: pointer; font: inherit; text-decoration: underline; min-height: 44px; padding: 0 8px; }
.cf-error { color: var(--cf-danger); margin: 10px 0 0; max-width: 60ch; }
.cf-working { display: flex; align-items: center; gap: 12px; margin: 14px 0 0; padding: 12px 14px; max-width: 60ch; border-radius: 12px; border: 1px solid rgba(0, 245, 160, 0.35); background: rgba(0, 245, 160, 0.06); color: var(--cf-accent-light); font-weight: 600; }
.cf-working[hidden] { display: none; }
.cf-spin { flex: none; width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(0, 245, 160, 0.3); border-top-color: var(--cf-accent-light); animation: cf-spin 0.8s linear infinite; }
@keyframes cf-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .cf-spin { animation-duration: 2.4s; } }
.cf-actions { display: flex; flex-wrap: wrap; gap: 12px; }

.cf-rows { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.cf-row { padding: 14px 16px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; min-height: 64px; }
.cf-row-title { font-weight: 700; flex: 1 1 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cf-row-meta { color: var(--cf-muted); font-size: 0.82rem; }
.cf-row.is-suggested { border-color: rgba(0, 245, 160, 0.45); }
.cf-positions { margin-top: 8px; }
.cf-modes { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.cf-mode { padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; min-height: 76px; }
.cf-mode strong { font: 700 1rem Outfit, system-ui, sans-serif; }
.cf-mode span { color: var(--cf-muted); font-size: 0.82rem; line-height: 1.35; }
.cf-slots { list-style: none; margin: 16px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; max-width: 480px; }
.cf-slot { width: 100%; min-height: 40px; border-radius: 10px; border: 1px dashed rgba(0, 245, 160, 0.5); background: rgba(0, 245, 160, 0.05); color: var(--cf-accent-light); font: 600 0.9rem Inter, system-ui, sans-serif; cursor: pointer; }
.cf-slot:hover { background: rgba(0, 245, 160, 0.12); }
.cf-slot-folder { padding: 8px 12px; border-radius: 10px; background: var(--cf-card); border: 1px solid var(--cf-border); }

/* ---- your pick in every look: the hover shows on mouse-over or keyboard focus ---- */
.cf-look-img { position: relative; overflow: hidden; }
.cf-look-hover { position: absolute; inset: 0; background: center / cover no-repeat; opacity: 0; transition: opacity 0.25s var(--cf-ease); }
.cf-look:hover .cf-look-hover, .cf-look:focus-visible .cf-look-hover { opacity: 1; }
.cf-look[data-own="1"] .cf-look-img { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08); }

/* ---- several at once ---- */
.cf-check { display: flex; align-items: center; gap: 10px; margin: 14px 0 0; color: var(--cf-text-2); font-size: 0.92rem; cursor: pointer; min-height: 44px; }
.cf-check input { width: 18px; height: 18px; accent-color: var(--cf-accent); }
.cf-presets { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 8px; }
.cf-cart { display: flex; flex-wrap: wrap; gap: 8px; }
.cf-cart-item { display: inline-flex; align-items: center; gap: 8px; padding: 4px 6px 4px 8px; border: 1px solid rgba(0, 245, 160, 0.4); border-radius: 999px; background: rgba(0, 245, 160, 0.06); }
.cf-cart-item .cf-thumb { width: 28px; height: 28px; }
.cf-cart-item .cf-link-btn { min-height: 32px; font-size: 0.8rem; }
.cf-picked:has(.cf-cart) { max-width: none; }

/* ---- your creations ---- */
.cf-shelf-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px; }
.cf-shelf-item { font: inherit; color: inherit; cursor: pointer; display: flex; flex-direction: column; gap: 6px; padding: 8px; text-align: left; border: 1px solid var(--cf-border); background: var(--cf-card); border-radius: 12px; transition: border-color 0.2s var(--cf-ease), transform 0.2s var(--cf-ease); }
.cf-shelf-item:hover { border-color: rgba(0, 245, 160, 0.35); transform: translateY(-1px); }
.cf-shelf-art { aspect-ratio: 2 / 3; border-radius: 8px; background: var(--cf-surface) center / cover no-repeat; }
.cf-shelf-name { font-size: 0.82rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---- custom lists ---- */
.cf-label { display: block; margin: 16px 0 6px; font-size: 0.88rem; font-weight: 600; color: var(--cf-text-2); }
.cf-status[data-kind="error"] { color: var(--cf-danger); }
.cf-status[data-kind="ok"] { color: var(--cf-accent-light); }
.cf-posters, .cf-poster-results { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.cf-poster { display: inline-flex; flex-direction: column; align-items: center; gap: 2px; }
.cf-poster img, .cf-poster-pick img { width: 64px; height: 96px; object-fit: cover; border-radius: 8px; display: block; }
.cf-poster-pick { padding: 0; border: 2px solid transparent; border-radius: 10px; background: none; cursor: pointer; }
.cf-poster-pick:hover, .cf-poster-pick:focus-visible { border-color: var(--cf-accent); }
.cf-list-art { margin-top: 18px; }
.cf-list-art .cf-actions { margin-top: 10px; }
.cf-self { margin-top: 14px; padding: 14px; border: 1px solid var(--cf-border); border-radius: 14px; background: var(--cf-card); }
.cf-credit { max-width: 320px; }
.cf-note { color: var(--cf-accent-light); }
.cf-nudge { margin: 22px 0 0; max-width: 62ch; color: var(--cf-muted); font-size: 0.9rem; }
.cf-nudge a { color: var(--cf-accent-light); }
.cf-secondary { text-decoration: none; }

/* ---- people: connect TMDB / Trakt, or send for review ---- */
.cf-person-lists { margin: 6px 0 18px; padding: 14px; border: 1px solid var(--cf-border); border-radius: 14px; background: var(--cf-card); }
.cf-conn-row { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.cf-conn-name { font-weight: 600; min-width: 170px; }
.cf-trakt-note { font-size: 0.85rem; }
.cf-trakt-note a { color: var(--cf-accent-light); }
.cf-adv { margin-top: 12px; }
.cf-adv summary { cursor: pointer; color: var(--cf-text-2); min-height: 36px; display: flex; align-items: center; }
.cf-adv .cf-chip { margin-top: 8px; }
.cf-queued-items { display: flex; flex-direction: column; gap: 14px; margin: 14px 0; }
.cf-queued-item { display: flex; gap: 14px; align-items: flex-start; }
.cf-queued-item img { width: 110px; border-radius: 10px; display: block; }
textarea.cf-input { height: auto; padding: 10px 14px; margin-top: 10px; font: 0.8rem/1.4 ui-monospace, monospace; }

/* ---- the screen after a folder is saved ---- */
.cf-success { display: grid; grid-template-columns: minmax(150px, 280px) 1fr; gap: 32px; align-items: center; padding: 28px; border: 1px solid rgba(0, 245, 160, 0.25); border-radius: 20px; background: linear-gradient(160deg, rgba(0, 245, 160, 0.07), rgba(255, 255, 255, 0.02) 55%); }
.cf-success-art { position: relative; min-height: 220px; display: grid; place-items: center; }
.cf-success-art[data-shape="landscape"] { min-height: 160px; }
.cf-success-img { grid-area: 1 / 1; width: min(100%, 210px); border-radius: 14px; box-shadow: 0 14px 30px rgba(0, 0, 0, 0.55); transform: translate(calc(var(--i) * 22px), calc(var(--i) * 14px)) rotate(calc(var(--i) * 4deg - 2deg)); }
.cf-success-art[data-shape="landscape"] .cf-success-img { width: min(100%, 270px); }
.cf-success-placeholder { width: 150px; height: 220px; border-radius: 14px; border: 1px dashed var(--cf-border); background: var(--cf-card); }
.cf-success-main { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.cf-success-badge { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 999px; background: rgba(0, 245, 160, 0.14); color: var(--cf-accent-light); font-weight: 700; font-size: 0.82rem; }
.cf-success-title { margin: 0; font: 800 clamp(1.5rem, 3vw, 2rem)/1.15 Outfit, system-ui, sans-serif; }
.cf-success-text { margin: 0; color: var(--cf-text-2); font-size: 1.02rem; max-width: 52ch; }
.cf-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; margin: 4px 0; }
.cf-facts div { padding: 10px 12px; border-radius: 12px; background: rgba(255, 255, 255, 0.04); border: 1px solid var(--cf-border); min-width: 0; }
.cf-facts dt { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--cf-muted); }
.cf-facts dd { margin: 2px 0 0; font-weight: 600; overflow-wrap: anywhere; }
.cf-note-box { margin: 0; padding: 10px 14px; border-radius: 12px; border: 1px solid rgba(0, 245, 160, 0.35); background: rgba(0, 245, 160, 0.06); color: var(--cf-text); font-size: 0.92rem; }
.cf-next { margin-top: 24px; max-width: 66ch; }
.cf-next ol { margin: 8px 0 0; padding-left: 1.3em; color: var(--cf-text-2); display: grid; gap: 8px; }
@media (max-width: 640px) { .cf-success { grid-template-columns: 1fr; padding: 18px; gap: 18px; } .cf-success-art { min-height: 180px; } }

/* inside Profile Studio the page already has its title, so the tool does not repeat it */
.cf-embedded .cf-title { display: none; }
.cf-embedded .cf-head { margin-bottom: 4px; }

/* token boxes look like password boxes without being password fields (a real password field makes the browser autofill the box above it) */
.cf-secret { -webkit-text-security: disc; text-security: disc; }
.cf-credit-box { margin: 0 0 18px; padding: 14px; border: 1px solid var(--cf-border); border-radius: 14px; background: var(--cf-card); }
.cf-credit-box .cf-sub { margin-top: 0; }
.cf-rules a { color: var(--cf-accent-light); }
.cf-tabs { display: flex; gap: 8px; margin: 0 0 20px; flex-wrap: wrap; }
/* ---- My curations ---- */
.cf-count { color: var(--cf-muted); font-weight: 500; }
.cf-cur-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; margin-top: 12px; }
.cf-cur { display: flex; gap: 12px; padding: 12px; border: 1px solid var(--cf-border); border-radius: 14px; background: var(--cf-card); min-width: 0; }
.cf-cur-art { flex: none; width: 74px; aspect-ratio: 2 / 3; border-radius: 10px; background: var(--cf-surface) center / cover no-repeat; border: 1px solid var(--cf-border); }
.cf-cur-body { display: flex; flex-direction: column; gap: 8px; min-width: 0; flex: 1; }
.cf-cur-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cf-cur-meta { display: flex; flex-wrap: wrap; gap: 6px; }
.cf-cur-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin-top: auto; }
.cf-cur-actions .cf-chip { min-height: 36px; padding: 0 14px; font-size: 0.85rem; }
.cf-cur-actions .cf-link-btn { min-height: 36px; font-size: 0.85rem; }
.cf-badge.cf-status-live { color: #04130d; background: var(--cf-accent); border-color: transparent; }
.cf-badge.cf-status-ok { color: var(--cf-accent-light); border-color: rgba(0, 245, 160, 0.5); }
.cf-badge.cf-status-wait { color: #ffd479; border-color: rgba(255, 212, 121, 0.45); }
.cf-badge.cf-status-no { color: var(--cf-danger); border-color: rgba(255, 143, 143, 0.45); }
/* ---- custom discover stage: the Setup Wizard's pattern (a rail that says where you are, one decision on the stage) ---- */
.cf-tool { --cf-accent-rgb: var(--k-mint-rgb, 0, 245, 160); --cf-bg: var(--bg-base, #08090d); accent-color: var(--cf-accent); caret-color: var(--cf-accent); scrollbar-color: rgba(255, 255, 255, 0.18) transparent; }
.cf-tool ::selection { background: rgba(var(--cf-accent-rgb), 0.32); color: var(--cf-text); }
.cf-tool.is-staged .cf-lede, .cf-tool.is-staged .cf-tabs { display: none; }
.dw { display: grid; gap: 26px; align-items: start; }
.dw-title { font: 800 clamp(1.55rem, 3.2vw, 2.15rem)/1.12 Outfit, system-ui, sans-serif; letter-spacing: -0.02em; text-wrap: balance; margin: 0 0 10px; outline: none; }
.dw-lede { color: var(--cf-text-2); max-width: 34ch; text-wrap: pretty; margin: 0; line-height: 1.5; }
.dw-phases { list-style: none; margin: 26px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.dw-phases li { display: grid; gap: 8px; color: var(--cf-muted); font-size: 0.8rem; }
.dw-pdot { height: 4px; border-radius: 3px; background: rgba(255, 255, 255, 0.1); transition: background 0.35s var(--cf-ease), box-shadow 0.35s var(--cf-ease); }
.dw-phases .is-done .dw-pdot { background: rgba(var(--cf-accent-rgb), 0.45); }
.dw-phases .is-done { color: var(--cf-text-2); }
.dw-phases .is-now .dw-pdot { background: var(--cf-accent); box-shadow: 0 0 14px -2px rgba(var(--cf-accent-rgb), 0.55); }
.dw-phases .is-now { color: var(--cf-text); font-weight: 700; }
.dw-count { color: var(--cf-muted); font-size: 0.82rem; margin: 12px 0 0; font-variant-numeric: tabular-nums; }
.dw-live { margin-top: 22px; }
.dw-live:empty { display: none; }
.dw-live-line { margin: 0 0 12px; color: var(--cf-text-2); line-height: 1.45; }
.dw-live-line strong { color: var(--cf-text); font-variant-numeric: tabular-nums; }
.dw-live-posters { display: flex; }
.dw-live-posters img { width: 46px; height: 69px; object-fit: cover; border-radius: 7px; border: 2px solid var(--cf-bg); background: var(--cf-card); }
.dw-live-posters img + img { margin-left: -12px; }
.dw-main { min-width: 0; }
.dw-pane { max-width: 640px; }
.dw-in { animation: dw-in 0.3s var(--cf-ease); }
.dw[data-dir="back"] .dw-in { animation-name: dw-in-back; }
@keyframes dw-in { from { opacity: 0; transform: translateX(18px); } to { opacity: 1; transform: none; } }
@keyframes dw-in-back { from { opacity: 0; transform: translateX(-18px); } to { opacity: 1; transform: none; } }
.dw-opts { display: grid; gap: 12px; }
.dw-opt { font: inherit; color: inherit; cursor: pointer; text-align: left; width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 72px; padding: 16px 20px; border: 1px solid var(--cf-border); border-radius: 14px; background: var(--cf-card); transition: border-color 0.2s var(--cf-ease), background 0.2s var(--cf-ease), transform 0.2s var(--cf-ease); }
.dw-opt:hover { border-color: rgba(var(--cf-accent-rgb), 0.4); transform: translateY(-1px); }
.dw-opt[aria-checked="true"] { border-color: rgba(var(--cf-accent-rgb), 0.65); background: rgba(var(--cf-accent-rgb), 0.07); }
.dw-opt-text { display: grid; gap: 4px; }
.dw-opt-text strong { font: 700 1.05rem Outfit, system-ui, sans-serif; }
.dw-opt-text span { color: var(--cf-muted); font-size: 0.9rem; }
.dw-opt-mark { flex: none; width: 22px; height: 22px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, 0.2); transition: border-color 0.2s var(--cf-ease), background 0.2s var(--cf-ease), box-shadow 0.2s var(--cf-ease); }
.dw-opt[aria-checked="true"] .dw-opt-mark { border-color: var(--cf-accent); background: var(--cf-accent); box-shadow: inset 0 0 0 4px var(--cf-card); }
.dw-opt-main { background: rgba(var(--cf-accent-rgb), 0.07); border-color: rgba(var(--cf-accent-rgb), 0.4); }
.dw-opt-go { flex: none; width: 22px; height: 22px; background: var(--cf-accent); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6'/%3E%3C/svg%3E") center / contain no-repeat; }
.dw-group { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 14px; }
.dw-chip { min-height: 40px; padding: 0 16px; font-size: 0.92rem; }
.dw-recipe { display: grid; gap: 2px; align-content: center; min-height: 58px; padding: 8px 16px; }
.dw-recipe small { color: var(--cf-muted); font-size: 0.78rem; font-weight: 400; }
.dw-chip.is-out { border-color: rgba(255, 143, 143, 0.55); background: rgba(255, 143, 143, 0.08); color: var(--cf-danger); text-decoration: line-through; text-decoration-thickness: 1px; }
.dw-seg { display: inline-flex; padding: 4px; gap: 4px; border: 1px solid var(--cf-border); border-radius: 14px; background: var(--cf-surface); margin: 0 0 6px; }
.dw-seg-btn { font: 600 0.92rem Inter, system-ui, sans-serif; color: var(--cf-text-2); min-height: 40px; padding: 0 18px; border: 0; border-radius: 10px; background: transparent; cursor: pointer; transition: background 0.2s var(--cf-ease), color 0.2s var(--cf-ease); }
.dw-seg-btn[aria-checked="true"] { background: rgba(var(--cf-accent-rgb), 0.16); color: var(--cf-text); }
.dw-sum { min-height: 1.4em; }
.dw-first { margin-top: 0; }
.cf-back { margin: 0 0 14px; min-height: 40px; padding: 0 18px; }
/* ---- the folder's backdrop ---- */
.cf-bd { margin: 0 0 18px; }
.cf-bd-preview { display: grid; place-items: center; min-height: 72px; border: 1px solid var(--cf-border); border-radius: 14px; background: var(--cf-surface); overflow: hidden; }
.cf-bd-img { display: block; width: 100%; height: auto; }
.cf-bd-choices { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 4px; }
.cf-bd-choice { padding: 0; border: 2px solid transparent; border-radius: 10px; overflow: hidden; background: var(--cf-card); cursor: pointer; transition: border-color 0.2s var(--cf-ease); }
.cf-bd-choice img { display: block; width: 132px; height: 74px; object-fit: cover; }
.cf-bd-choice:hover { border-color: rgba(var(--cf-accent-rgb), 0.45); }
.cf-bd-choice[aria-pressed="true"] { border-color: var(--cf-accent); }
@media (prefers-reduced-motion: reduce) { .cf-bd-choice { transition: none; } }
/* ---- the cover editor: the preview is the focal point and stays in view while the controls scroll ---- */
.cf-design-entry { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin: 14px 0 0; }
.cf-design-entry .cf-hint { margin: 0; flex: 1 1 260px; }
.cf-dz { display: grid; gap: 24px; align-items: start; }
.cf-dz-preview { display: grid; place-items: center; padding: 14px; border: 1px solid var(--cf-border); border-radius: 16px; background: var(--cf-surface); }
.cf-dz-preview canvas { max-width: 100%; max-height: 62vh; width: auto; height: auto; border-radius: 10px; display: block; background: var(--cf-card); }
.cf-dz-preview[data-shape="landscape"] canvas { width: 100%; }
.cf-dz-face { display: flex; gap: 8px; margin: 12px 0 0; }
.cf-dz-group { margin: 0 0 22px; padding: 0; border: 0; min-width: 0; }
.cf-dz-group legend { font: 700 1.05rem Outfit, system-ui, sans-serif; padding: 0; margin: 0 0 10px; }
.cf-dz-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 12px; }
.cf-dz-chips .cf-chip { min-height: 40px; padding: 0 14px; font-size: 0.9rem; }
.cf-dz-group input[type="range"] { width: 100%; min-height: 32px; margin: 0 0 6px; }
.cf-dz-group input[type="color"] { width: 64px; height: 44px; padding: 2px; border: 1px solid var(--cf-border); border-radius: 10px; background: var(--cf-surface); cursor: pointer; }
.cf-dz-anchor { display: grid; grid-template-columns: repeat(3, 44px); gap: 6px; margin: 4px 0 14px; padding: 8px; width: max-content; border: 1px solid var(--cf-border); border-radius: 12px; background: var(--cf-surface); }
.cf-dz-anchor-btn { width: 44px; height: 44px; border-radius: 8px; border: 1px solid var(--cf-border); background: var(--cf-card); cursor: pointer; position: relative; transition: border-color 0.2s var(--cf-ease), background 0.2s var(--cf-ease); }
.cf-dz-anchor-btn::after { content: ""; position: absolute; inset: 15px; border-radius: 50%; background: rgba(255, 255, 255, 0.28); transition: background 0.2s var(--cf-ease), transform 0.2s var(--cf-ease); }
.cf-dz-anchor-btn:hover { border-color: rgba(var(--cf-accent-rgb), 0.45); }
.cf-dz-anchor-btn[aria-pressed="true"] { border-color: rgba(var(--cf-accent-rgb), 0.7); background: rgba(var(--cf-accent-rgb), 0.1); }
.cf-dz-anchor-btn[aria-pressed="true"]::after { background: var(--cf-accent); transform: scale(1.25); }
.cf-dz-bdres { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.cf-dz-bd { padding: 0; border: 2px solid transparent; border-radius: 10px; overflow: hidden; background: var(--cf-card); cursor: pointer; }
.cf-dz-bd:hover, .cf-dz-bd:focus-visible { border-color: var(--cf-accent); }
.cf-dz-bd img { display: block; width: 120px; height: 68px; object-fit: cover; }
.cf-dz-bdsel { margin: 8px 0 12px; display: grid; gap: 2px; }
@media (min-width: 980px) {
  .cf-dz { grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr); gap: clamp(28px, 4vw, 56px); }
  .cf-dz-stage { position: sticky; top: 80px; }
}
@media (max-width: 979px) {
  .cf-dz-stage { position: sticky; top: 56px; z-index: 3; background: var(--cf-bg); padding-bottom: 8px; }
  .cf-dz-stage > .cf-h, .cf-dz-stage > .cf-hint { display: none; } /* the preview and its two buttons stay in view; the words wait above */
  .cf-dz-stage .cf-back { margin: 0 0 8px; min-height: 36px; }
  .cf-dz-preview { padding: 8px; }
  .cf-dz-preview canvas { max-height: 26vh; }
  .cf-dz-face { margin-top: 8px; }
}
@media (prefers-reduced-motion: reduce) { .cf-dz-anchor-btn, .cf-dz-anchor-btn::after { transition: none; } }
.dw-row { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: end; }
.dw-row .cf-label { margin: 0 0 4px; }
.dw-num { max-width: 140px; }
.dw-select { max-width: 360px; }
.dw-picker { margin: 0 0 22px; }
.dw-found, .dw-picked { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.dw-pill { display: inline-flex; align-items: center; gap: 4px; padding: 2px 4px 2px 14px; border-radius: 999px; border: 1px solid rgba(var(--cf-accent-rgb), 0.4); background: rgba(var(--cf-accent-rgb), 0.06); font-size: 0.88rem; }
.dw-pill .cf-link-btn { min-height: 32px; padding: 0 10px; font-size: 0.82rem; }
.dw-rules { margin: 0 0 18px; padding-left: 1.2em; color: var(--cf-text-2); display: grid; gap: 6px; }
.dw-posters { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 18px; }
.dw-posters img { width: 78px; height: 117px; object-fit: cover; border-radius: 8px; background: var(--cf-card); }
/* the recipes wait behind a quiet disclosure under "Build your own": a starting point, not the invitation */
.dw-recipes-box { margin-top: 18px; }
.dw-recipes-box > summary { list-style: none; cursor: pointer; min-height: 44px; display: inline-flex; align-items: center; gap: 10px; padding: 0 4px; color: var(--cf-text-2); font-weight: 600; border-radius: 10px; transition: color 0.2s var(--cf-ease); }
.dw-recipes-box > summary::-webkit-details-marker { display: none; }
.dw-recipes-box > summary:hover { color: var(--cf-text); }
.dw-chev { flex: none; width: 18px; height: 18px; background: currentColor; transition: transform 0.25s var(--cf-ease); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") center / contain no-repeat; }
.dw-recipes-box[open] > summary .dw-chev { transform: rotate(180deg); }
.dw-recipes-box[open] > .dw-recipes { margin-top: 6px; }
@media (prefers-reduced-motion: reduce) { .dw-chev { transition: none; } }
.dw-more { margin-top: 20px; color: var(--cf-text-2); }
.dw-more summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; }
/* the stage for folders made from a search: the rail says where you are, one screen is on the stage; the section titles are for screen readers */
.cf-stage[hidden] { display: none; }
.cf-stage--solo { display: block; }
.cf-stage--solo > .dw-rail { display: none; }
.cf-stage:not(.cf-stage--solo) .cf-step > .cf-h { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.cf-stage-main { min-width: 0; }
.cf-tool .dw-title:focus, .cf-tool .dw-title:focus-visible { outline: none !important; box-shadow: none; } /* Studio's global :focus-visible is !important, so this has to be too (the wizard panels do the same) */ /* the heading takes focus on each screen so screen readers announce it; no box drawn around it */
.cf-look[data-own="0"] .cf-look-img { background-color: rgba(255, 255, 255, 0.05); animation: cf-pulse 1.4s ease-in-out infinite; } /* a look that is still being drawn, never another folder's picture */
@keyframes cf-pulse { 0%, 100% { opacity: 0.55; } 50% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .cf-look[data-own="0"] .cf-look-img { animation: none; } }
/* "Add several at once": a switch row that says what it does, and a batch tray under it that says how many are in it */
.cf-switch { position: relative; display: flex; align-items: center; gap: 14px; margin: 16px 0 0; padding: 12px 16px; max-width: 560px; border: 1px solid var(--cf-border); border-radius: 14px; background: rgba(255, 255, 255, 0.025); cursor: pointer; transition: border-color 0.2s var(--cf-ease), background 0.2s var(--cf-ease); }
.cf-switch:hover { border-color: rgba(var(--cf-accent-rgb), 0.35); }
.cf-switch:has(input:checked) { border-color: rgba(var(--cf-accent-rgb), 0.5); background: rgba(var(--cf-accent-rgb), 0.06); }
.cf-switch input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.cf-switch input:focus-visible { outline: none !important; }
.cf-switch:has(input:focus-visible) { box-shadow: 0 0 0 2px var(--k-mint, #00f5a0); }
.cf-switch-ui { flex: none; position: relative; width: 42px; height: 24px; border-radius: 999px; background: rgba(255, 255, 255, 0.16); transition: background 0.2s var(--cf-ease); }
.cf-switch-ui::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4); transition: transform 0.25s var(--cf-ease); }
.cf-switch input:checked + .cf-switch-ui { background: var(--cf-accent); }
.cf-switch input:checked + .cf-switch-ui::after { transform: translateX(18px); background: #04130d; }
.cf-switch-text { display: grid; gap: 2px; }
.cf-switch-text strong { font-weight: 700; }
.cf-switch-text span { color: var(--cf-muted); font-size: 0.86rem; }
.cf-cart-title { margin: 0 0 10px; font-weight: 700; font-size: 0.95rem; color: var(--cf-text); }
.cf-picked:has(.cf-cart) { display: block; }
#cf-find-actions { margin-top: 16px; }
.dw-chev { display: inline-block; }
@media (prefers-reduced-motion: reduce) { .cf-switch, .cf-switch-ui, .cf-switch-ui::after { transition: none; } }
.cf-art-panel a, .cf-art-panel button.cf-secondary, .cf-list-art a:not(.cf-secondary), .cf-list-art .cf-status a { color: var(--cf-accent-light); }
.cf-check:has(input:disabled) { opacity: 0.55; cursor: not-allowed; } /* "share to the hub" is off until hosting is: say so by looking off */
/* Share on Reddit: Reddit's own orange (a shade deeper so white text reads at 4.5:1) and its alien, so it is the one thing on the screen that pops */
.cf-reddit { --cf-reddit: #d93a00; display: inline-flex; align-items: center; gap: 10px; background: var(--cf-reddit); border-color: transparent; color: #fff; font-weight: 700; transition: background 0.2s var(--cf-ease), transform 0.2s var(--cf-ease); }
.cf-reddit:hover { background: #e84300; transform: translateY(-1px); }
.cf-reddit:active { transform: none; }
.cf-reddit .cf-reddit-ico { flex: none; }
.cf-reddit-eye { fill: var(--cf-reddit); }
.cf-reddit-mouth { stroke: var(--cf-reddit); }
@media (prefers-reduced-motion: reduce) { .cf-reddit, .cf-reddit:hover { transition: none; transform: none; } }
.cf-tool.has-rail .cf-lede { display: none; } /* the rail says it */
.cf-stage > .dw-main > .cf-step[data-step="type"] .cf-h { margin-top: 0; }
.cf-stage:not(.cf-stage--solo) #cf-look-hint { display: none; } /* the rail already says it */
@media (max-width: 640px) { .cf-stage:not(.cf-stage--solo) .dw-live { display: none; } } /* on a phone the choices come first; what you picked is in the summary under them */
.cf-art-panel { margin: 18px 0; padding: 16px 18px; border: 1px solid var(--cf-border); border-radius: 14px; background: rgba(255, 255, 255, 0.025); }
.cf-art-panel .cf-sub { margin: 0 0 6px; }
.cf-art-panel .cf-hint { margin: 0 0 10px; }
.cf-art-panel .cf-actions { margin: 0 0 12px; }
.cf-stage:not(.cf-stage--solo) .cf-preview-wrap { grid-template-columns: minmax(0, 1fr); } /* the stage is narrower than the page: the preview first, the details under it */
.cf-stage:not(.cf-stage--solo) .cf-preview-col { max-width: 520px; }
.cf-stage:not(.cf-stage--solo) .cf-create-side { max-width: 560px; }
.cf-stage:not(.cf-stage--solo) .cf-step > .cf-back { margin-bottom: 18px; }
.dw-live-line span { color: var(--cf-muted); font-size: 0.85rem; }
.dw-nav { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; padding: 14px 0 4px; position: sticky; bottom: 0; background: linear-gradient(to top, var(--cf-bg) 62%, transparent); }
@media (min-width: 900px) {
  .dw { grid-template-columns: minmax(240px, 300px) minmax(0, 1fr); gap: clamp(32px, 5vw, 72px); }
  .dw-rail { position: sticky; top: 88px; }
  .dw-phases { grid-template-columns: 1fr; gap: 0; margin-top: 30px; }
  .dw-phases li { display: flex; align-items: center; gap: 14px; min-height: 34px; position: relative; }
  .dw-pdot { flex: none; width: 10px; height: 10px; border-radius: 50%; }
  .dw-phases li:not(:last-child)::after { content: ""; position: absolute; left: 4px; top: 27px; width: 2px; height: 18px; background: rgba(255, 255, 255, 0.08); }
  .dw-phases .is-done:not(:last-child)::after { background: rgba(var(--cf-accent-rgb), 0.45); }
}
@media (max-width: 640px) { .dw-posters img { width: 64px; height: 96px; } .dw-live-posters { display: none; } .dw-opt { padding: 14px 16px; } .dw-nav .cf-primary, .dw-nav .cf-secondary { flex: 1 1 0; } }
@media (prefers-reduced-motion: reduce) { .dw-in, .dw[data-dir="back"] .dw-in { animation: dw-fade 0.15s linear; } .dw-opt, .dw-opt-mark, .dw-pdot, .dw-seg-btn { transition: none; } @keyframes dw-fade { from { opacity: 0; } to { opacity: 1; } } }
@keyframes cf-rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .cf-step { animation: none; } .cf-type, .cf-look, .cf-chip, .cf-row, .cf-mode, .cf-prev-img { transition: none; } }
@media (max-width: 640px) {
  .cf-preview-wrap { grid-template-columns: 1fr; }
  .cf-looks { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
}
