/* goonlab — the pages that make and keep a bot (templates/bots/new.html,
   list.html, detail.html, _panel.html). The site's own sheets style the
   rest: goonlab.css (buttons, pills, notices, panels, the progress bar,
   the character chips) and, on the form, studio.css (the steps, the price
   beside them). Nothing here touches another page. */

/* ---- the form ---- */

.page-bot-new .bot-char-search {
  width: 100%;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text);
  padding: 0.55rem 1.1rem;
  font: inherit;
}
.page-bot-new .bot-char-search:focus { border-color: var(--accent); outline: none; }
.page-bot-new .step-title label { color: inherit; font: inherit; }
.page-bot-new #bot-model-mode-wrap[hidden],
.page-bot-new #bot-art-mode-wrap[hidden],
.page-bot-new #bot-kind-step[hidden],
.page-bot-new #bot-cast-step[hidden] { display: none; }
/* which pictures the bot shows (spec 68): each choice's words over its note */
.page-bot-new .bot-kind-choices > div { display: flex; flex-direction: column; gap: 0.6rem; }
.page-bot-new .bot-kind-text { display: flex; flex-direction: column; gap: 0.15rem; min-width: 0; }
.page-bot-new .bot-kind-text strong { color: var(--text); }
.page-bot-new .bot-kind-text .hint { overflow-wrap: anywhere; }
.page-bot-new #bot-model-mode-wrap { display: flex; flex-direction: column; gap: 0.4rem; }
.page-bot-new .studio-actions .btn-ghost { white-space: normal; }
.page-bot-new .notice ul.errorlist { margin: 0; }
.page-bot-new .bot-minute-value { font-family: var(--mono); font-weight: 700; color: var(--text); }
/* the extras made for the scenario (spec 64): the tick and its words in the step's title */
.page-bot-new .bot-kit-tick { display: inline-flex; align-items: flex-start; gap: 0.6rem; cursor: pointer; }
.page-bot-new .bot-kit-tick input { flex: none; width: 1.1rem; height: 1.1rem; margin-top: 0.2em; accent-color: var(--accent); }
.page-bot-new .bot-kit-tick span { overflow-wrap: anywhere; }
/* A TICK'S OWN NOTE (the owner, 2026-11-21 00:27 CET, on "Indefinitely" and the sentence under it: "the
   description of the checkbox does not make it obvious that it describes the checkbox, bad ui"): the note
   stands right under the tick's words and in line with them (the box's width and the gap to its words), close
   to its tick and apart from what follows, so that it reads as that tick's and as nothing else's */
/* the step's parts stand 0.8rem apart (studio.css .step-body): the note is drawn 0.2rem under its tick */
.page-bot-new .hint.tick-note, .page-bot-edit .hint.tick-note { margin: -0.6rem 0 0 1.7rem; }
/* a bot from a reference video (spec 110): the Scenario box's step is hidden while the AI writes
   the scenario; the reference's two fields, the note about the price and the tick stand apart */
.page-bot-new #bot-scenario-step[hidden],
.page-bot-new #bot-ref-fields[hidden] { display: none; }
.page-bot-new .bot-ref-fields { display: flex; flex-direction: column; gap: 0.8rem; margin-top: 1rem; }
.page-bot-new .bot-ref-fields .bot-ref-note { margin: 0; }
/* who may copy the bot (spec 69, section 2): the tick with its note under its words */
.page-bot-new #bot-copy-step[hidden] { display: none; }
.page-bot-new .bot-copy-step .bot-kit-tick { cursor: pointer; }

/* ---- the edit page (templates/bots/edit.html, spec 69): the form's steps,
   one column, no price beside them ---- */
.page-bot-edit .studio-form { grid-template-columns: minmax(0, 1fr); max-width: 52rem; }
.page-bot-edit .bot-edit-more { display: flex; flex-direction: column; gap: 0.8rem; max-width: 52rem; margin-top: 1rem; }
.page-bot-edit .bot-edit-more .estimate-value { font-family: var(--mono); font-weight: 700; color: var(--text); }
/* "Get more pictures": the form's slider under his words, and the estimate as the
   form shows it, the figure in the figure's style within a plain sentence
   (docs/bots/spec/74-the-bots-page-redesigned.md, section 8) */
