/* style -- THE INSPIRATION ROOM, 1 NOV 2026: the room filling the working
   area, the path ("the chain"), idea cards that hold a whole idea, the
   references box and the References drawer, "Make images", 8 / 4, 16:9
   tiles, the room's own lightbox. js/inspire-chain.js, -act.js, -refs.js,
   -lightbox.js and inspire-room.js (the layout). */

/* ---- the room fills the working area (inspire-room.js layoutEnter) ----
   The panes are classed out of sight, never rearranged: leaving takes the
   class off and the layout is as it was. The rail and the header stay. */
html.insp-full .insp-hid { display: none !important; }
/* The known panes by name as well, for a pane the shell builds after the
   room opened (a launch straight back into this room). */
html.insp-full #nle-viewer, html.insp-full #gallery-pane, html.insp-full #gallery-resizer,
html.insp-full [id^="nle-grip"], html.insp-full #pa-tabs { display: none !important; }
html.desktop.nle-on.insp-full body {
  grid-template-columns: minmax(0, 1fr) !important;
  grid-template-rows: auto minmax(0, 1fr) !important;
  grid-template-areas: "top" "gen" !important;
}
html.desktop.nle-on.insp-full #app { grid-area: gen !important; }
/* Across the whole row (in a narrow panel the room is already the full
   width of its column -- 42-inspire.css). */
@media (min-width: 665px) {
  html.insp-full #inspmod:not(.max) { flex: 1 1 auto; width: auto; min-width: 0; max-width: none; }
}
/* Over the room now: "Whole window" has nothing left to do. */
html.insp-full #insp-max { display: none; }

/* ---- the room's side panel: References over Gallery (inspire-room.js
   sideApply, inspire-refs.js placeDrawer) ----
   Simon, 1 Nov 2026: "on the right-hand side, we have it stacked, where the
   top has references and the bottom has gallery. Both of them can be
   activated or deactivated there." html.insp-side while either is on: the
   gallery pane (still .insp-hid, so leaving is still one class off) takes a
   column at the right of the room at --insp-gal-w; html.insp-gal shows it,
   under the References (--insp-refs-h) when those are on too; with the
   Gallery off it only holds the column, out of sight, under the library. */
html.insp-full.insp-side #gallery-pane.insp-hid, html.insp-full.insp-side #gallery-pane {
  display: flex !important; flex: 0 0 var(--insp-gal-w, 380px) !important;
  width: var(--insp-gal-w, 380px) !important; min-width: 0 !important; max-width: none !important; box-sizing: border-box;
}
html.insp-full.insp-side:not(.insp-gal) #gallery-pane { visibility: hidden !important; }
html.insp-full.insp-gal.insp-refs #gallery-pane {
  margin-top: var(--insp-refs-h, 50vh) !important; max-height: calc(100vh - var(--hdr-h, 50px) - var(--insp-refs-h, 50vh)) !important;
}
html.desktop.nle-on.insp-full.insp-side body {
  grid-template-columns: minmax(0, 1fr) minmax(0, var(--insp-gal-w, 380px)) !important;
  grid-template-areas: "top top" "gen igal" !important;
}
html.desktop.nle-on.insp-full.insp-side #gallery-pane { grid-area: igal !important; }
#insp-gal-btn { display: none; }
html.insp-full #insp-gal-btn { display: inline-flex; }
#inspmod.empty .insp-gal-btn { visibility: visible; }
#insp-gal-btn svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
#insp-gal-grip, #insp-side-split { position: fixed; z-index: calc(var(--z-menu) + 12); display: none; background: transparent; transition: background var(--t-quick); }
#insp-gal-grip { width: 7px; cursor: col-resize; }
#insp-side-split { height: 6px; cursor: row-resize; }
html.insp-full.insp-side #insp-gal-grip.on, html.insp-full.insp-side #insp-side-split.on { display: block; }
#insp-gal-grip:hover, #insp-gal-grip.drag, #insp-side-split:hover, #insp-side-split.drag { background: rgba(var(--accent-rgb), .45); }
html.insp-gal-drag, html.insp-gal-drag * { cursor: var(--insp-drag-cursor, col-resize) !important; }
html.insp-gal-drag #gallery-pane, html.insp-gal-drag #inspmod, html.insp-gal-drag #reflib { pointer-events: none; user-select: none; }

