/* Prompts open full screen like the wiki: the community's creations fill the view as a
   gallery and the composer sits in the right sidebar. Narrow windows show one at a time. */
#promptmodal {
  --prompt-bg: #121212;
  --prompt-line: #2e2c29;
  --prompt-text: #f5f2ec;
  --prompt-muted: #a39d93;
  --prompt-display: 'Oldschool Grotesk Condensed', 'Arial Narrow', Arial, sans-serif;
  width: calc(100vw - 24px); height: calc(100dvh - 24px); max-width: 1800px; max-height: none;
  box-sizing: border-box; padding: 0; border: 1px solid var(--prompt-line); border-radius: 20px; overflow: hidden;
  background: var(--prompt-bg); color: var(--prompt-text); color-scheme: dark; box-shadow: 0 24px 100px #0009;
}
#promptmodal::backdrop { background: #070709ba; backdrop-filter: blur(7px); }
.prompt-shell { position: relative; display: flex; flex-direction: column; height: 100%; }
/* The masthead is IP School's and the wiki's (view-masthead.css). */
.prompt-panes button:focus-visible { outline: 2px solid #fc5b0a; outline-offset: 2px; }
/* Feed and Create switch panes on narrow windows; wide ones show both. */
.prompt-panes { display: none; gap: 4px; padding: 4px; border: 1px solid #39332b; border-radius: 999px; background: #171614; }
.prompt-panes button { flex: 1; border: 0; border-radius: 999px; padding: 9px 18px; background: transparent; color: #aaa49a; cursor: pointer; font: 900 14px/1 var(--prompt-display); text-transform: uppercase; letter-spacing: .03em; }
.prompt-panes button[aria-pressed="true"] { background: #ffd400; color: #1a1712; }
.prompt-layout { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0,1fr) clamp(380px, 29vw, 460px); }
#feedscroll { min-width: 0; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 24px 24px 48px; display: flex; flex-direction: column; gap: 18px; }
#feedscroll:focus { outline: none; }
/* The toast of the map sits under the open view, so the view has its own. */
#prompt-toast { position: absolute; left: 50%; bottom: 24px; z-index: 5; max-width: calc(100% - 32px); box-sizing: border-box; margin: 0; padding: 11px 18px; border: 1px solid #494035; border-radius: 10px; background: #14110cf0; color: #f5e9d0; font-size: 15px; box-shadow: 0 12px 36px #0008; transform: translateX(-50%); pointer-events: none; opacity: 0; transition: opacity .3s; }
#prompt-toast.is-visible { opacity: 1; }
#prompt-toast:empty { display: none; }
/* A creation found from the masthead search is outlined for a moment. */
.feed-post.is-found { box-shadow: 0 0 0 2px #ffd400; transition: box-shadow .6s; }
#feednote { flex: none; margin: 0; padding: 12px 14px; border-radius: 14px; background: #27231e; border: 1px solid #494035; color: #e6dfd3; font-size: 13px; line-height: 1.45; }
#feednote[hidden] { display: none; }
#feednote button { margin-left: 8px; border: 0; background: none; padding: 0; color: #ffd400; font: inherit; font-weight: 700; cursor: pointer; }
/* Rows keep newest-first reading order; a card opening its comments grows on its own. */
#feedlist { flex: none; min-width: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; align-items: start; }
.feed-empty { grid-column: 1 / -1; margin: 0; padding: 20px 14px; border: 1px solid #2c2c30; border-radius: 18px; background: #1c1c1f; color: #aaa7a2; text-align: center; font-size: 14px; line-height: 1.5; }

/* one recipe */
.feed-post { min-width: 0; background: #1c1c1f; border: 1px solid #2c2c30; border-radius: 18px; padding: 14px 14px 12px; display: flex; flex-direction: column; gap: 12px; transition: border-color .15s ease; }
.feed-post:hover { border-color: #3a3a40; }
.feed-post.sample { border-style: dashed; }
.post-head { display: flex; align-items: center; gap: 10px; }
.post-avatar { width: 28px; height: 28px; flex: none; border-radius: 50%; overflow: hidden; background: #2a2a2e; border: 0; padding: 0; cursor: pointer; }
.post-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.post-who { min-width: 0; flex: 1; }
.post-handle { max-width: 100%; font: 900 16px/1.1 'Oldschool Grotesk Condensed', 'Arial Narrow', Arial, sans-serif; text-transform: uppercase; letter-spacing: .03em; color: #fdf9ef; background: none; border: 0; padding: 0; cursor: pointer; text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.post-handle:hover { color: #ffd400; }
/* The header stays on one line. Hovering the model shows the settled request cost. */
.post-model { flex: none; max-width: 45%; font: 400 13px/1.1 'Oldschool Grotesk Condensed', 'Arial Narrow', Arial, sans-serif; text-transform: uppercase; letter-spacing: .05em; color: #e6dfd3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: help; }
/* Every creation gets the same square frame in the gallery; enlarging shows it whole. */
.post-media { margin: 0; aspect-ratio: 1; border-radius: 14px; overflow: hidden; background: #101012; }
.post-media img, .post-media video { display: block; width: 100%; height: 100%; object-fit: cover; }
.post-media video { object-fit: contain; background: #000; }
.post-image-open { position: relative; display: block; width: 100%; height: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.post-image-open:focus-visible, .post-reference:focus-visible { outline: 2px solid #ffd400; outline-offset: 2px; }
.post-image-zoom { position: absolute; inset: 0; display: grid; place-items: center; background: #0007; color: #fff; opacity: 0; pointer-events: none; transition: opacity .18s ease; }
.post-image-zoom svg { width: 24px; height: 24px; fill: currentColor; }
.post-reference:hover .post-image-zoom, .post-reference:focus-visible .post-image-zoom { opacity: 1; }
#feed-image-viewer { position: fixed; inset: 0; width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 28px; box-sizing: border-box; border: 0; background: #000b; color: #fff; }
#feed-image-viewer[open] { display: flex; align-items: center; justify-content: center; }
#feed-image-viewer::backdrop { background: #0009; backdrop-filter: blur(5px); }
#feed-image-viewer img { display: block; max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; border-radius: 6px; box-shadow: 0 16px 70px #0009; }
.feed-image-close { position: absolute; top: 16px; right: 16px; z-index: 1; display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 1px solid #ffffff66; border-radius: 50%; background: #1c1c1fe8; color: #fff; font: 32px/1 Arial, sans-serif; cursor: pointer; }
.feed-image-close:hover, .feed-image-close:focus-visible { background: #343438; border-color: #fff; }
.post-prompt { background: #232326; border-radius: 12px; padding: 12px 14px; }
.post-prompt-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 26px; margin-bottom: 6px; }
.post-prompt-label { display: block; font-size: 10px; letter-spacing: .18em; text-transform: uppercase; color: #8f8a82; }
.post-prompt p { margin: 0; font-size: 15px; line-height: 1.5; font-style: italic; color: #e9e4da; white-space: pre-wrap; overflow-wrap: anywhere; }
/* the pictures sent with the prompt */
.post-references { list-style: none; margin: 0 0 9px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.post-reference { position: relative; width: 42px; height: 42px; display: block; overflow: hidden; border-radius: 8px; text-decoration: none; cursor: zoom-in; }
.post-reference img { width: 42px; height: 42px; box-sizing: border-box; border-radius: 8px; border: 1px solid #3a3a3f; background: #2a2a2e; object-fit: cover; display: block; }
.post-reference .post-image-zoom svg { width: 20px; height: 20px; }
.post-reference:hover img, .post-reference:focus-visible img { border-color: #ffd400; }
.post-prompt-toggle { display: inline-grid; place-items: center; width: 26px; height: 26px; flex: none; padding: 0; border: 1px solid #3d3d42; border-radius: 6px; background: transparent; color: #a4a19b; cursor: pointer; }
.post-prompt-toggle[hidden] { display: none; }
.post-scene.is-collapsed { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.post-prompt-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }
.post-prompt-toggle svg { width: 16px; height: 16px; fill: currentColor; }
.post-prompt-toggle:hover, .post-prompt-toggle:focus-visible { border-color: #67666a; background: #303034; color: #e1ded7; }
.post-prompt-toggle:focus-visible { outline: 2px solid #8b8983; outline-offset: 2px; }
.post-prompt-toggle[aria-expanded="true"] { background: #303034; color: #c9c5ba; }
.post-remix { margin: -2px 0 0; font-size: 13px; color: #a8a39b; }
.post-remix button { background: none; border: 0; padding: 0; font: inherit; color: #ffd400; cursor: pointer; font-weight: 700; }
.post-remix button:hover { text-decoration: underline; }
.post-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.post-prompt + .post-actions { margin-top: -4px; }
.post-actions button { display: inline-flex; align-items: center; gap: 4px; height: 34px; padding: 0 9px; border-radius: 999px; border: 1px solid transparent; background: #2a2a2e; color: #fdf9ef; cursor: pointer; font: 700 14px/1 -apple-system, "Segoe UI", sans-serif; font-variant-numeric: tabular-nums; }
.post-actions button svg { width: 15px; height: 15px; fill: currentColor; flex: none; }
.post-actions button:hover { background: #343438; }
.post-vote[aria-pressed="true"] { background: #ffd400; color: #1a1712; }
.post-vote[aria-pressed="true"]:hover { background: #ffdf3c; }
.post-copy { color: #ffd400; }
.post-copy.copied { background: #ffd400; color: #1a1712; }
.post-actions .post-delete { margin-left: auto; width: 34px; padding: 0; justify-content: center; color: #f1a993; }
.post-actions .post-delete:hover { background: #492a26; color: #fff; }
.post-actions .post-delete:disabled { opacity: .5; cursor: wait; }
.post-comments[aria-expanded="true"] { border-color: #494035; }
.post-thread { display: flex; flex-direction: column; gap: 10px; border-top: 1px solid #2c2c30; padding-top: 12px; }
.post-thread[hidden] { display: none; }
.feed-comment { display: flex; gap: 8px; align-items: flex-start; }
.feed-comment img { width: 28px; height: 28px; border-radius: 50%; flex: none; object-fit: cover; background: #2a2a2e; }
.feed-comment div { min-width: 0; }
.feed-comment b { font-size: 13px; color: #fdf9ef; }
.feed-comment small { color: #8f8a82; margin-left: 6px; font-size: 12px; }
.feed-comment p { margin: 3px 0 0; font-size: 14px; line-height: 1.45; color: #d8d3c9; white-space: pre-wrap; overflow-wrap: anywhere; }
.feed-reply { display: flex; gap: 8px; }
.feed-reply input { flex: 1; min-width: 0; height: 36px; padding: 0 12px; border-radius: 9px; border: 1px solid #3a3a3f; background: #141416; color: #fdf9ef; font-size: 14px; font-family: inherit; }
.feed-reply input::placeholder { color: #8f8a82; }
.feed-reply input:focus { outline: none; border-color: #fc5b0a; box-shadow: 0 0 0 3px #fc5b0a33; }
.feed-reply button { height: 36px; padding: 0 14px; border: 0; border-radius: 9px; background: #fc5b0a; color: #fff; cursor: pointer; font: 900 13px/1 'Oldschool Grotesk Condensed', 'Arial Narrow', Arial, sans-serif; text-transform: uppercase; }
.feed-reply button:hover { background: #ff6d1f; }
.feed-post.is-new { animation: feed-arrive 2.4s ease-out; }
@keyframes feed-arrive { from { border-color: #fc5b0a; box-shadow: 0 0 0 3px #fc5b0a55, 0 4px 18px #0003; } }

/* a creation on its way: the placeholder waits at the top until the post arrives */
.feed-pending .post-avatar { cursor: default; }
.feed-pending .post-handle { cursor: default; }
.feed-pending .post-handle:hover { color: #fdf9ef; }
.pending-media { position: relative; isolation: isolate; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; aspect-ratio: 1; padding: 20px; box-sizing: border-box; border-radius: 14px; overflow: hidden; background: #121214; text-align: center; }
.pending-media::before { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(110deg, #18181b 25%, #2a241d 42%, #3d2a18 50%, #2a241d 58%, #18181b 75%); background-size: 260% 100%; animation: pending-sheen 1.9s linear infinite; }
@keyframes pending-sheen { from { background-position: 130% 0; } to { background-position: -130% 0; } }
.pending-spinner { width: 40px; height: 40px; box-sizing: border-box; border-radius: 50%; border: 3px solid #ffffff1f; border-top-color: #fc5b0a; animation: pending-spin .9s linear infinite; }
@keyframes pending-spin { to { transform: rotate(1turn); } }
.pending-label { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.pending-label b { font: 900 18px/1.1 'Oldschool Grotesk Condensed', 'Arial Narrow', Arial, sans-serif; text-transform: uppercase; letter-spacing: .04em; color: #fdf9ef; }
.pending-elapsed { color: #ffd400; font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
.pending-media small { max-width: 250px; color: #a8a39b; font-size: 12.5px; line-height: 1.45; }
.feed-pending.failed .pending-media { aspect-ratio: auto; min-height: 180px; }
.feed-pending.failed .pending-media::before { animation: none; background: #1f1715; }
.pending-error { margin: 0; max-width: 300px; color: #f1cdbf; font-size: 14px; line-height: 1.45; }
.pending-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.pending-actions button, .pending-actions a { display: inline-flex; align-items: center; height: 34px; padding: 0 14px; border: 1px solid #494035; border-radius: 999px; background: #27231e; color: #fdf9ef; cursor: pointer; text-decoration: none; font: 900 13px/1 'Oldschool Grotesk Condensed', 'Arial Narrow', Arial, sans-serif; text-transform: uppercase; }
.pending-actions button:hover, .pending-actions a:hover { border-color: #ff8c41; }
.pending-actions .primary { border-color: #fc5b0a; background: #fc5b0a; color: #fff; }
.pending-actions .primary:hover { background: #ff6d1f; }
@media (prefers-reduced-motion: reduce) {
  .pending-media::before, .pending-spinner, .feed-post.is-new { animation: none; }
  .post-image-zoom { transition: none; }
}
.feed-status { margin: 0; font-size: 13px; color: #aaa7a2; }
.feed-status:empty { display: none; }

/* the composer: the view's right sidebar, sized by its own width */
#prompt-create { min-width: 0; min-height: 0; display: flex; flex-direction: column; border-left: 1px solid var(--prompt-line); background: #171614; color: #fdf9ef; container: composer / inline-size; }
.prompt-composer { position: relative; flex: 1; min-height: 0; display: flex; flex-direction: column; margin: 0; }
.composer-header { display: flex; align-items: center; gap: 12px; padding: 24px 0 0; }
.composer-heading { flex: 1; min-width: 0; }
.prompt-composer h2 { margin: 0; font: 900 27px/1.1 'Oldschool Grotesk Condensed', 'Arial Narrow', Arial, sans-serif; text-transform: uppercase; display: flex; align-items: center; gap: 10px; }
.prompt-composer h2:focus { outline: none; }
.composer-heading p { margin: 5px 0 0; color: #aaa49a; font-size: 13px; }
.composer-heading p[hidden] { display: none; }
/* The heading scrolls with the content; the bottom padding lets the last card clear the floating Generate. */
.composer-body { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 0 22px 88px; display: flex; flex-direction: column; gap: 18px; }
.composer-body > * { flex-shrink: 0; }
.composer-label { display: block; font: 800 12px/1 'Oldschool Grotesk Condensed', 'Arial Narrow', Arial, sans-serif; letter-spacing: .1em; text-transform: uppercase; color: #aaa49a; margin-bottom: 9px; }
.composer-body textarea, .composer-body input[type=url], .composer-body input[type=search] { width: 100%; box-sizing: border-box; border-radius: 11px; border: 1px solid #3a3a3f; background: #111113; color: #fdf9ef; font-size: 15px; padding: 12px 14px; font-family: inherit; }
.composer-body textarea { min-height: 150px; resize: vertical; line-height: 1.5; }
.composer-body textarea:focus, .composer-body input:focus { outline: none; border-color: #fc5b0a; box-shadow: 0 0 0 3px #fc5b0a33; }
.composer-body ::placeholder { color: #7f7a72; }
.composer-hint { margin: 9px 0 0; font-size: 12px; color: #8f8a82; line-height: 1.4; }
/* The chosen Ninja: name beside the portrait, number and level top right, Change
   below them, and the profile's kingdom, alignment and MBTI boxes underneath. */
/* The composer's three boxes: the Ninja, who else is in it, and what to make. */
.composer-card { padding: 14px; border: 1px solid #39332b; border-radius: 14px; background: #211e1b; }
.ninja-pick { display: grid; grid-template-columns: 64px minmax(0,1fr) auto; grid-template-areas: "face name change" "facts facts facts"; align-items: center; column-gap: 14px; }
.ninja-pick[hidden] { display: none; }
.ninja-pick.is-empty { cursor: pointer; }
.ninja-pick.is-empty:hover .ninja-pick-portrait { background: #34343a; color: #d8d3c9; }
.ninja-pick-portrait { grid-area: face; width: 64px; height: 64px; border-radius: 12px; overflow: hidden; background: #2a2a2e; display: flex; align-items: center; justify-content: center; color: #8f8a82; font-size: 20px; }
.ninja-pick-portrait img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ninja-pick-text { grid-area: name; min-width: 0; }
.ninja-pick-text b { display: block; font: 900 28px/1.05 'Oldschool Grotesk Condensed', 'Arial Narrow', Arial, sans-serif; text-transform: uppercase; letter-spacing: .01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ninja-pick-text small { display: block; margin-top: 6px; color: #aaa49a; font-size: 12px; }
.ninja-pick-text small[hidden] { display: none; }
.ninja-pick-badge { display: inline-block; margin-top: 7px; padding: 4px 9px; border: 1px solid #eebc4860; border-radius: 8px; background: #f7c84a17; color: #f9cd64; font: 900 12px/1.2 'Oldschool Grotesk Condensed', 'Arial Narrow', Arial, sans-serif; letter-spacing: .05em; text-transform: uppercase; white-space: nowrap; }
.ninja-pick-badge.is-level-two { border-color: #7fd48a80; background: #7fd48a1a; color: #9fe4a8; }
.ninja-pick-badge[hidden] { display: none; }
.ninja-pick .composer-change { grid-area: change; justify-self: end; align-self: start; }
.composer-facts { grid-area: facts; display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 8px; margin: 14px 0 0; }
.composer-facts[hidden] { display: none; }
.composer-fact { --fact-accent: #a7dfaa; --fact-surface: #1c241d; min-width: 0; padding: 10px 11px; border: 1px solid #ffffff12; border-radius: 12px; background: var(--fact-surface); }
.composer-fact[data-fact=alignment] { --fact-accent: #f8d27b; --fact-surface: #292419; }
.composer-fact[data-fact=personality] { --fact-accent: #bea7f2; --fact-surface: #24202d; }
.composer-fact dt { display: flex; align-items: center; gap: 5px; color: var(--fact-accent); font-size: 10.5px; font-weight: 800; line-height: 1.2; letter-spacing: .06em; text-transform: uppercase; }
.composer-fact dt svg { width: 15px; height: 15px; flex: none; }
.composer-fact dd { margin: 6px 0 0; line-height: 1.25; overflow-wrap: anywhere; }
.composer-fact dd strong { display: block; color: #fff8ee; font-size: 14.5px; font-weight: 700; }
.composer-fact dd span { display: block; margin-top: 2px; color: #c2bcb4; font-size: 12.5px; }
.composer-change { border: 0; background: none; padding: 4px; color: #ffd400; cursor: pointer; font: 800 13px/1.2 'Oldschool Grotesk Condensed', 'Arial Narrow', Arial, sans-serif; text-transform: uppercase; }
.composer-change:hover { text-decoration: underline; }
.composer-picker[hidden], .composer-editor[hidden], .composer-gate[hidden] { display: none; }
/* The picker opens inside the Ninja card, below a hairline, with one gap between each part. */
.composer-picker { display: flex; flex-direction: column; gap: 14px; margin-top: 14px; padding-top: 14px; border-top: 1px solid #39332b; }
.composer-picker-tabs { display: flex; width: max-content; }
.composer-picker input[type=search][hidden] { display: none; }
.composer-picker-filters { display: flex; flex-wrap: wrap; gap: 8px; }
.composer-picker-filters[hidden] { display: none; }
.composer-picker-filters button { border: 1px solid #39332b; border-radius: 999px; padding: 8px 13px; background: none; color: #aaa49a; cursor: pointer; font: 800 12px/1 'Oldschool Grotesk Condensed', 'Arial Narrow', Arial, sans-serif; letter-spacing: .08em; text-transform: uppercase; }
.composer-picker-filters button:hover { border-color: #6b6259; color: #fdf9ef; }
.composer-picker-filters button[aria-pressed="true"] { border-color: #ffd400; background: #ffd4001a; color: #ffd400; }
.ninja-results { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 10px; }
/* More than three rows scroll inside the card. */
.ninja-results[tabindex] { overflow-y: auto; scrollbar-gutter: stable; scrollbar-width: thin; overscroll-behavior: contain; }
.ninja-results[tabindex]::-webkit-scrollbar { width: 8px; }
.ninja-results[tabindex]:focus-visible { outline: 2px solid #ffd400; outline-offset: 3px; }
.ninja-results button { border: 2px solid transparent; border-radius: 12px; padding: 0; background: #232326; cursor: pointer; overflow: hidden; color: #fdf9ef; display: flex; flex-direction: column; align-items: stretch; font-family: inherit; }
.ninja-results button img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; }
.ninja-results button span { font-size: 11px; padding: 7px 4px; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ninja-results button:hover, .ninja-results button[aria-pressed="true"] { border-color: #ffd400; }
.composer-picker-empty { grid-column: 1 / -1; margin: 0; color: #aaa49a; font-size: 14px; }
.composer-gate { border: 1px solid #494035; border-radius: 12px; padding: 16px; color: #e6dfd3; line-height: 1.45; }
.composer-gate p { margin: 0 0 12px; }
.composer-develop { border: 0; border-radius: 999px; padding: 10px 16px; background: #fc5b0a; color: #fff; cursor: pointer; font: 900 13px/1 'Oldschool Grotesk Condensed', 'Arial Narrow', Arial, sans-serif; text-transform: uppercase; }
.composer-develop[hidden] { display: none; }
.composer-gate .composer-develop { height: 44px; padding: 0 22px; font-size: 16px; }
.composer-editor { display: flex; flex-direction: column; gap: 20px; }
/* Another Ninja and a location sit side by side; a choice fills its button, with × to remove it. */
.composer-add-row { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px; }
.composer-add { position: relative; min-width: 0; }
.composer-add-pick { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; height: 100%; min-height: 48px; padding: 8px 12px; border: 1px solid #39332b; border-radius: 12px; background: #171614; color: #fdf9ef; text-align: center; cursor: pointer; font: 800 15px/1.2 'Oldschool Grotesk Condensed', 'Arial Narrow', Arial, sans-serif; }
.composer-add-pick.is-chosen { justify-content: flex-start; padding: 7px 38px 7px 7px; text-align: left; }
.composer-add-pick > img, .composer-add-pick .composer-place-thumb { width: 34px; height: 34px; flex: none; border-radius: 8px; object-fit: cover; }
.composer-add-pick span:not(.composer-place-thumb) { display: block; min-width: 0; }
.composer-add-pick b, .composer-add-pick small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.composer-add-pick small { margin-top: 3px; color: #aaa49a; font: 12px/1.3 -apple-system, "Segoe UI", sans-serif; }
.composer-add-pick:hover, .composer-add-pick[aria-expanded="true"] { border-color: #ff8c41; }
.composer-add-pick:disabled { cursor: default; border-style: dashed; background: transparent; color: #7f7a72; }
.composer-add-pick:disabled:hover { border-color: #39332b; }
.composer-add-remove { position: absolute; top: 50%; right: 8px; width: 24px; height: 24px; margin-top: -12px; padding: 0; border: 1px solid #3a3a3f; border-radius: 50%; background: #171614; color: #d8d3c9; cursor: pointer; font: 15px/1 sans-serif; }
.composer-add-remove:hover { border-color: #ff8c41; color: #fdf9ef; }
.composer-add-remove[hidden] { display: none; }
.composer-add.has-reposition .composer-add-pick { padding-right: 68px; }
.composer-place-reposition { position: absolute; top: 50%; right: 38px; display: grid; place-items: center; width: 24px; height: 24px; margin-top: -12px; padding: 0; border: 1px solid #3a3a3f; border-radius: 50%; background: #171614; color: #d8d3c9; cursor: pointer; }
.composer-place-reposition svg { width: 14px; height: 14px; fill: currentColor; }
.composer-place-reposition:hover { border-color: #ff8c41; color: #fdf9ef; }
.composer-place-reposition:focus-visible { outline: 2px solid #ffd400; outline-offset: 3px; }
.composer-place-reposition[hidden] { display: none; }
.composer-relation-hint { font-size: 12px; color: #8f8a82; }
.composer-relation-hint[hidden] { display: none; }
.composer-inline-link { border: 0; background: none; padding: 0; color: #ffd400; font: inherit; font-weight: 700; cursor: pointer; text-decoration: none; }
.composer-inline-link:hover { color: #ffe252; }
.composer-relation-hint .composer-inline-link { color: #b9aa75; }
.composer-relation-hint .composer-inline-link:hover { color: #e6cb73; }
.composer-relation-choices { max-height: 245px; overflow-y: auto; margin-top: 8px; padding: 10px; border: 1px solid #39332b; border-radius: 12px; background: #171614; }
.composer-relation-choices[hidden] { display: none; }
.composer-relation-choices h3 { margin: 8px 0; color: #aaa49a; font: 900 12px/1 'Oldschool Grotesk Condensed', 'Arial Narrow', Arial, sans-serif; text-transform: uppercase; letter-spacing: .08em; }
.composer-relation-option { display: flex; align-items: center; gap: 10px; width: 100%; padding: 7px; margin-bottom: 5px; border: 1px solid transparent; border-radius: 10px; background: #2a2927; color: #fdf9ef; text-align: left; cursor: pointer; }
.composer-relation-option:hover, .composer-relation-option[aria-pressed="true"] { border-color: #ffd400; }
.composer-relation-option img { width: 44px; height: 44px; flex: none; border-radius: 8px; object-fit: cover; }
.composer-relation-option span { min-width: 0; }
.composer-relation-details { flex: 1; }
.composer-relation-option-head { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 4px 12px; }
.composer-relation-option-head b { overflow-wrap: anywhere; }
.composer-relation-option-labels { flex: none; margin-left: auto; color: #aaa49a; font-size: 12px; line-height: 1.3; text-align: right; white-space: nowrap; }
.composer-relation-personality { display: block; margin-top: 5px; color: #d8d3c9; font-size: 12px; font-style: normal; line-height: 1.35; }
/* Spots the community marked on the map: search at the top, named places first. */
.composer-place-choices { margin-top: 8px; border: 1px solid #39332b; border-radius: 12px; background: #171614; overflow: hidden; }
.composer-place-choices[hidden] { display: none; }
.composer-body .composer-place-choices input[type=search] { display: block; border: 0; border-bottom: 1px solid #39332b; border-radius: 0; background: transparent; font-size: 14px; padding: 11px 12px; }
.composer-body .composer-place-choices input[type=search]:focus { box-shadow: none; border-color: #51483d; }
.composer-place-list { max-height: 280px; overflow-y: auto; padding: 4px 10px 10px; }
.composer-place-list h3 { margin: 10px 0 8px; color: #aaa49a; font: 900 12px/1 'Oldschool Grotesk Condensed', 'Arial Narrow', Arial, sans-serif; text-transform: uppercase; letter-spacing: .08em; }
.composer-place-option { display: flex; align-items: center; gap: 10px; width: 100%; padding: 7px; margin-bottom: 5px; border: 1px solid transparent; border-radius: 10px; background: #2a2927; color: #fdf9ef; text-align: left; cursor: pointer; }
.composer-place-option:hover, .composer-place-option[aria-pressed="true"] { border-color: #ffd400; }
.composer-place-option > span:not(.composer-place-thumb) { min-width: 0; }
.composer-place-option b, .composer-place-option small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.composer-place-option small { margin-top: 3px; color: #aaa49a; font-size: 12px; line-height: 1.3; }
.composer-place-thumb { display: block; width: 44px; height: 44px; flex: none; border-radius: 8px; overflow: hidden; background: #06c6d1 linear-gradient(135deg, #0aa9b2, #08d3dd); }
.composer-place-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.composer-place-empty { margin: 10px 2px 4px; color: #aaa49a; font-size: 13px; line-height: 1.4; }
.composer-create-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.composer-create-head .composer-label { margin-bottom: 9px; white-space: nowrap; }
.composer-create-toolbar { margin: 0; }
.composer-mode-row { display: inline-flex; gap: 4px; padding: 4px; border: 1px solid #39332b; border-radius: 999px; background: #171614; }
.composer-mode-row button { border: 0; border-radius: 999px; padding: 9px 18px; background: transparent; color: #aaa49a; cursor: pointer; font: 900 13px/1 'Oldschool Grotesk Condensed', 'Arial Narrow', Arial, sans-serif; text-transform: uppercase; }
.composer-mode-row button[aria-pressed="true"] { background: #ffd400; color: #1a1712; }
.composer-model { position: relative; flex: 0 1 200px; min-width: 150px; max-width: 100%; }
.composer-model[hidden] { display: none; }
.composer-model-control { position: relative; height: 41px; box-sizing: border-box; border: 1px solid #39332b; border-radius: 999px; background: #171614; }
.composer-model-control::before { content: ''; position: absolute; inset: 4px 32px 4px 4px; border-radius: 999px; background: #2a2927; pointer-events: none; }
.composer-model-control::after { content: ''; position: absolute; right: 13px; top: 14px; width: 8px; height: 8px; border-right: 2px solid #aaa49a; border-bottom: 2px solid #aaa49a; transform: rotate(45deg); pointer-events: none; }
.composer-model select { position: relative; display: block; appearance: none; width: 100%; height: 100%; box-sizing: border-box; padding: 0 38px 0 17px; border: 0; border-radius: 999px; background: transparent; color: #fdf9ef; font: 900 13px/1 'Oldschool Grotesk Condensed', 'Arial Narrow', Arial, sans-serif; text-transform: uppercase; cursor: pointer; }
.composer-model-control:has(select:focus-visible) { outline: 2px solid #fc5b0a; outline-offset: 2px; }
.composer-model select:focus-visible { outline: none; }
.composer-remix { padding: 10px 12px; border-radius: 10px; background: #232326; border: 1px solid #3a3a3f; font-size: 13px; color: #d8d3c9; line-height: 1.45; }
.composer-remix b { color: #ffd400; }
.composer-remix[hidden] { display: none; }
/* The prompt field holds the text, any added images, and a quiet footer to add them. */
.composer-prompt-field { border: 1px solid #3a3a3f; border-radius: 11px; background: #111113; }
.composer-prompt-field:focus-within { border-color: #fc5b0a; box-shadow: 0 0 0 3px #fc5b0a33; }
.composer-prompt-editor { position: relative; }
.composer-body .composer-prompt-field textarea { display: block; padding-right: 52px; border: 0; border-radius: 11px 11px 0 0; background: transparent; }
.composer-body .composer-prompt-field textarea:focus { box-shadow: none; }
.composer-prompt-toggle { position: absolute; top: 8px; right: 8px; display: grid; place-items: center; width: 30px; height: 30px; padding: 0; border: 1px solid #3d3d42; border-radius: 7px; background: #111113; color: #a4a19b; cursor: pointer; }
.composer-prompt-toggle svg { width: 16px; height: 16px; fill: currentColor; }
.composer-prompt-toggle:hover { border-color: #67666a; color: #fdf9ef; background: #303034; }
.composer-prompt-toggle:focus-visible { outline: 2px solid #fc5b0a; outline-offset: 2px; }
.composer-prompt-toggle[aria-pressed="true"] { border-color: #fc5b0a; background: #fc5b0a22; color: #ff8b50; }
.composer-prompt-toggle:disabled { opacity: .5; cursor: default; }
.composer-prompt-note { margin: 8px 0 0; padding: 0; color: #ffb78f; font-size: 12px; line-height: 1.5; }
.composer-prompt-note[hidden] { display: none; }
.composer-prompt-footer { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-top: 1px solid #26262b; }
.composer-prompt-footer[hidden] { display: none; }
.composer-upload { position: relative; flex: none; height: 32px; box-sizing: border-box; padding: 0 12px; border-radius: 999px; border: 1px solid #3a3a3f; background: transparent; color: #d8d3c9; cursor: pointer; font: 900 12px/1 'Oldschool Grotesk Condensed', 'Arial Narrow', Arial, sans-serif; text-transform: uppercase; display: inline-flex; align-items: center; gap: 6px; }
.composer-upload[hidden] { display: none; }
.composer-upload input[type=file] { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.composer-upload svg { width: 15px; height: 15px; fill: currentColor; flex: none; }
.composer-upload:hover, .composer-upload:has(input:focus-visible) { border-color: #ff8c41; color: #fdf9ef; }
.composer-upload.composer-busy { opacity: .6; cursor: default; }
.composer-upload-hint { min-width: 0; color: #7f7a72; font-size: 12px; line-height: 1.35; }
.composer-attachments { list-style: none; margin: 0; padding: 0 10px 10px; display: flex; flex-direction: column; gap: 8px; }
.composer-attachments[hidden] { display: none; }
.composer-attachment { display: grid; grid-template-columns: 52px minmax(0,1fr) auto; align-items: center; gap: 12px; padding: 8px; border: 1px solid #2c2c30; border-radius: 10px; background: #1a1a1d; }
.composer-attachment.needs-choice { border-color: #fc5b0a; }
.composer-attachment img { display: block; width: 52px; height: 52px; border-radius: 8px; object-fit: cover; background: #101012; }
.composer-attachment-choice { min-width: 0; }
.composer-attachment-uses { display: inline-flex; gap: 3px; padding: 3px; border: 1px solid #39332b; border-radius: 999px; background: #171614; }
.composer-attachment-uses button { border: 0; border-radius: 999px; padding: 7px 12px; background: transparent; color: #aaa49a; cursor: pointer; font: 900 12px/1 'Oldschool Grotesk Condensed', 'Arial Narrow', Arial, sans-serif; text-transform: uppercase; white-space: nowrap; }
.composer-attachment-uses button:hover { color: #fdf9ef; }
.composer-attachment-uses button[aria-pressed="true"] { background: #ffd40024; color: #ffd400; }
.composer-attachment small { display: block; margin-top: 5px; color: #8f8a82; font-size: 12px; line-height: 1.3; }
.composer-attachment.needs-choice small { color: #ff9a5c; }
.composer-attachment-remove { width: 28px; height: 28px; padding: 0; border: 1px solid #3a3a3f; border-radius: 50%; background: transparent; color: #d8d3c9; cursor: pointer; font: 17px/1 sans-serif; }
.composer-attachment-remove:hover { border-color: #ff8c41; color: #fdf9ef; }
.composer-connect { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 0 0 18px; padding: 12px 14px; border: 1px solid #7a512f; border-radius: 12px; background: #2b211a; color: #e6dfd3; font-size: 13px; line-height: 1.45; }
.composer-connect[hidden] { display: none; }
.composer-connect p { flex: 1; min-width: 200px; margin: 0; }
.composer-connect p[hidden] { display: none; }
.composer-connect-title { margin: 0; color: #fff8ee; font: 900 23px/1.1 'Oldschool Grotesk Condensed', 'Arial Narrow', Arial, sans-serif; text-transform: uppercase; }
.composer-connect .composer-connect-description { max-width: 370px; color: #d8d0c5; font-size: 14px; line-height: 1.5; }
.composer-connect .composer-develop { background: #ffd400; color: #1a1712; }
.composer-connect .composer-develop:hover { background: #ffdf3c; }
/* The connection card replaces the editor until AI is connected. */
.composer-editor.needs-ai .composer-create > :not(.composer-connect),
.prompt-composer:has(.composer-editor.needs-ai, .composer-editor[hidden]) .composer-actions { display: none; }
.composer-editor.needs-ai .composer-create { padding: 0; border: 0; background: none; }
.composer-editor.needs-ai .composer-connect { flex-direction: column; justify-content: center; gap: 12px; margin: 0; padding: 24px 20px; text-align: center; }
.composer-editor.needs-ai .composer-connect p { min-width: 0; }
.composer-editor.needs-ai .composer-connect .composer-develop { height: 44px; padding: 0 22px; font-size: 16px; }
/* Generate floats over the content with no bar behind it; only the button and status take clicks. */
.composer-actions { position: absolute; right: 0; bottom: 0; left: 0; display: flex; justify-content: flex-end; gap: 10px; align-items: center; flex-wrap: wrap; padding: 16px 22px; pointer-events: none; }
.composer-actions > * { pointer-events: auto; }
.composer-actions .feed-status { flex: 1; min-width: 0; padding: 8px 12px; border-radius: 10px; background: #171614ee; }
.composer-post { box-shadow: 0 8px 24px #0009; }
.composer-post, .sb-studio .composer-post { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; min-height: 44px; padding: 0 24px; border: 0; border-radius: 999px; background: #fc5b0a; color: #fff; cursor: pointer; font: 900 16px/1 'Oldschool Grotesk Condensed', 'Arial Narrow', Arial, sans-serif; text-transform: uppercase; }
.composer-post svg { width: 17px; height: 17px; fill: currentColor; flex: none; }
.composer-post:hover { background: #ff6d1f; }
.composer-post:disabled, .sb-studio .composer-post:disabled { opacity: .6; cursor: default; }
@container composer (max-width: 400px) {
  .ninja-pick { grid-template-columns: 56px minmax(0,1fr) auto; column-gap: 12px; }
  .ninja-pick-portrait { width: 56px; height: 56px; }
  .ninja-pick-text b { font-size: 24px; }
  .composer-header { padding-top: 18px; }
  .composer-body { padding: 0 16px 76px; }
  .composer-actions { padding: 12px 16px max(12px, env(safe-area-inset-bottom)); }
}
@container composer (max-width: 410px) {
  .composer-create-head { flex-direction: column; align-items: stretch; }
  .composer-model { flex: none; width: auto; }
  .composer-add-pick { font-size: 14px; padding: 8px 10px; }
  /* A chosen Ninja or place needs the width for its name, so the pair stacks. */
  .composer-add-row:has(.is-chosen) { grid-template-columns: minmax(0,1fr); }
  .composer-attachment { grid-template-columns: 44px minmax(0,1fr) auto; gap: 10px; }
  .composer-attachment img { width: 44px; height: 44px; }
  .composer-attachment-uses button { padding: 7px 9px; }
}
/* In a sidebar the three fact boxes stay side by side, just tighter. */
@container composer (max-width: 440px) {
  .composer-facts { gap: 6px; }
  .composer-fact { padding: 8px 9px; }
  .composer-fact dt { font-size: 9.5px; letter-spacing: .04em; gap: 4px; }
  .composer-fact dt svg { width: 13px; height: 13px; }
  .composer-fact dd { margin-top: 5px; }
  .composer-fact dd strong { font-size: 13.5px; }
  .composer-fact dd span { font-size: 11.5px; }
}
/* Narrow windows: one pane at a time, switched from the masthead. */
@media (max-width: 820px) {
  .prompt-layout { grid-template-columns: minmax(0,1fr); }
  #promptmodal[data-pane="feed"] #prompt-create, #promptmodal[data-pane="create"] #feedscroll { display: none; }
  #prompt-create { border-left: 0; }
  .prompt-panes { display: flex; grid-column: 1 / -1; }
  #prompt-toast { bottom: 84px; }
}
@media (max-width: 640px) {
  #promptmodal { width: calc(100vw - 12px); height: calc(100dvh - 12px); border-radius: 12px; }
  #feedscroll { padding: 18px 14px 36px; }
  #feedlist { grid-template-columns: minmax(0,1fr); gap: 14px; }
}