.page-bot-edit .bot-more-form .bot-pictures-step { display: flex; flex-direction: column; gap: 0.5rem; margin-top: 0.4rem; }
.page-bot-edit .bot-more-form .bot-pictures-step .hint { margin: 0; }
.page-bot-edit .bot-more-estimate { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 0.4rem; margin: 0.4rem 0 0; }
.page-bot-edit .bot-edit-actions { display: flex; gap: 0.6rem; flex-wrap: wrap; align-items: center; }
.page-bot-edit .bot-edit-again { overflow-wrap: anywhere; }
/* the line under "Get these pictures" while it cannot be pressed (audit finding PW10) */
.page-bot-edit .bot-more-why { margin-top: 0.6rem; }
/* "Delete this scenario" at the foot of the page (templates/bots/_delete.html) */
.page-bot-edit .bot-edit-delete { max-width: 52rem; margin-top: 1.5rem; }
.page-bot-edit .bot-edit-delete .bot-delete-kept { margin: 0; }

/* ---- the bot's page: the extras made for it (spec 64) ---- */
.bot-extras { margin-top: 0.8rem; }
.bot-extras-title { margin: 0 0 0.4rem; color: var(--text); font-weight: 600; }
.bot-extras-list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 0.45rem; }
.bot-extras-list li { display: flex; flex-direction: column; gap: 0.1rem; min-width: 0; }
.bot-extras-name { font-weight: 700; color: var(--text); overflow-wrap: anywhere; }
.bot-extras-shows { color: var(--muted); overflow-wrap: anywhere; }

/* ---- the list ---- */

.bots-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap;
}
.bot-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
  gap: 1rem;
}
.bot-grid .empty-note { grid-column: 1 / -1; }
/* a card's cast: two lines at most, then three dots (a bot can have fifty characters; the
   whole list is the line's title and stands on the bot's own page) */
.bot-card-cast {
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2;
  overflow: hidden; overflow-wrap: anywhere;
}
.bot-card {
  display: flex; flex-direction: column;
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 14px; overflow: hidden; color: var(--text);
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
}
.bot-card:hover { text-decoration: none; border-color: var(--accent-dim); box-shadow: 0 8px 24px var(--glow); }
.bot-card-body { display: flex; flex-direction: column; gap: 0.25rem; padding: 0.8rem 1rem 1rem; min-width: 0; }
.bot-card-title { font-size: 1.02rem; overflow-wrap: anywhere; }
.bot-card-meta { color: var(--muted); font-size: 0.85rem; overflow-wrap: anywhere; }
.bot-state { align-self: flex-start; margin-top: 0.35rem; }
.bot-state-ready { color: var(--ok); border-color: var(--ok-dim); }
.bot-state-building, .bot-state-paused { color: var(--warn); border-color: var(--warn); }
.bot-state-failed { color: var(--danger); border-color: var(--danger); }

/* the plain cover: no picture, the site's own colours */
.bot-cover {
  display: block; aspect-ratio: 16 / 9; width: 100%;
  background:
    radial-gradient(120% 90% at 20% 10%, rgba(255, 106, 165, 0.35), transparent 60%),
    radial-gradient(120% 90% at 85% 90%, rgba(168, 85, 247, 0.35), transparent 60%),
    var(--panel-2);
}

/* the cover the maker uploaded (bots/cover.py): the picture fills the
   plain cover's box, cut to it */
img.bot-cover { object-fit: cover; height: auto; }

/* ---- the cover picture's field (the form) and the maker's own choices
   (the bot's page) ---- */
.bot-cover-field { display: flex; flex-direction: column; gap: 0.35rem; margin-top: 0.8rem; }
.bot-cover-field input[type="file"] { max-width: 100%; }
.bot-cover-field .hint[hidden] { display: none; }
.bot-cover-field .notice { margin: 0; }
/* the bot's tags on the form that makes a bot (docs/bots/spec/91, section 1.2),
   under the cover picture, in the same column */
.bot-tags-field { display: flex; flex-direction: column; gap: 0.35rem; margin-top: 0.8rem; min-width: 0; }
.bot-tags-field input { width: 100%; min-width: 0; }
/* the scenario's description on the form and the edit page (templates/bots/new.html and
   edit.html): its label, a box of about three lines and the note under it */
.bot-description-field { display: flex; flex-direction: column; gap: 0.35rem; min-width: 0; }
.studio-form .bot-description-field textarea { min-height: 6rem; }

