/* Site Builder — Higgsfield, the Claude panel's third tab (higgsfield.js).
   The pane is an .ag-view, so its fields, buttons and segmented control are
   the Agents tab's (agents.css) — re-skinned here in Higgsfield's own look:
   its mark and wordmark, a near-black surface, white type, and its lime
   (#D1FE17) for the things to press. The tab itself carries the mark on a
   lime tile, like Higgsfield's app icon. */

.chat { --hf-lime: #D1FE17; --hf-lime-hi: #DDFF52; --hf-ink: #0A0A0A; }

/* the panel header keeps one line: with Higgsfield up, the chat's own
   controls step out, as they do for Agents */
.chat.is-hf :is(#chat-people, #chat-new) { display: none; }
.chat.is-hf > :is(#chat-tabs-wrap, #chat-feed, #chat-form, #ag-chatbar, #hf-chat-live) { display: none !important; }
.chat.is-agents > #hf-chat-live { display: none !important; }

/* ---- the mark on its lime tile: the tab, and the pane's hello ---- */
.hf-badge {
  display: inline-grid; place-items: center; flex: none; width: 16px; height: 16px; border-radius: 5px;
  background: var(--hf-lime); color: var(--hf-ink);
  box-shadow: inset 0 0 0 1px rgba(10, 10, 10, .08);
}
.ag-tab .hf-badge svg, .hf-badge svg { display: block; width: 11px; height: 11px; }
.hf-badge.lg { width: 56px; height: 56px; border-radius: 16px; box-shadow: 0 0 0 1px rgba(209, 254, 23, .5), 0 8px 30px rgba(209, 254, 23, .22); }
.hf-badge.lg svg { width: 32px; height: 32px; }
.ag-tab[data-tab="higgsfield"] { padding-left: 5px; }
/* a narrow panel drops the tab words' icons — this one keeps its tile and
   drops its word instead, so three tabs still fit beside the buttons */
@container cl-panel (max-width: 345px) {
  .ag-tab[data-tab="higgsfield"] > span:not(.hf-badge) { display: none; }
  .ag-tab[data-tab="higgsfield"] { padding: 0 6px; }
  .ag-tab .hf-badge svg { display: block; }
}

/* ---- the pane: Higgsfield's dark surface, inset in the panel ---- */
.hf-view.ag-view {
  color-scheme: dark;
  margin: 2px 8px 8px; padding: 14px 12px 14px; border-radius: 16px;
  background: radial-gradient(120% 60% at 50% -10%, rgba(209, 254, 23, .07), transparent 60%), var(--hf-ink);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .06), 0 10px 30px rgba(10, 10, 10, .18);
  color: #F2F2F2;
}
.hf-view .ag-pane { gap: 12px; }
.hf-wordmark { display: block; height: 17px; width: auto; }
.hf-top { display: flex; align-items: center; gap: 8px; padding: 0 2px 2px; min-width: 0; }

/* the credits left: a pill beside the wordmark; in the dashboard, with the
   plan's allowance as a lime bar */
.hf-credits { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; min-width: 0; }
.hf-credits:empty { display: none; }
.hf-credits-pill {
  display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 10px; border-radius: 999px;
  background: #161616; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08);
  font: 500 11px var(--sans); color: rgba(242, 242, 242, .62); white-space: nowrap; text-decoration: none;
}
.hf-credits-pill b { font-weight: 700; color: var(--hf-lime); font-variant-numeric: tabular-nums; }
.hf-credits-pill i { font-style: normal; }
.hf-credits-pill.is-off { color: rgba(242, 242, 242, .45); }
.hf-credits-pill .ag-spin { width: 9px; height: 9px; }
.hf-credits-pill.is-low b { color: #FFA79D; }
a.hf-credits-pill:hover { color: #F2F2F2; }
.hf-credits-pill.is-big { height: 32px; padding: 0 14px; gap: 7px; font-size: 12px; }
.hf-credits-pill.is-big b { font-size: 15px; }
.hf-credits-bar { width: 72px; height: 4px; border-radius: 999px; background: rgba(255, 255, 255, .1); overflow: hidden; }
.hf-credits-bar > span { display: block; height: 100%; border-radius: inherit; background: var(--hf-lime); }
.hf-credits-pill.is-low .hf-credits-bar > span { background: #FF6252; }
.hf-plan { padding-left: 7px; border-left: 1px solid rgba(255, 255, 255, .12); color: rgba(242, 242, 242, .5); }

/* the full-screen button — where "Connected" used to sit */
.hf-full-btn {
  flex: none; display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 9px; margin: 0;
  border: none; border-radius: 999px; cursor: pointer;
  background: #1C1C1C; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1);
  font: 600 11px var(--sans); color: #EDEDED;
  transition: box-shadow .14s var(--ease-out), background .14s var(--ease-out), transform .14s var(--ease-out);
}
.hf-credits:empty + .hf-full-btn { margin-left: auto; }
.hf-full-btn svg { width: 13px; height: 13px; flex: none; color: var(--hf-lime); }
.hf-full-btn:hover { background: #242424; box-shadow: inset 0 0 0 1px rgba(209, 254, 23, .55); }
.hf-full-btn:active { transform: scale(.95); transition-duration: .06s; }
.hf-full-btn:focus-visible, .hf-icon-btn:focus-visible { outline: 2px solid var(--hf-lime); outline-offset: 2px; }
/* a narrow panel keeps just the icon */
@container cl-panel (max-width: 400px) {
  .hf-view:not(.is-full) .hf-full-btn > span { display: none; }
  .hf-view:not(.is-full) .hf-full-btn { width: 26px; padding: 0; justify-content: center; }
}
.hf-icon-btn {
  flex: none; display: inline-grid; place-items: center; width: 28px; height: 28px; margin: 0; padding: 0;
  border: none; border-radius: 999px; background: transparent; color: rgba(242, 242, 242, .55); cursor: pointer;
  transition: background .14s var(--ease-out), color .14s var(--ease-out);
}
.hf-icon-btn svg { width: 14px; height: 14px; }
.hf-icon-btn:hover { background: #1C1C1C; color: #F2F2F2; }
.hf-icon-btn.is-busy svg { animation: hf-turn .9s linear infinite; }
@keyframes hf-turn { to { transform: rotate(360deg); } }

/* type */
.hf-view .ag-kicker { color: rgba(242, 242, 242, .5); }
.hf-view .ag-kicker b { background: rgba(255, 255, 255, .1); color: rgba(242, 242, 242, .75); }
.hf-view .ag-quiet { color: rgba(242, 242, 242, .6); }
.hf-view .ag-quiet b { color: #F2F2F2; font-weight: 600; }
.hf-view .ag-loading { color: rgba(242, 242, 242, .6); }
.hf-view .ag-spin { border-color: rgba(209, 254, 23, .25); border-top-color: var(--hf-lime); }
.hf-view .ag-err { background: rgba(255, 98, 82, .1); border-color: rgba(255, 98, 82, .35); color: #FFA79D; }
.hf-view .ag-link { color: var(--hf-lime); text-decoration-color: rgba(209, 254, 23, .35); }

/* fields */
.hf-view.ag-view :is(input[type="text"], input[type="password"], input[type="number"], textarea, select) {
  width: 100%; box-sizing: border-box; margin: 0; padding: 8px 11px; border-radius: 11px;
  background: #161616; border: 1px solid rgba(255, 255, 255, .1); box-shadow: none;
  font: 400 12.5px/1.5 var(--sans); color: #F2F2F2;
  transition: border-color .14s var(--ease-out), box-shadow .14s var(--ease-out);
}
.hf-view.ag-view select { height: 34px; padding: 0 9px; cursor: pointer; }
.hf-view.ag-view :is(input, textarea, select):focus { outline: none; border-color: var(--hf-lime); box-shadow: 0 0 0 3px rgba(209, 254, 23, .16); background: #181818; }
.hf-view.ag-view :is(input, textarea)::placeholder { color: rgba(242, 242, 242, .38); opacity: 1; }

/* the house dropdown (app.js, .dd-menu) opened from a select in this pane:
   the pane's near-black and white type, a graphite hover, the pick in lime.
   It hangs off <body>, outside .chat, so the colors are spelled out — and
   `body` keeps it ahead of the full-screen editor's dark menu. */
body .dd-menu.dd-hf {
  background: rgba(18, 18, 18, .96); border-color: rgba(255, 255, 255, .1);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .5), 0 22px 60px rgba(0, 0, 0, .55), 0 4px 14px rgba(0, 0, 0, .35);
  color-scheme: dark;
}
body .dd-hf .dd-item { color: rgba(242, 242, 242, .82); font-size: 12.5px; }
body .dd-hf .dd-item:hover, body .dd-hf .dd-item.focused { background: #262626; color: #FFFFFF; }
body .dd-hf .dd-item.selected { background: rgba(209, 254, 23, .1); color: #D1FE17; }
body .dd-hf .dd-item.selected:hover, body .dd-hf .dd-item.selected.focused { background: rgba(209, 254, 23, .16); }
body .dd-hf .dd-group { color: rgba(242, 242, 242, .45); }
body .dd-hf .dd-help { opacity: .5; }
body .dd-hf .dd-item:hover .dd-help, body .dd-hf .dd-help:hover { opacity: 1; }
body .dd-tip.dd-hf { background: #1C1C1C; color: rgba(242, 242, 242, .9); box-shadow: 0 0 0 1px rgba(255, 255, 255, .12), 0 14px 36px rgba(0, 0, 0, .5); }
body .dd-hf .dd-item.dd-add { border-top-color: rgba(255, 255, 255, .1); color: #D1FE17; }
.dd-hf::-webkit-scrollbar-thumb { background-color: rgba(255, 255, 255, .18); }
.dd-hf::-webkit-scrollbar-thumb:hover { background-color: rgba(255, 255, 255, .3); }

/* Photo | Video */
.hf-view .ag-seg { background: #161616; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .07); }
.hf-view .ag-seg button { color: rgba(242, 242, 242, .55); }
.hf-view .ag-seg button:hover { color: #F2F2F2; }
.hf-view .ag-seg button[aria-pressed="true"] { background: #2A2A2A; color: #FFFFFF; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08), 0 2px 8px rgba(0, 0, 0, .4); }

/* buttons: lime to press, graphite for the rest */
.hf-view .ag-btn { background: #1C1C1C; border-color: rgba(255, 255, 255, .12); color: #EDEDED; box-shadow: none; }
.hf-view .ag-btn:hover { border-color: rgba(209, 254, 23, .55); box-shadow: none; }
.hf-view .ag-btn.primary { background: var(--hf-lime); border-color: transparent; color: var(--hf-ink); font-weight: 700; box-shadow: 0 2px 14px rgba(209, 254, 23, .22); }
.hf-view .ag-btn.primary:hover { background: var(--hf-lime-hi); box-shadow: 0 6px 22px rgba(209, 254, 23, .35); }
.hf-view .ag-btn.quiet { background: transparent; border-color: transparent; color: rgba(242, 242, 242, .6); }
.hf-view .ag-btn.quiet:hover { background: #1C1C1C; color: #F2F2F2; }
.hf-view .ag-btn:focus-visible, .hf-view .ag-link:focus-visible { outline-color: var(--hf-lime); }

/* not connected yet */
.hf-hello { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 12px 4px 2px; }
.hf-hello .hf-badge { margin-bottom: 16px; }
.hf-hello .hf-wordmark { height: 20px; margin-bottom: 14px; }
.hf-hello h3 { margin: 0 0 6px; font: 700 16px var(--sans); letter-spacing: -.01em; color: #FFFFFF; }
.hf-hello p { max-width: 270px; }
/* the hosted builder's sign-in: paste back the address it ended on */
.hf-paste { display: grid; gap: 10px; }
.hf-steps { margin: 0; padding-left: 18px; display: grid; gap: 6px; font-size: 12px; line-height: 1.5; color: rgba(242, 242, 242, .78); }
.hf-steps li::marker { color: var(--hf-lime); font-weight: 700; }
.hf-steps b { color: #FFFFFF; }
.hf-steps a { color: var(--hf-lime); font-weight: 600; }
.hf-paste-foot { display: flex; justify-content: space-between; }
.hf-signin { display: grid; gap: 8px; justify-items: center; text-align: center; }
.hf-signin .ag-btn.wide { height: 40px; font-size: 13.5px; }
.hf-signin .ag-err { justify-self: stretch; text-align: left; }
/* the developer key: folded under the sign-in, for teams that have one */
.hf-keyway { border-top: 1px solid rgba(255, 255, 255, .08); padding-top: 10px; }
.hf-keyway summary {
  cursor: pointer; list-style: none; display: flex; align-items: center; gap: 6px;
  font: 600 11.5px var(--sans); color: rgba(242, 242, 242, .6);
}
.hf-keyway summary::-webkit-details-marker { display: none; }
.hf-keyway summary::before { content: '›'; font-size: 14px; line-height: 1; transition: transform .2s var(--ease-out); }
.hf-keyway[open] summary::before { transform: rotate(90deg); }
.hf-keyway summary:hover { color: #F2F2F2; }
.hf-keyway .hf-connect { margin-top: 10px; }
.hf-view .ag-kicker i { font-style: normal; text-transform: none; letter-spacing: 0; opacity: .7; }
.hf-switch { justify-self: start; font-size: 11px; }
.hf-connect { display: grid; gap: 10px; }
.hf-small { font-size: 11.5px; }
.hf-small a { color: var(--hf-lime); font-weight: 600; }

/* aimed at a photo or video on the page (the editor's Higgsfield button) */
.hf-aim {
  position: relative; display: flex; gap: 10px; align-items: center; padding: 8px; border-radius: 14px;
  background: rgba(209, 254, 23, .06); border: 1px solid rgba(209, 254, 23, .35);
  animation: ag-card-in .34s var(--ease-out) backwards;
}
.hf-aim-thumb { flex: none; display: block; width: 56px; height: 56px; border-radius: 10px; object-fit: cover; background: #1E1E1E; }
.hf-aim-text { flex: 1; min-width: 0; display: grid; gap: 2px; padding-right: 18px; }
.hf-aim-text b { font: 600 12.5px var(--sans); color: #FFFFFF; }
.hf-aim-text .ag-kicker { color: var(--hf-lime); }
.hf-aim-text .hf-small { font-size: 11px; line-height: 1.4; color: rgba(242, 242, 242, .65); }
.hf-aim-text .hf-small b { font-size: inherit; }
/* several selected: one tile per spot, under the banner */
.hf-aim.is-many { flex-wrap: wrap; }
.hf-aims { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: 6px; padding-top: 2px; }
.hf-aims-one {
  position: relative; flex: none; width: 36px; height: 36px; padding: 0; border-radius: 8px; overflow: hidden;
  background: #1E1E1E; border: 1.5px solid transparent; cursor: pointer; opacity: .7;
  transition: opacity .15s var(--ease-out), border-color .15s var(--ease-out);
}
.hf-aims-one:hover { opacity: 1; }
.hf-aims-one.is-on { opacity: 1; border-color: var(--hf-lime); }
.hf-aims-one img, .hf-aims-one video { display: block; width: 100%; height: 100%; object-fit: cover; }
.hf-aims-one .hf-blank { display: grid; place-items: center; width: 100%; height: 100%; color: rgba(242, 242, 242, .5); }
.hf-aims-one .hf-blank svg { width: 16px; height: 16px; }
.hf-aims-one i { position: absolute; right: 2px; bottom: 2px; display: grid; place-items: center; width: 14px; height: 14px; border-radius: 50%; background: var(--hf-lime); color: #0A0A0A; }
.hf-aims-one i svg { width: 10px; height: 10px; stroke-width: 3; }
.hf-job.is-for { border-color: rgba(209, 254, 23, .4); }
.hf-inplace { display: inline-flex; align-items: center; gap: 4px; height: 26px; padding: 0 4px; font: 600 11.5px var(--sans); color: var(--hf-lime); }
.hf-inplace svg { width: 12px; height: 12px; }

/* making one */
.hf-make { display: grid; gap: 10px; }
/* what the generation will take: a chip on the Generate button, beside its label */
.hf-cost { display: inline-flex; align-items: center; margin-left: 4px; }
.hf-cost:empty { display: none; }
.hf-cost > span {
  display: inline-flex; align-items: center; height: 20px; padding: 0 8px; border-radius: 999px;
  background: rgba(12, 12, 12, .14); color: var(--hf-ink); font: 700 11.5px var(--sans); font-variant-numeric: tabular-nums; white-space: nowrap;
}
.hf-cost > .is-low { background: #FF6252; color: #fff; }
.hf-cost > .hf-cost-off { font-weight: 500; opacity: .7; }
.hf-cost .ag-spin { width: 10px; height: 10px; border-width: 1.5px; border-color: rgba(12, 12, 12, .25); border-top-color: var(--hf-ink); }
.hf-opts.three { grid-template-columns: repeat(auto-fit, minmax(84px, 1fr)); }
.hf-view.ag-view .hf-opts.three select { padding: 0 2px 0 8px; font-size: 12px; }
.hf-view.ag-view input[type="number"] { height: 34px; padding: 0 9px; }

/* the description: Claude's round clay button in the draft's bottom-right
   corner; its rewrite in a box below, and a Use this pill on each — the one
   Generate sends is lime-edged, the other dims until it is pointed at */
.hf-prompt-box { display: grid; gap: 5px; }
.hf-prompt-field { position: relative; }
.hf-view.ag-view .hf-prompt-field textarea { display: block; padding-bottom: 38px; resize: vertical; }
.hf-rewrite {
  position: absolute; right: 7px; bottom: 7px; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 50%;
  display: grid; place-items: center; cursor: pointer;
  background: var(--clay); color: #fff; box-shadow: 0 2px 8px rgba(0, 0, 0, .35), inset 0 0 0 1px rgba(255, 255, 255, .12);
  transition: transform .18s var(--ease-out), background .14s var(--ease-out);
}
.hf-rewrite svg { width: 15px; height: 15px; }
.hf-rewrite:hover:not(:disabled) { background: #E08A6D; transform: scale(1.08); }
.hf-rewrite:focus-visible { outline: 2px solid var(--hf-lime); outline-offset: 2px; }
.hf-rewrite.is-busy { cursor: progress; }
.hf-rewrite.is-busy svg { animation: hf-rw-turn 1.6s linear infinite; }
@keyframes hf-rw-turn { to { transform: rotate(360deg); } }
.hf-pick-head { display: flex; align-items: center; gap: 6px; min-height: 22px; }
.hf-pick-head .ag-kicker { flex: 1; display: inline-flex; align-items: center; gap: 6px; }
.hf-claude-dot { display: inline-grid; place-items: center; width: 16px; height: 16px; border-radius: 50%; background: var(--clay); color: #fff; }
.hf-claude-dot svg { width: 10px; height: 10px; }
.hf-pick {
  display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 9px; border-radius: 999px; cursor: pointer;
  background: transparent; border: 1px solid rgba(255, 255, 255, .16); color: rgba(242, 242, 242, .75); font: 600 11px var(--sans);
  transition: background .14s var(--ease-out), color .14s var(--ease-out), border-color .14s var(--ease-out);
}
.hf-pick:hover { border-color: rgba(209, 254, 23, .5); color: #FFFFFF; }
.hf-pick[aria-pressed="true"] { background: var(--hf-lime); border-color: transparent; color: var(--hf-ink); cursor: default; }
.hf-pick svg { width: 11px; height: 11px; }
.hf-pick-x { display: grid; place-items: center; width: 22px; height: 22px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: rgba(242, 242, 242, .55); cursor: pointer; }
.hf-pick-x:hover { background: #262626; color: #FFFFFF; }
.hf-pick-x svg { width: 11px; height: 11px; }
.hf-view.ag-view .hf-prompt-box.is-claude textarea { resize: vertical; }
.hf-view.ag-view .hf-prompt-box.is-on textarea:not(:focus) { border-color: rgba(209, 254, 23, .45); }
.hf-prompt-box.is-off :is(textarea, .hf-pick-head .ag-kicker) { opacity: .55; transition: opacity .14s var(--ease-out); }
.hf-prompt-box.is-off:is(:hover, :focus-within) :is(textarea, .hf-pick-head .ag-kicker) { opacity: 1; }
.hf-rw-wait {
  display: flex; align-items: center; gap: 8px; min-height: 92px; padding: 0 12px; border-radius: 11px;
  background: #161616; border: 1px dashed rgba(217, 119, 87, .45); color: rgba(242, 242, 242, .7); font: 500 12px var(--sans);
}
.hf-rw-wait .ag-spin { border-color: rgba(217, 119, 87, .25); border-top-color: var(--clay); }

/* the model: Higgsfield's own list, a button to check it for new ones, and what the picked one needs */
.hf-model-row { display: flex; align-items: center; gap: 4px; }
.hf-model-row select { flex: 1; min-width: 0; }
.hf-model-note { display: block; font: 500 11px/1.4 var(--sans); color: rgba(242, 242, 242, .6); }
.hf-model-note b { color: var(--hf-lime); font-weight: 600; }
.hf-model-note.is-err { color: #FFA79D; }
.hf-model-note .ag-spin { display: inline-block; width: 10px; height: 10px; margin-right: 6px; vertical-align: -1px; }

/* a slot for each kind of media the model takes */
.hf-slots { display: grid; gap: 8px; }
.hf-slot {
  display: grid; gap: 6px; padding: 8px 9px; border-radius: 12px;
  background: #121212; border: 1px solid rgba(255, 255, 255, .08);
}
.hf-slot.is-needed { border-color: rgba(209, 254, 23, .45); background: rgba(209, 254, 23, .04); }
.hf-slot.is-needed > .ag-kicker i { color: var(--hf-lime); opacity: 1; }
.hf-slot-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.hf-view.ag-view select.hf-slot-add { width: auto; flex: 1 1 140px; min-width: 0; height: 30px; padding: 0 9px; font-size: 12px; line-height: normal; border-style: dashed; }

/* a reference: in a slot, or on the shelf of everything tagged */
.hf-ref-chip {
  display: inline-flex; align-items: center; gap: 6px; max-width: 100%; height: 30px; padding: 0 3px 0 3px; border-radius: 9px;
  background: #1C1C1C; box-shadow: inset 0 0 0 1px rgba(209, 254, 23, .3);
  animation: ag-card-in .24s var(--ease-out) backwards;
}
.hf-ref-thumb { flex: none; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 6px; object-fit: cover; background: #2A2A2A; }
.hf-ref-thumb svg { width: 13px; height: 13px; }
.hf-ref-name { min-width: 0; max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 500 11px var(--sans); color: #EDEDED; }
.hf-ref-x {
  flex: none; display: grid; place-items: center; width: 20px; height: 20px; margin: 0; padding: 0; border: none; border-radius: 6px;
  background: transparent; color: rgba(242, 242, 242, .45); cursor: pointer;
}
.hf-ref-x svg { width: 10px; height: 10px; }
.hf-ref-x:hover { background: #2A2A2A; color: #F2F2F2; }
.hf-ref-x:focus-visible { outline: 2px solid var(--hf-lime); outline-offset: 1px; }
.hf-refs-wrap { display: grid; gap: 6px; }
.hf-refs-wrap:empty { display: none; }
.hf-refs { display: flex; flex-wrap: wrap; gap: 6px; }
.hf-refs-hint { margin-left: auto; font: 500 10.5px var(--sans); color: rgba(242, 242, 242, .4); }

/* tagging one as a reference */
.hf-view .ag-btn.hf-tag { gap: 5px; }
.hf-view .ag-btn.hf-tag svg { width: 12px; height: 12px; }
.hf-view .ag-btn.hf-tag.is-on { color: var(--hf-lime); border-color: rgba(209, 254, 23, .55); background: rgba(209, 254, 23, .08); }
.hf-aim-text .hf-tag { justify-self: start; margin-top: 4px; height: 26px; padding: 0 10px; font-size: 11.5px; }
.hf-lib-acts { display: flex; flex-wrap: wrap; gap: 5px; }
.hf-lib-tag-mini {
  position: absolute; left: 5px; bottom: 5px; display: grid; place-items: center; width: 26px; height: 26px; margin: 0; padding: 0;
  border: none; border-radius: 999px; cursor: pointer; background: rgba(10, 10, 10, .78); color: #F2F2F2;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .18); opacity: 0; transition: opacity .14s var(--ease-out), transform .14s var(--ease-out);
}
.hf-lib-tag-mini svg { width: 12px; height: 12px; }
.hf-lib-card:hover .hf-lib-tag-mini, .hf-lib-tag-mini:focus-visible, .hf-lib-tag-mini.is-on { opacity: 1; }
.hf-lib-tag-mini:hover { transform: scale(1.08); }
.hf-lib-tag-mini.is-on { color: var(--hf-lime); box-shadow: inset 0 0 0 1px rgba(209, 254, 23, .6); }
.hf-lib-tag-mini:focus-visible { outline: 2px solid var(--hf-lime); outline-offset: 2px; }
.hf-lib-tag-mini .ag-spin { width: 11px; height: 11px; }
@media (hover: none) { .hf-lib-tag-mini { opacity: 1; } }

.hf-from-thumb { width: 100%; max-height: 130px; object-fit: cover; border-radius: 11px; border: 1px solid rgba(255, 255, 255, .1); }
.hf-none { margin: 2px; padding-top: 12px; border-top: 1px solid rgba(255, 255, 255, .08); }
.hf-jobs-wrap { display: grid; gap: 8px; padding-top: 12px; border-top: 1px solid rgba(255, 255, 255, .08); }
.hf-jobs-wrap:has(> .hf-none) { padding-top: 0; border-top: none; }

/* what has been made */
.hf-jobs { display: flex; flex-direction: column; gap: 7px; }
.hf-job {
  position: relative; display: flex; gap: 10px; padding: 8px; border-radius: 14px;
  background: #141414; border: 1px solid rgba(255, 255, 255, .08);
  animation: ag-card-in .34s var(--ease-out) backwards;
}
.hf-media-link { flex: none; display: block; border-radius: 10px; }
/* anything finished in the site can be picked up and dragged onto the page */
.hf-carry { cursor: grab; touch-action: none; }
.hf-carry.lifted { opacity: .45; }
body.sec-dragging .hf-carry { cursor: grabbing; }
/* …from the dashboard too: it fades while one is carried, so the page shows
   (opacity only — the pane must keep the pointer it captured) */
body.sec-dragging.hf-full-open .hf-view.is-full,
body.sec-dragging.hf-full-open .hf-full-back { animation: none; opacity: 0; transition: opacity .18s var(--ease-out); }
.hf-media { flex: none; display: block; width: 76px; height: 76px; border-radius: 10px; object-fit: cover; background: #1E1E1E; }
.hf-blank { display: grid; place-items: center; color: rgba(242, 242, 242, .35); }
.hf-blank svg { width: 24px; height: 24px; }
.hf-blank.is-working { color: var(--hf-lime); animation: ag-breathe 1.6s ease-in-out infinite; }
.hf-job-text { flex: 1; min-width: 0; display: grid; align-content: start; gap: 3px; padding-right: 18px; }
.hf-prompt {
  margin: 0; font: 600 12px/1.4 var(--sans); color: #F2F2F2;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.hf-meta { font: 500 10.5px var(--sans); color: rgba(242, 242, 242, .5); }
.hf-path { font: 500 10.5px var(--mono, ui-monospace, monospace); color: rgba(242, 242, 242, .5); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hf-making { display: flex; align-items: center; gap: 6px; font: 600 11px var(--sans); color: var(--hf-lime); }
.hf-making .ag-spin { width: 10px; height: 10px; }
.hf-failed { font-size: 11px; line-height: 1.4; color: #FFA79D; }
.hf-acts { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 4px; }
.hf-acts .ag-btn.sm { height: 26px; padding: 0 10px; font-size: 11.5px; }
.hf-x { position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; color: rgba(242, 242, 242, .45); }
.hf-x:hover { background: #222; color: #F2F2F2; }
.hf-x svg { width: 11px; height: 11px; }

.hf-foot {
  display: flex; align-items: center; gap: 6px; padding-top: 10px; border-top: 1px solid rgba(255, 255, 255, .08);
  font: 500 11px var(--sans); color: rgba(242, 242, 242, .5);
}
.hf-foot svg { width: 13px; height: 13px; flex: none; color: var(--hf-lime); }
.hf-foot span { flex: 1; min-width: 0; line-height: 1.4; overflow-wrap: anywhere; }

/* ---- the account's library ---- */
.hf-lib-wrap { display: grid; gap: 10px; align-content: start; }
.hf-lib-wrap.is-strip { padding-top: 12px; border-top: 1px solid rgba(255, 255, 255, .08); }
.hf-see-all { margin-left: auto; font-size: 11.5px; }
.hf-lib-note { margin: 0; }
.hf-lib-loading { padding: 10px 2px; }
.hf-lib-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.hf-lib-card { position: relative; min-width: 0; animation: ag-card-in .34s var(--ease-out) backwards; }
.hf-lib-open { position: relative; display: block; border-radius: 10px; overflow: hidden; background: #1E1E1E; }
.hf-lib-media { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; background: #1E1E1E; transition: transform .3s var(--ease-out); }
.hf-lib-open:hover .hf-lib-media { transform: scale(1.04); }
.hf-lib-kind {
  position: absolute; left: 6px; top: 6px; padding: 2px 7px; border-radius: 999px;
  background: rgba(10, 10, 10, .72); font: 700 9.5px var(--sans); color: var(--hf-lime);
}
.hf-lib-add-mini {
  position: absolute; right: 5px; bottom: 5px; display: grid; place-items: center; width: 26px; height: 26px; margin: 0; padding: 0;
  border: none; border-radius: 999px; cursor: pointer; background: var(--hf-lime); color: var(--hf-ink);
  box-shadow: 0 2px 10px rgba(0, 0, 0, .45); transition: transform .14s var(--ease-out), background .14s var(--ease-out);
}
.hf-lib-add-mini svg { width: 13px; height: 13px; }
.hf-lib-add-mini:hover { background: var(--hf-lime-hi); transform: scale(1.08); }
.hf-lib-add-mini:disabled { cursor: default; transform: none; }
.hf-lib-add-mini.is-added { background: rgba(10, 10, 10, .78); color: var(--hf-lime); box-shadow: inset 0 0 0 1px rgba(209, 254, 23, .5); }
.hf-lib-add-mini .ag-spin { width: 11px; height: 11px; }
.hf-lib-add-mini:focus-visible { outline: 2px solid var(--hf-lime); outline-offset: 2px; }

/* ---- the dashboard: the pane, full screen over the page ----
   (moved to the body while open — so the panel's colours come along) */
.hf-view.ag-view.is-full {
  --clay: #D97757; --cl-ink: #141413; --cl-muted: #7C7A72; --cl-sand: #F0EEE6; --cl-line: rgba(20, 20, 19, .11);
  --hf-lime: #D1FE17; --hf-lime-hi: #DDFF52; --hf-ink: #0A0A0A;
  position: fixed; inset: 14px; z-index: 55; margin: 0; padding: 18px 22px 14px; border-radius: 20px;
  display: flex; flex-direction: column; overflow: hidden;
  background: radial-gradient(70% 40% at 50% -8%, rgba(209, 254, 23, .08), transparent 60%), var(--hf-ink);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .08), 0 24px 70px rgba(0, 0, 0, .5);
  animation: hf-full-in .3s var(--ease-out) both;
}
@keyframes hf-full-in { from { opacity: 0; transform: translateY(10px) scale(.985); } }
.hf-full-back {
  position: fixed; inset: 0; z-index: 55; background: rgba(10, 10, 10, .55);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  animation: back-in .22s var(--ease-out);
}
.hf-view.is-full > .ag-pane { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 14px; }
.hf-view.is-full .hf-top { gap: 12px; padding: 0 2px 12px; border-bottom: 1px solid rgba(255, 255, 255, .08); }
.hf-view.is-full .hf-wordmark { height: 20px; }
.hf-view.is-full .hf-full-btn { height: 32px; padding: 0 14px; font-size: 12px; }
.hf-dash { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(300px, 380px) minmax(0, 1fr); gap: 26px; }
.hf-dash-col { min-height: 0; overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column; gap: 12px; padding: 2px 6px 12px 2px; }
.hf-dash-h { margin: 0; font: 700 15px var(--sans); letter-spacing: -.01em; color: #FFFFFF; }
.hf-dash-make .hf-make textarea { min-height: 120px; }
.hf-lib-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.hf-lib-head .hf-lib-filter { margin-left: auto; }
.hf-view .hf-lib-filter button { padding: 0 12px; }
.hf-dash-lib .hf-lib-grid { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.hf-dash-lib .hf-lib-card {
  display: flex; flex-direction: column; gap: 8px; padding: 8px; border-radius: 16px;
  background: #141414; border: 1px solid rgba(255, 255, 255, .08);
  transition: border-color .14s var(--ease-out);
}
.hf-dash-lib .hf-lib-card:hover { border-color: rgba(209, 254, 23, .35); }
.hf-dash-lib .hf-lib-media { aspect-ratio: 4 / 3; }
.hf-lib-text { display: grid; gap: 3px; min-width: 0; padding: 0 2px; }
.hf-lib-add { align-self: flex-start; }
.hf-view .hf-lib-add.ag-btn.sm { height: 28px; padding: 0 12px; font-size: 11.5px; gap: 5px; }
.hf-lib-card.is-added .hf-lib-add { color: var(--hf-lime); opacity: 1; }
.hf-lib-more { margin-top: 4px; }
.hf-view.is-full .hf-foot { flex: none; }

/* a small window: one column, the whole dashboard scrolls */
@media (max-width: 820px) {
  .hf-view.ag-view.is-full { inset: 0; border-radius: 0; padding: 14px 14px 10px; padding-bottom: max(10px, env(safe-area-inset-bottom)); overflow-y: auto; }
  .hf-view.is-full > .ag-pane { flex: none; }
  .hf-view.is-full .hf-top { flex-wrap: wrap; }
  .hf-view.is-full .hf-full-btn > span { display: none; }
  .hf-view.is-full .hf-full-btn { width: 32px; padding: 0; justify-content: center; }
  .hf-credits-bar, .hf-plan { display: none; }
  .hf-dash { display: flex; flex-direction: column; gap: 22px; }
  .hf-dash-col { overflow: visible; padding: 0; }
  .hf-dash-lib .hf-lib-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
}

@media (max-width: 768px), (pointer: coarse) and (max-width: 1024px) {
  .hf-view.ag-view :is(input[type="text"], input[type="password"], input[type="number"], textarea, select) { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .hf-chat-live, .hf-chat-live.is-in, .hf-spinner > svg, .hf-spinner-ring, .hf-job.is-flash, .ctab-hf.is-new { animation: none !important; }
  .hf-chat-live:hover { transform: none; }
  .hf-job, .hf-blank.is-working, .hf-lib-card, .hf-ref-chip,.hf-view.ag-view.is-full, .hf-icon-btn.is-busy svg { animation: none !important; }
  .hf-lib-open:hover .hf-lib-media { transform: none; }
  .hf-rewrite.is-busy svg { animation: none !important; }
  .hf-rewrite:hover:not(:disabled) { transform: none; }
}

/* ---- Claude making one from the chat: the mark spinning over the composer ----
   Not a flat spin: it winds back, whips round past a full turn with a little
   swell, settles onto its mark and rests a beat — while a lime arc runs round
   it at its own pace, so the two never line up the same way twice. */
.hf-chat-live {
  display: flex; align-items: center; gap: 10px; margin: 2px 11px 8px; padding: 6px 12px 6px 6px; border-radius: 999px;
  border: none; cursor: pointer; text-align: left; flex-shrink: 0; min-width: 0;
  background: radial-gradient(140% 120% at 0% 50%, rgba(209, 254, 23, .14), transparent 55%), var(--hf-ink);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .06), 0 8px 22px rgba(10, 10, 10, .2);
  color: #F2F2F2; font: 500 11.5px var(--sans);
  transition: transform .32s var(--ease-spring), box-shadow .2s var(--ease-out);
}
.hf-chat-live[hidden] { display: none; }
.hf-chat-live.is-in { animation: hf-live-in .5s var(--ease-spring) both; }
.hf-chat-live:hover { transform: translateY(-1px); box-shadow: 0 0 0 1px rgba(209, 254, 23, .35), 0 10px 26px rgba(10, 10, 10, .26); }
.hf-chat-live:focus-visible { outline: 2px solid var(--hf-lime); outline-offset: 2px; }
.hf-cl-text { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.25; }
.hf-cl-text b { font-weight: 650; color: #F2F2F2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hf-cl-text i { font-style: normal; color: rgba(242, 242, 242, .55); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hf-cl-time { flex: none; font: 600 11px var(--mono, monospace); color: var(--hf-lime); font-variant-numeric: tabular-nums; }
@keyframes hf-live-in { from { opacity: 0; transform: translateY(8px) scale(.96); } }

.hf-spinner {
  position: relative; flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 11px;
  background: var(--hf-lime); color: var(--hf-ink);
  box-shadow: 0 0 0 1px rgba(209, 254, 23, .5), 0 0 18px rgba(209, 254, 23, .28);
}
.hf-spinner > svg { position: relative; width: 20px; height: 20px; animation: hf-spin-load 2.2s cubic-bezier(.65, 0, .35, 1) infinite; }
.hf-spinner-ring {
  position: absolute; inset: -4px; border-radius: 14px; padding: 2px;
  background: conic-gradient(from 0deg, transparent 0 62%, rgba(209, 254, 23, .15) 70%, var(--hf-lime) 96%, transparent 100%);
  -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, linear-gradient(#000 0 0); mask-composite: exclude;
  animation: hf-turn 1.35s linear infinite;
}
.hf-spinner.sm { width: 24px; height: 24px; border-radius: 8px; }
.hf-spinner.sm > svg { width: 14px; height: 14px; }
.hf-spinner.sm .hf-spinner-ring { inset: -3px; border-radius: 10px; }
/* the same, small, on the card of a chat that has one under way (the chat list) */
.chat-tab .ctab-hf { width: 18px; height: 18px; border-radius: 6px; box-shadow: 0 0 0 1px rgba(209, 254, 23, .5), 0 0 8px rgba(209, 254, 23, .3); }
.chat-tab .ctab-hf.is-new { animation: hf-mark-in .4s var(--ease-spring) both; }
.chat-tab .ctab-hf > svg { width: 11px; height: 11px; animation-delay: var(--hf-mark-t, 0s); }
.chat-tab .ctab-hf .hf-spinner-ring { inset: -2.5px; border-radius: 8px; padding: 1.5px; animation-delay: var(--hf-ring-t, 0s); }
@keyframes hf-mark-in { from { opacity: 0; transform: scale(.6); } }
@keyframes hf-spin-load {
  0%   { transform: rotate(0deg) scale(1); }
  14%  { transform: rotate(-28deg) scale(.86); }
  52%  { transform: rotate(396deg) scale(1.12); }
  64%  { transform: rotate(350deg) scale(.98); }
  74%  { transform: rotate(362deg) scale(1.02); }
  82%, 100% { transform: rotate(360deg) scale(1); }
}

/* ---- Generating now: what the account is making, on any site ---- */
.hf-now { display: flex; flex-direction: column; gap: 6px; }
.hf-now-row {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 7px 10px 7px 8px; border-radius: 12px; text-align: left;
  background: #141414; border: 1px solid rgba(255, 255, 255, .08); color: #F2F2F2; font: 500 11.5px var(--sans);
}
button.hf-now-row { cursor: pointer; transition: border-color .16s var(--ease-out), background .16s var(--ease-out); }
button.hf-now-row:hover { background: #1A1A1A; border-color: rgba(209, 254, 23, .35); }
.hf-now-row.is-here { border-color: rgba(209, 254, 23, .22); }
.hf-now-text { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.3; }
.hf-now-text b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hf-now-text i { font-style: normal; color: rgba(242, 242, 242, .5); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hf-now-none, .hf-now-loading { margin: 0; }

/* the card the chat's spinner pointed at, lit for a moment */
.hf-job.is-flash { animation: hf-flash 1.6s var(--ease-out); }
@keyframes hf-flash { 0%, 30% { box-shadow: 0 0 0 2px var(--hf-lime), 0 0 24px rgba(209, 254, 23, .35); } 100% { box-shadow: 0 0 0 0 transparent; } }

/* ---- Settings → Connections → Higgsfield (higgsfield.js, hfSetRender) ----
   The brand card wears Higgsfield's look, as the Claude card wears Claude's:
   its white wordmark on near-black. The rest
   of the pane is the Settings modal's own rows and buttons. */
#set-pane-higgsfield { --hf-lime: #D1FE17; --hf-ink: #0A0A0A; }
.hfs-brand { background: var(--hf-ink); border-color: var(--hf-ink); }
.hfs-brand .hf-wordmark { height: 17px; }
.hfs-brand .nf-summary { color: rgba(242, 242, 242, .7); }
.set-tab-ico.hfs-tab-ico { padding: 1px; }
#hfs-body .set-row + .set-row { margin-top: 8px; }
#hfs-body > .set-row + .set-hint { margin-top: 10px; }
#hfs-body .set-steps a, #hfs-body .set-hint a { color: var(--accent-deep); font-weight: 600; }
.hfs-credits b { font-variant-numeric: tabular-nums; }
.hfs-actions { margin-top: 12px; }
.hfs-err { color: var(--danger-ink); }
.hfs-keyway { margin-top: 18px; padding-top: 12px; border-top: 1px solid var(--line-soft); }
.hfs-keyway summary {
  cursor: pointer; list-style: none; display: flex; align-items: center; gap: 6px;
  font: 600 12px var(--sans); color: var(--muted);
}
.hfs-keyway summary::-webkit-details-marker { display: none; }
.hfs-keyway summary::before { content: '›'; font-size: 14px; line-height: 1; transition: transform .2s var(--ease-out); }
.hfs-keyway[open] summary::before { transform: rotate(90deg); }
.hfs-keyway summary:hover { color: var(--ink); }
.hfs-keyway form { margin-top: 10px; }
@media (prefers-reduced-motion: reduce) { .hfs-keyway summary::before { transition: none; } }