/* ---- the path: on it, waiting, passed over (inspire-chain.js) ----
   RECORDED REVERSAL, Simon 1 Nov 2026: "Rather than things being greyed out
   in the Inspire mode, we just want to reduce their opacity to 50%" and then
   "as things have faded, they don't lose any saturation or color. It's just
   their luminance." So a card passed over (faint) is the same picture at
   half the brightness: no grayscale, no saturate, no opacity (which let the
   dark board through and washed the colour out). And only once a pick in
   its row has been taken further ("only fade when one of the items has been
   chosen and explored further" -- inspire-chain.js stateOf): a fresh row is
   at full brightness. Under the mouse, on the path, picked, or liked (the
   heart / star, c.star -> .starred, inspire-view.js) it is at full. */
#inspmod .insp-card { transition: box-shadow var(--t-quick), border-color var(--t-quick), filter .12s ease; }
#inspmod .insp-card.faint { opacity: 1; filter: brightness(.5); }
#inspmod .insp-card.faint:hover, #inspmod .insp-card.faint.sel, #inspmod .insp-card.faint:focus-within,
#inspmod .insp-card.starred { filter: brightness(1); }
#inspmod .insp-card.chain {
  filter: brightness(1); opacity: 1; border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(var(--accent-rgb), .9), 0 0 30px rgba(var(--accent-rgb), .32), 0 10px 26px rgba(0, 0, 0, .55);
}
#inspmod .insp-card.chain.sel { box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 1), 0 0 38px rgba(var(--accent-rgb), .4), 0 12px 28px rgba(0, 0, 0, .55); }
/* The lines between the stages, much fainter (Simon, 1 Nov 2026): a branch
   is a hairline, the path a thin, quiet crimson. */
#inspmod .insp-link { stroke: rgba(255, 255, 255, .1); stroke-width: 1.25; }
#inspmod .insp-link.hot { stroke: rgba(var(--accent-rgb), .3); stroke-width: 1.25; }
#inspmod .insp-link.bad { stroke: rgba(255, 107, 107, .22); }
#inspmod .insp-link.chain { stroke: rgba(var(--accent-rgb), .4); stroke-width: 2; opacity: 1; }
/* Fold chips where a card's lines fan out (inspire-chain.js paintFolds). */
#inspmod .insp-folds { position: absolute; left: 0; top: 0; width: 0; height: 0; z-index: 9; }
#inspmod .insp-fold {
  position: absolute; transform: translate(-50%, -50%); height: 18px; min-width: 22px; padding: 0 6px; box-sizing: border-box;
  display: inline-flex; align-items: center; justify-content: center; gap: 3px;
  border: 1px solid var(--border); border-radius: 9px; background: #16151a; color: var(--text-dim);
  font: inherit; font-size: 10px; line-height: 1; cursor: pointer; opacity: .8; transition: opacity var(--t-quick), border-color var(--t-quick);
}
#inspmod .insp-fold:hover, #inspmod .insp-fold.on { opacity: 1; border-color: rgba(var(--accent-rgb), .6); color: var(--text); }
#inspmod .insp-fold b { font-weight: 700; font-size: 9.5px; color: var(--accent); }
#insp-foldall svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
#insp-foldall.on { color: var(--accent); }
.insp-path {
  position: absolute; left: 112px; top: 10px; z-index: 7; display: none; align-items: center; gap: 4px;
  max-width: calc(100% - 124px); overflow-x: auto; overflow-y: hidden; padding: 3px 4px 3px 10px; box-sizing: border-box;
  background: var(--chrome-blur-bg); border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .45); scrollbar-width: none;
}
.insp-path.on { display: flex; }
#inspmod.empty .insp-path, #inspmod.hero .insp-path, #inspmod.grid .insp-path { display: none; }
.insp-path-k { flex: none; margin-right: 4px; font-size: 9.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); white-space: nowrap; }
.insp-path-sep { flex: none; font-style: normal; color: var(--text-faint); font-size: 14px; }
.insp-path-step {
  flex: none; height: 28px; max-width: 190px; display: inline-flex; align-items: center; padding: 0 8px;
  border: 1px solid var(--border); border-radius: var(--radius); background: var(--card); color: var(--text-dim);
  font: inherit; font-size: 10.5px; cursor: pointer; overflow: hidden;
}
.insp-path-step:hover { color: var(--text); border-color: rgba(var(--accent-rgb), .6); }
.insp-path-step.on { color: #fff; border-color: var(--accent); background: var(--accent-soft); }
.insp-path-step img { height: 20px; width: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 2px; margin: 0 -4px; }
.insp-path-step em { font-style: normal; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---- an idea card holds a whole idea; a long one opens out ---- */
#inspmod .insp-card.k-idea.st-done { overflow: hidden; }
#inspmod .insp-card.k-idea .insp-pt.insp-idea { position: relative; inset: auto; padding: 26px 12px 10px; }
#inspmod .insp-card.k-idea .insp-idea p {
  display: block; -webkit-line-clamp: none; overflow: visible;
  font-size: 10.5px; line-height: 1.42; color: var(--text-bright); letter-spacing: 0;
}
#inspmod .insp-card.k-idea.st-done:hover, #inspmod .insp-card.k-idea.st-done.sel, #inspmod .insp-card.k-idea.st-done:focus-within {
  height: auto !important; min-height: 236px; z-index: 8; overflow: visible;
}
#inspmod .insp-card.k-idea .insp-like { left: auto; right: 33px; top: 5px; bottom: auto; }
/* Every idea's own picture across the top of its card, a background for its
   words (Simon, 1 Nov 2026; inspire-words.js previewIdea / pvHtml): 16:9 at
   the card's width, fading into the card so the words stay readable, a quiet
   shimmer while it is on the way. */