/* ---- the frame on a cover picture (docs/bots/spec/92-the-part-of-a-cover-
   picture-that-shows.md; static/bots/cover.js): the picture whole, at most
   420 pixels high on a wide screen and the page's full width on a phone; the
   frame is placed in shares of the picture, so it stays right at every width;
   what lies outside it is dimmed by its own shadow, cut at the picture's edge */
.bot-cover-field.is-cropping { flex: 1 1 100%; }
.bot-cover-crop { display: flex; flex-direction: column; gap: 0.6rem; align-items: flex-start; width: 100%; margin-top: 0.4rem; }
.bot-cover-crop[hidden], .bot-cover-repart[hidden], .bot-cover-size[hidden] { display: none; }
.bot-cover-crop .hint { margin: 0; }
.bot-cover-repart { align-self: flex-start; }
.bot-cover-stage {
  position: relative; width: fit-content; max-width: 100%; overflow: hidden;
  border-radius: 8px; background: var(--panel-2); line-height: 0;
  user-select: none; -webkit-user-select: none;
}
.bot-cover-whole {
  display: block; width: auto; height: auto; max-width: 100%; max-height: 420px;
  pointer-events: none; -webkit-user-drag: none;
}
.bot-cover-frame {
  position: absolute; box-sizing: border-box; cursor: move; touch-action: none;
  border: 2px solid #fff; box-shadow: 0 0 0 200vmax rgba(0, 0, 0, 0.6);
}
.bot-cover-frame:focus { outline: none; }
.bot-cover-frame:focus-visible { border-color: var(--accent); }
.bot-cover-size { display: flex; flex-direction: column; gap: 0.25rem; width: min(100%, 22rem); }
/* the site's own slider (css/parts.css, .slider-input): 44 px tall, so a finger catches it */
.bot-cover-size input[type="range"] { width: 100%; flex: none; }
@media (max-width: 640px) {
  .bot-cover-stage { width: 100%; }
  .bot-cover-whole { width: 100%; max-height: none; }
}

.bot-own { display: flex; flex-wrap: wrap; gap: 0.9rem 1.4rem; align-items: flex-start; margin-top: 1rem; }
.bot-own .bot-cover-field { margin-top: 0; min-width: 0; }

/* ---- the bot's page ---- */

.bot-page { display: flex; flex-direction: column; gap: 1rem; }
.bot-hero { display: grid; grid-template-columns: 16rem minmax(0, 1fr); gap: 1.2rem; align-items: start; }
.bot-cover-lg { border-radius: 12px; }
.bot-hero-text { display: flex; flex-direction: column; gap: 0.5rem; min-width: 0; }
/* the bot's tags under the line that names the characters (docs/bots/spec/91,
   section 1.4). On phones the site's chip row reaches the screen's edges
   (css/mobile.css, .tag-row); inside the bot's panel it stays within the
   panel's padding, as the row in a creator's header does */
.bot-hero-text > .bot-tag-row { margin-inline: 0; padding-inline: 0; }
/* a chip wider than its row (a tag of up to 48 characters on a phone) goes on
   to a second line instead of running past the screen; on the bot's pages and
   in the list of bots' row of most used tags */
.bot-tag-row .tag-chip,
.bots-popular-tags .tag-chip { max-width: 100%; white-space: normal; overflow-wrap: anywhere; }
.bot-title { font-size: 1.6rem; margin: 0; overflow-wrap: anywhere; }
.bot-facts { display: grid; gap: 0.35rem; margin-top: 0.3rem; }
.bot-facts div { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.bot-facts dt {
  font-family: var(--mono); font-size: 0.7rem; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.06em; min-width: 11rem; padding-top: 0.2rem;
}
.bot-facts dd { margin: 0; overflow-wrap: anywhere; }
.bot-progress { padding: 0.9rem 1.2rem; }
.bot-actions { display: flex; gap: 0.6rem; flex-wrap: wrap; align-items: center; }
.bot-ready { display: flex; flex-direction: column; gap: 0.7rem; align-items: flex-start; }
.bot-ready .section-title, .bot-section-title { margin: 0 0 0.4rem; }
.bot-page .notice { margin-bottom: 0; }
.bot-page .notice p { margin: 0 0 0.4rem; }
.bot-page .order-prompt-full { overflow-wrap: anywhere; }

/* ---- a picture the bot showed as its cover (the bot's page) ---- */
.bot-cover-choices { display: grid; grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr)); gap: 0.7rem; width: 100%; }
.bot-cover-choice { display: flex; flex-direction: column; gap: 0.35rem; margin: 0; min-width: 0; }
.bot-cover-choice img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 8px; background: var(--panel-2); }
.bot-cover-choice .btn { white-space: normal; }
.bot-cover-choice.is-current img { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---- the replays (templates/bots/replays.html, replay.html) ---- */
.replay-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.6rem; }
.replay-row {
  display: flex; flex-direction: column; gap: 0.2rem; min-width: 0;
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 0.75rem 1rem;
}
.replay-cast { color: var(--muted); font-size: 0.85rem; overflow-wrap: anywhere; }
.replay-delete { margin-top: 1rem; }

/* a row of a list of his replays (templates/bots/_replay_rows.html, docs/bots/spec/84,
   section 1): its facts, the line of what it follows, Watch, Continue, Sequel and Delete,
   and Delete's question under the row (static/bots/replay/rows.js) */
.replay-facts { margin: 0; color: var(--text); overflow-wrap: anywhere; }
.replay-follows { color: var(--muted); font-size: 0.85rem; overflow-wrap: anywhere; }
.replay-follows a { color: var(--accent); text-decoration: underline; text-underline-offset: 0.15em; }
.replay-row-buttons { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.45rem; }
.replay-row-buttons .btn { min-height: 40px; display: inline-flex; align-items: center; }
.replay-row-ask {
  margin-top: 0.5rem; padding: 0.7rem 0.9rem; max-width: 34rem;
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 12px;
}
.replay-row-ask[hidden] { display: none; }
.replay-row-ask p { margin: 0 0 0.6rem; }
.replay-row-ask-buttons { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.replay-row-ask-buttons .btn { min-height: 44px; }
@media (max-width: 720px) {
  .replay-row-buttons .btn { flex: 1 1 auto; justify-content: center; }
}

@media (max-width: 720px) {
  .bot-hero { grid-template-columns: 1fr; }
  .bot-facts { gap: 0.6rem; }
  .bot-facts div { gap: 0.1rem; }
  .bot-facts dt { min-width: 0; width: 100%; padding-top: 0; }
  .bot-title { font-size: 1.35rem; }
  /* no text under 12 pixels on a phone (docs/bots/spec/93-corrections-for-phones.md,
     section 5): the names of the facts, in their own letters and spacing */
  .bot-page .bot-facts dt { font-size: 12.5px; }
}

/* the tick "Indefinitely" under the minutes (docs/bots/spec/71-indefinitely.md) */
.page-bot-new .bot-indefinite { margin-top: 0.7rem; }

/* how many pictures the build gathers: the slider, its recommended number and the tick
   "AI chooses" (docs/bots/spec/73-how-many-pictures.md) */
.page-bot-new .bot-pictures-box { --thumb: 16px; max-width: 36rem; padding: 0.9rem 1rem 0.6rem; border: 1px solid var(--line); border-radius: 12px; background: var(--panel-2); }
.page-bot-new .bot-pictures-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.4rem 1rem; }
.page-bot-new .bot-pictures-value { font-size: 1.1rem; font-weight: 700; color: var(--text); }
.page-bot-new .bot-pictures-rec { font-size: 0.9rem; color: var(--muted); }
.page-bot-new .bot-pictures-rec strong { color: var(--accent); }
.page-bot-new .bot-pictures-track { position: relative; padding: 0.6rem 0 0.95rem; }
.page-bot-new .bot-pictures-track input[type="range"] { display: block; width: 100%; margin: 0; padding: 0; accent-color: var(--accent); }
.page-bot-new .bot-pictures-mark { position: absolute; bottom: 0.15rem; left: calc(var(--p, 0) * (100% - var(--thumb)) + var(--thumb) / 2); width: 0; height: 0; margin-left: -6px; border-left: 6px solid transparent; border-right: 6px solid transparent; border-bottom: 8px solid var(--accent); pointer-events: none; }
.page-bot-new .bot-pictures-ends { display: flex; justify-content: space-between; font-size: 0.8rem; color: var(--muted); }
.page-bot-new .bot-pictures-box.is-off .bot-pictures-rec, .page-bot-new .bot-pictures-box.is-off .bot-pictures-track, .page-bot-new .bot-pictures-box.is-off .bot-pictures-ends { opacity: 0.45; }
.page-bot-new .bot-pictures-head [hidden] { display: none; }
.page-bot-new .bot-pictures-ai { margin-top: 0.8rem; }