#inspmod .insp-card.k-idea .insp-idea-pv {
  position: absolute; left: 0; right: 0; top: 0; aspect-ratio: 16 / 9; overflow: hidden; z-index: 0; pointer-events: none;
  border-radius: inherit; border-bottom-left-radius: 0; border-bottom-right-radius: 0;
}
#inspmod .insp-card.k-idea .insp-idea-pv img { display: block; width: 100%; height: 100%; object-fit: cover; opacity: .9; }
#inspmod .insp-card.k-idea .insp-idea-pv::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(17, 16, 20, .12) 0%, rgba(17, 16, 20, .45) 50%, #111014 100%);
}
#inspmod .insp-card.k-idea .insp-idea-pv.run {
  background: linear-gradient(100deg, rgba(255, 255, 255, .02) 20%, rgba(255, 255, 255, .07) 40%, rgba(255, 255, 255, .02) 60%) 0 0 / 220% 100%;
  animation: insp-pv-shim 1.6s linear infinite;
}
#inspmod .insp-card.k-idea .insp-idea-pv.run::after { background: linear-gradient(to bottom, transparent 40%, #111014 100%); }
@keyframes insp-pv-shim { from { background-position: 120% 0; } to { background-position: -120% 0; } }
#inspmod .insp-card.k-idea .insp-pt.insp-idea { z-index: 1; }
#inspmod .insp-card.k-idea .insp-idea.with-pv p { text-shadow: 0 1px 2px rgba(0, 0, 0, .85), 0 0 10px rgba(0, 0, 0, .55); }
/* No action row on an idea card (Simon, 1 Nov 2026: "Remove the 'Make image'
   and 'More ideas like this' buttons") -- the composer takes an idea further. */

/* ---- 8 or 4, by the Generate buttons (inspire-act.js) ---- */
/* Create's own toolbar pill (.tb-pill / .tb-ico / .tb-sel, 11-toolbar.css),
   only sized to sit beside the room's Generate buttons. */
#inspmod .tb-pill.insp-count { flex: none; width: 76px; min-width: 76px; max-width: 76px; height: 30px; box-sizing: border-box; }
#inspmod .insp-hero-row .tb-pill.insp-count { height: 34px; }
#inspmod .tb-pill.insp-count .tb-sel option { background: #111114; color: var(--text); }

/* ---- "Make images": the estimate first ---- */
.insp-pop {
  position: absolute; z-index: 26; top: 8px; right: 8px; width: 300px; box-sizing: border-box; padding: 12px 12px 10px;
  background: #121215; border: 1px solid rgba(var(--accent-rgb), .5); border-radius: var(--radius-lg);
  box-shadow: 0 18px 44px rgba(0, 0, 0, .6); font-size: var(--fs-small); color: var(--text-dim); cursor: default;
}
.insp-pop b { display: block; font-size: var(--fs-body); color: var(--text); }
.insp-pop p { margin: 4px 0 8px; line-height: 1.4; }
.insp-pop-est span { color: #fff; font-weight: 700; }
.insp-pop-est i { font-style: normal; color: var(--text-faint); }
.insp-pop-row { display: flex; justify-content: flex-end; align-items: center; gap: 8px; margin-top: 10px; }
.insp-pop-no {
  height: 30px; padding: 0 12px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--card);
  color: var(--text); font: inherit; font-size: var(--fs-small); cursor: pointer;
}
#insp-mkall svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---- the references box: the app's own (13-input-slots.css), placed ---- */
#inspmod .insp-refs { display: block; }
/* Wide enough for three of the app's reference cards in a row. */
#inspmod .insp-comp:not(.docked) { width: 500px; }
#inspmod .insp-refbox { margin: 0; }
#inspmod .insp-refbox .slot-card { cursor: pointer; }
#inspmod .insp-refbox.hot .slot-card.empty { border-color: var(--accent); background: var(--accent-soft); }
.insp-ref-on {
  position: absolute; left: 4px; bottom: 4px; z-index: 1; padding: 1px 5px; border-radius: 2px;
  background: rgba(0, 0, 0, .66); color: var(--text-dim); font-size: 9px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
}
.insp-hero-refs { margin-top: -2px; }
/* A narrow panel keeps its start box short: empty slots wait for the drawer. */
#inspmod.narrow:not(.refs-open) .insp-hero-refs.none { display: none; }

/* ---- the References section: the library, the top of the side panel ----
   (inspire-refs.js placeDrawer sets where.) Narrow, so it stacks: the search
   and the categories over the pictures. */
#reflib.insp-drawer {
  flex-direction: column; border-left: 1px solid var(--border); border-bottom: 1px solid var(--border);
  box-shadow: none; background: rgba(10, 10, 12, .99);
}
#reflib.insp-drawer .reflib-side { flex: 0 0 auto; max-height: 38%; padding: 10px 10px 4px; border-right: none; border-bottom: 1px solid var(--border); overflow: auto; }
#reflib.insp-drawer #reflib-search { margin-bottom: 8px; }
#reflib.insp-drawer .reflib-main { min-height: 0; }
#reflib.insp-drawer .reflib-brand { display: none; }
#reflib.insp-drawer .reflib-item { cursor: grab; }
/* A drawer's tiles are small: the hover tag chips (15g) would cover the
   middle of each, where a click has to pick. Tags are edited in the full
   library; here the search and the rail still read them. */
#reflib.insp-drawer .rl-chips { display: none; }
#inspmod.empty .insp-refs-btn { visibility: visible; }
.insp-refs-btn svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---- pictures are 16:9, and so are their tiles ---- */
#inspmod .insp-tiles { aspect-ratio: 16 / 9; }
#inspmod .insp-tiles.many { height: auto; width: 100%; max-height: 100%; aspect-ratio: 32 / 9; grid-template-columns: repeat(4, 1fr); }
#inspmod .insp-grid.words .insp-tiles.many { aspect-ratio: auto; height: 100%; }
#inspmod .insp-grid.words .insp-tile-idea { font-size: 12.5px; padding: 34px 16px 40px; -webkit-line-clamp: 14; }

/* ---- the room's own lightbox (inspire-lightbox.js) ---- */
.insp-lb {
  position: fixed; inset: 0; z-index: calc(var(--z-menu) + 30); display: flex; align-items: center; justify-content: center;
  background: rgba(4, 4, 6, .95); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.insp-lb.hidden { display: none; }
.insp-lb-fig { display: flex; flex-direction: column; align-items: center; gap: 12px; }
#insp-lb-img { display: block; object-fit: contain; background: #050506; box-shadow: 0 30px 80px rgba(0, 0, 0, .6); border-radius: var(--radius); }
.insp-lb-cap { max-width: min(900px, calc(100vw - 160px)); text-align: center; color: var(--text-dim); font-size: var(--fs-body); line-height: 1.45; }
.insp-lb-cap b { display: inline-block; margin: 0 8px; font-size: 9.5px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }
.insp-lb-cap p { margin: 4px 0 0; color: var(--text); max-height: 4.4em; overflow: auto; }
.insp-lb-n { font-size: 10.5px; color: var(--text-faint); }
.insp-lb-nav, .insp-lb-x {
  position: absolute; display: inline-flex; align-items: center; justify-content: center; padding: 0;
  border: 1px solid var(--border); background: rgba(16, 16, 19, .85); color: var(--text); cursor: pointer;
}
.insp-lb-nav { top: 50%; width: 44px; height: 64px; margin-top: -32px; border-radius: var(--radius); font-size: 32px; }
.insp-lb-nav.prev { left: 18px; }
.insp-lb-nav.next { right: 18px; }
.insp-lb-x { top: 16px; right: 18px; width: 36px; height: 36px; border-radius: 50%; font-size: 22px; }
.insp-lb-nav:hover, .insp-lb-x:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.insp-lb.one .insp-lb-nav { display: none; }
