/*
 * Star Library.
 *
 * A module stylesheet, served directly rather than folded into the theme
 * pipeline, so the UPDATECODE constant in ChannelsThemes/classes/Theme.php is
 * not involved. Colours come from the site theme wherever possible; this file
 * only lays things out.
 *
 * Claude Code / 14th September 2026
 */

.starlibrary { max-width: 60rem; margin: 0 auto; }

.starlibrary-visually-hidden {
	position: absolute;
	width: 1px; height: 1px;
	margin: -1px; padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}

/* Search and counts */

.starlibrary-count { margin: 0; opacity: 0.8; }

.starlibrary-section-heading { margin: 2rem 0 1rem; text-align: left; font-size: 1.3em; }

/*
 * The homepage layout.
 *
 * Two columns: the library, and a stacked column of actions beside it. The
 * actions never push the memories down the page, and the memories start
 * immediately under the introduction.
 *
 * Buttons are the theme's own `dc-button`, not a class of ours. The theme
 * underlines every anchor through an `A:link` rule that outranks a single
 * class selector, so rolling our own meant an underline we could not remove
 * without !important, and a control that looked foreign on the page.
 */

.starlibrary-layout {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	gap: 1.5rem 2rem;
}

.starlibrary-main { flex: 1 1 22rem; min-width: 0; }

.starlibrary-aside {
	flex: 0 0 15rem;
	display: flex;
	flex-direction: column;
	align-items: stretch;
	margin-left: auto;
}

/* dc-button carries its own 3px margin, so the column needs no gap */
.starlibrary-aside .dc-button { width: 100%; box-sizing: border-box; }

.starlibrary-intro { margin-bottom: 1rem; }

.starlibrary-hero-lead {
	font-size: 1.15em;
	line-height: 1.6;
	max-width: 44rem;
	margin: 0 0 1rem;
}

.starlibrary-hero-closed { margin: 0; opacity: 0.8; }

.starlibrary-more { margin: 1.5rem 0 0; }

/*
 * The search bar, behind a magnifying glass.
 *
 * Hidden until asked for, because an empty search box at the top of a small
 * library is a question nobody asked. Closing it clears the box, so reopening
 * it never presents a stale search as though it were in force.
 *
 * The [hidden] rule is load bearing: the browser's own `[hidden]{display:none}`
 * is a bare attribute selector and loses to the `display: flex` below it, so
 * without this the bar was simply always open.
 */

.starlibrary-search { margin: 0 0 1.5rem; }

.starlibrary-search .starlibrary-count {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	margin: 0;
}

.starlibrary-search-toggle {
	line-height: 1;
	padding: 0.3rem 0.6rem;
	font-size: 1em;
	cursor: pointer;
}

.starlibrary-search-form {
	display: flex;
	flex-wrap: nowrap;
	gap: 0.5rem;
	align-items: center;
	margin-top: 0.75rem;
	max-width: 32rem;
}

.starlibrary-search-form[hidden] { display: none; }

/* The form rules give every input 100% width, which broke the row in two */
.starlibrary .starlibrary-search-form input[type="search"] {
	flex: 1 1 auto;
	min-width: 0;
	width: auto;
	margin: 0;
}

.starlibrary-search-form button { flex: 0 0 auto; white-space: nowrap; }

/* The filters and categories that close the homepage */

.starlibrary-footer-filters {
	margin-top: 3rem;
	padding-top: 1.5rem;
	border-top: 1px solid rgba(0,0,0,0.1);
}

/*
 * The browse page.
 *
 * Every control is labelled. The unlabelled row of boxes this replaced gave a
 * reader three drop downs and no idea what any of them would do.
 */

.starlibrary-filters {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	gap: 1rem;
	padding: 1rem 1.25rem;
	margin-bottom: 1.5rem;
	border: 1px solid rgba(0,0,0,0.12);
	border-radius: 0.4rem;
	background: rgba(0,0,0,0.02);
}

.starlibrary-filter { display: flex; flex-direction: column; gap: 0.3rem; }

.starlibrary .starlibrary-filter label {
	margin: 0;
	font-size: 0.85em;
	font-weight: bold;
	opacity: 0.75;
}

.starlibrary-filter-query { flex: 1 1 16rem; }

.starlibrary .starlibrary-filter-query input[type="search"] { width: 100%; }

.starlibrary-filter-check { justify-content: flex-end; }

.starlibrary .starlibrary-filter-check .starlibrary-checkbox {
	margin: 0;
	font-weight: normal;
	font-size: 0.95em;
	white-space: nowrap;
}

.starlibrary-filter-actions { flex-direction: row; align-items: center; gap: 1rem; }

.starlibrary-filter-clear { font-size: 0.9em; opacity: 0.75; }

.starlibrary-results-bar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	margin-bottom: 1.25rem;
}

.starlibrary-results-bar .starlibrary-language-filter { margin-bottom: 0; }

.starlibrary-results-bar .starlibrary-count { font-size: 1.05em; opacity: 1; }

/* A narrow screen has no room for a column beside the text */

@media (max-width: 40rem) {

	.starlibrary-actions {
		float: none;
		width: auto;
		max-width: none;
		margin: 0 0 1.5rem 0;
	}

	.starlibrary-filters { flex-direction: column; align-items: stretch; }

	.starlibrary .starlibrary-filter-query input[type="search"] { min-width: 0; }
}

.starlibrary-empty-state {
	padding: 2.5rem 1.5rem;
	text-align: center;
	border: 1px dashed rgba(0,0,0,0.2);
	border-radius: 0.4rem;
}

.starlibrary-empty-state h2 { margin-top: 0; }

/* Category chips: the homepage's compact form */

.starlibrary-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin-bottom: 1.5rem;
}

.starlibrary-chip {
	display: inline-flex;
	align-items: baseline;
	gap: 0.4rem;
	padding: 0.35rem 0.8rem;
	border: 1px solid rgba(0,0,0,0.15);
	border-radius: 1.2rem;
	font-size: 0.9em;
	text-decoration: none;
	white-space: nowrap;
}

.starlibrary-chip:hover,
.starlibrary-chip:focus { border-color: rgba(0,0,0,0.4); }

.starlibrary-chip-count { font-size: 0.85em; opacity: 0.6; }

.starlibrary-chip-all { font-weight: bold; }

.starlibrary-report-image { display: block; font-size: 0.8em; opacity: 0.6; margin-top: 0.2rem; }

.starlibrary-report-scope { display: block; font-size: 0.9em; opacity: 0.75; }

/* Category tiles: the fuller form, used on the about page */

.starlibrary-categories {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr));
	gap: 1rem;
	margin-bottom: 2rem;
}

.starlibrary-category-tile {
	display: block;
	padding: 1rem;
	border: 1px solid rgba(0,0,0,0.12);
	border-radius: 0.4rem;
	text-decoration: none;
}

.starlibrary-category-tile img { width: 100%; height: auto; border-radius: 0.3rem; }

.starlibrary-category-name { display: block; font-weight: bold; margin-top: 0.5rem; }

.starlibrary-category-description { display: block; font-size: 0.9em; opacity: 0.75; }

.starlibrary-category-count { display: block; font-size: 0.85em; opacity: 0.6; margin-top: 0.35rem; }

/* The category selector on the drafts form */

.starlibrary-category-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
	gap: 0.5rem 1.25rem;
	margin-top: 0.75rem;
}

.starlibrary-category-option {
	display: grid;
	grid-template-columns: auto 1fr;
	grid-template-areas: "box name" ". help";
	gap: 0 0.5rem;
	align-items: baseline;
	margin: 0;
	padding: 0.4rem 0.5rem;
	border-radius: 0.3rem;
	font-weight: normal;
	cursor: pointer;
}

.starlibrary-category-option:hover { background: rgba(0,0,0,0.04); }

.starlibrary-category-option input { grid-area: box; width: auto; }

.starlibrary-category-option-name { grid-area: name; font-weight: bold; }

.starlibrary-category-option-help {
	grid-area: help;
	font-size: 0.82em;
	opacity: 0.7;
	line-height: 1.35;
}

.starlibrary-scan-prompt { margin-bottom: 0.75rem; }

/* Listings */

.starlibrary-list {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr));
	gap: 1.5rem;
}

.starlibrary-card {
	border: 1px solid rgba(0,0,0,0.12);
	border-radius: 0.4rem;
	overflow: hidden;
	display: flex;
	flex-direction: column;
}

.starlibrary-card-image img { width: 100%; height: auto; display: block; }

.starlibrary-card-body { padding: 1rem; }

.starlibrary-card-title { margin: 0 0 0.5rem; font-size: 1.1em; }

.starlibrary-card-extract { margin: 0 0 0.75rem; }

.starlibrary-card-meta,
.starlibrary-card-categories { margin: 0; font-size: 0.85em; opacity: 0.75; }

.starlibrary-card-meta .starlibrary-when { margin-right: 0.75rem; }

/* One memory */

.starlibrary-memory-images {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
	gap: 1rem;
	margin-bottom: 1.5rem;
}

.starlibrary-memory-image { margin: 0; }

.starlibrary-memory-image img { width: 100%; height: auto; border-radius: 0.3rem; }

.starlibrary-memory-image figcaption { font-size: 0.85em; opacity: 0.7; margin-top: 0.35rem; }

.starlibrary-memory-text { font-size: 1.05em; line-height: 1.65; }

.starlibrary-star-power {
	margin: 1.5rem 0;
	padding: 1rem 1.25rem;
	border-left: 3px solid rgba(0,0,0,0.2);
}

.starlibrary-star-power-label {
	display: block;
	font-size: 0.8em;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	opacity: 0.7;
}

.starlibrary-memory-footer { margin-top: 2rem; padding-top: 1rem; border-top: 1px solid rgba(0,0,0,0.12); }

.starlibrary-memory-meta { display: grid; grid-template-columns: max-content 1fr; gap: 0.35rem 1rem; }

.starlibrary-memory-meta dt { font-weight: bold; opacity: 0.7; }

.starlibrary-memory-meta dd { margin: 0; }

.starlibrary-memory-actions { display: flex; gap: 1.5rem; margin-top: 1.5rem; }

/* Paging and filters */

.starlibrary-paging { display: flex; gap: 1rem; align-items: center; justify-content: center; margin: 2rem 0; }

.starlibrary-language-filter { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; margin-bottom: 1.5rem; font-size: 0.9em; }

.starlibrary-language-filter-label { opacity: 0.7; }

.starlibrary-language-filter .is-selected { font-weight: bold; text-decoration: none; }

/* Forms */

.starlibrary form label { display: block; margin-top: 1rem; font-weight: bold; }

.starlibrary form input[type="text"],
.starlibrary form input[type="search"],
.starlibrary form input[type="url"],
.starlibrary form textarea,
.starlibrary form select { width: 100%; max-width: 40rem; }

.starlibrary form input[type="number"] { width: 8rem; }

.starlibrary-checkbox,
.starlibrary-radio { font-weight: normal; display: block; margin-top: 0.5rem; }

.starlibrary-field-help { font-size: 0.85em; opacity: 0.75; margin: 0.25rem 0 0; font-weight: normal; }

.starlibrary-optional { font-weight: normal; opacity: 0.6; font-size: 0.85em; }

.starlibrary-errors { color: #a3202b; margin: 1rem 0; padding-left: 1.25rem; }

.starlibrary-draft-status { margin-top: 1rem; min-height: 1.4em; }

.starlibrary-draft-status.is-error { color: #a3202b; }

.starlibrary-draft-actions { display: flex; gap: 1rem; align-items: center; margin-top: 1.5rem; }

/* The uploader */

.starlibrary-uploader { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid rgba(0,0,0,0.12); }

.starlibrary-uploader-guidance { font-size: 0.9em; opacity: 0.8; }

.starlibrary-uploader-list {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr));
	gap: 1rem;
	margin: 1rem 0;
}

.starlibrary-uploader-item { margin: 0; padding: 0.75rem; border: 1px solid rgba(0,0,0,0.12); border-radius: 0.3rem; }

.starlibrary-uploader-item img { width: 100%; height: auto; border-radius: 0.2rem; }

.starlibrary-uploader-alt { font-size: 0.85em; font-weight: normal; }

.starlibrary-uploader-drop {
	padding: 2rem;
	border: 2px dashed rgba(0,0,0,0.25);
	border-radius: 0.4rem;
	text-align: center;
}

.starlibrary-uploader-drop.is-over { border-color: #3b7ddd; background: rgba(59,125,221,0.06); }

.starlibrary-uploader-choose { display: inline-block; font-weight: bold; cursor: pointer; }

.starlibrary-uploader-status { margin-top: 0.75rem; min-height: 1.4em; }

/* The submission gate */

.starlibrary-submit-preview { padding: 1.25rem; background: rgba(0,0,0,0.03); border-radius: 0.4rem; }

.starlibrary-scan { margin: 2rem 0; }

.starlibrary-scan-findings { list-style: none; padding: 0; }

.starlibrary-scan-findings li { padding: 0.4rem 0.6rem; border-left: 3px solid transparent; margin-bottom: 0.4rem; }

.starlibrary-finding-likely { border-left-color: #c0392b; background: rgba(192,57,43,0.06); }

.starlibrary-finding-possible { border-left-color: #d19a24; background: rgba(209,154,36,0.06); }

.starlibrary-scan-findings code { font-weight: bold; margin-right: 0.6rem; }

.starlibrary-licence { margin: 2rem 0; }

.starlibrary-licence-text {
	max-height: 22rem;
	overflow-y: auto;
	padding: 1rem;
	border: 1px solid rgba(0,0,0,0.15);
	border-radius: 0.3rem;
	font-size: 0.92em;
	line-height: 1.6;
}

.starlibrary-licence-machine { font-size: 0.9em; opacity: 0.8; font-style: italic; }

.starlibrary-declaration { margin: 1.5rem 0; font-weight: normal; }

.starlibrary-real-name { opacity: 0.7; }

/* The contributor's own list */

/*
 * The contributor's own Star Memories.
 *
 * Cards rather than a table. A table is for comparing rows against each other,
 * and nobody compares their own memories; and its five columns forced the
 * attribution control into a cell far too narrow for it.
 *
 * "Write a Star Memory" and "My settings" are page buttons now, set in
 * process(), so there is no toolbar here at all.
 */

.starlibrary-closed-notice {
	margin: 0 0 1.5rem;
	padding: 0.8rem 1rem;
	border-radius: 0.4rem;
	background: rgba(0,0,0,0.05);
	opacity: 0.85;
}

.starlibrary-status-counts {
	list-style: none;
	padding: 0;
	margin: 0 0 1.5rem;
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}

.starlibrary-status-pill {
	display: inline-block;
	padding: 0.2rem 0.7rem;
	border-radius: 1rem;
	font-size: 0.8em;
	font-weight: bold;
	white-space: nowrap;
	background: rgba(0,0,0,0.07);
	color: #333;
}

.starlibrary-status-pill.is-published { background: #2e8b57; color: #fff; }
.starlibrary-status-pill.is-pending   { background: #d99b1c; color: #241a05; }
.starlibrary-status-pill.is-draft     { background: rgba(0,0,0,0.1); color: #333; }
.starlibrary-status-pill.is-rejected  { background: #a3202b; color: #fff; }
.starlibrary-status-pill.is-withdrawn { background: rgba(0,0,0,0.5); color: #fff; }

.starlibrary-my-cards { display: flex; flex-direction: column; gap: 1.25rem; }

.starlibrary-my-card {
	padding: 1.5rem 1.75rem;
	border: 1px solid rgba(0,0,0,0.12);
	border-left: 4px solid rgba(0,0,0,0.12);
	border-radius: 0.5rem;
	background: #fff;
	box-shadow: 0 1px 3px rgba(15,23,42,.06);
}

/* The status at a glance, before anything has been read */
.starlibrary-my-card.starlibrary-status-published { border-left-color: #2e8b57; }
.starlibrary-my-card.starlibrary-status-pending   { border-left-color: #d99b1c; }
.starlibrary-my-card.starlibrary-status-rejected  { border-left-color: #a3202b; }

.starlibrary-my-card-header {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: 0.75rem;
	padding-bottom: 0.9rem;
	border-bottom: 1px solid rgba(0,0,0,0.08);
}

/*
 * The title is a plain heading, whatever the site does to h3 elsewhere.
 *
 * The channel stylesheet paints a full width highlight bar behind an h3, which
 * is right for a heading in an article and wrong inside a card, where it
 * swallowed the whole top of the card. Everything the bar depends on is
 * stated here rather than relied upon.
 */
.starlibrary .starlibrary-my-card-title {
	margin: 0;
	padding: 0;
	font-size: 1.15em;
	line-height: 1.3;
	text-align: left;
	background: none;
	border: 0;
	color: inherit;
}

.starlibrary-my-card-body {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	justify-content: space-between;
	gap: 1rem 1.5rem;
	padding-top: 1rem;
}

.starlibrary-my-card-detail { flex: 1 1 20rem; min-width: 0; }

.starlibrary-my-card-meta { margin: 0; font-size: 0.85em; opacity: 0.7; }

.starlibrary-my-card-credit { margin: 0.9rem 0 0; font-size: 0.9em; opacity: 0.85; }

.starlibrary-rejection {
	font-size: 0.85em;
	margin: 0.9rem 0 0;
	padding: 0.6rem 0.8rem;
	border-radius: 0.3rem;
	background: rgba(163,32,43,0.08);
}

.starlibrary-attribution-form {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	align-items: center;
	margin-top: 0.9rem;
}

.starlibrary .starlibrary-attribution-form label {
	margin: 0;
	font-size: 0.85em;
	font-weight: bold;
	opacity: 0.75;
}

.starlibrary .starlibrary-attribution-form select,
.starlibrary .starlibrary-attribution-form input[type="text"] { width: auto; min-width: 11rem; margin: 0; }

/* Says what just happened, and holds its room so nothing shifts when it does */
.starlibrary-credit-state {
	font-size: 0.85em;
	min-height: 1.2em;
	color: #2e8b57;
	transition: opacity 0.2s;
}

.starlibrary-credit-state.is-error { color: #a3202b; font-weight: bold; }

/* Stacked and right aligned, so the same action is in the same place on every card */
.starlibrary-my-actions {
	flex: 0 0 12rem;
	display: flex;
	flex-direction: column;
	align-items: stretch;
	margin-left: auto;
}

.starlibrary-my-actions .dc-button { width: 100%; box-sizing: border-box; }

.starlibrary .starlibrary-danger { color: #a3202b; }

/*
 * Admin.
 *
 * The same cards, chips and pills the contributor sees on their own screens,
 * because a moderator reading a queue is reading the same things a reader
 * reads and there is no reason for them to look like a different product.
 *
 * jQuery UI paints the tab strip, so what is here only quietens it down to
 * match: the widget's own chrome is heavier than anything else on the page.
 *
 * Claude Code / 15th September 2026
 */

.starlibrary-admin { max-width: none; }

/*
 * The tab strip.
 *
 * Deliberately almost empty. The tabs are the framework's jQuery UI widget and
 * they are meant to look like the tabs on Channels, Comms and Modules, which is
 * the whole reason for using the widget rather than rolling a tab strip here.
 * An earlier version of this file restyled them into flat pills, which made
 * this the one admin screen in SpaceNode that looked like something else.
 *
 * What is left is what the widget has no opinion about: the count on a tab,
 * and the panel while it is being fetched.
 */

.starlibrary-admin-tab-count {
	display: inline-block;
	margin-left: 0.4rem;
	padding: 0.05rem 0.5rem;
	border-radius: 1rem;
	font-size: 0.75em;
	font-weight: bold;
	background: #d99b1c;
	color: #241a05;
}

.starlibrary-admin-panel.is-loading { opacity: 0.45; }

/* What the last action had to say */

.starlibrary-admin-message {
	padding: 0.75rem 1rem;
	margin: 0 0 1.25rem;
	border-radius: 0.4rem;
	background: rgba(46,139,87,0.1);
}

.starlibrary-admin-error {
	padding: 0.75rem 1rem;
	margin: 0 0 1.25rem;
	border-radius: 0.4rem;
	background: rgba(192,57,43,0.1);
	color: #a3202b;
}

.starlibrary-admin-status { min-height: 1.4em; margin: 0 0 1rem; color: #2e8b57; }

.starlibrary-admin-status.is-error { color: #a3202b; font-weight: bold; }

/* What is waiting, at a glance */

.starlibrary-admin-counts {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	list-style: none;
	margin: 0 0 1.5rem;
	padding: 0;
}

.starlibrary-admin-count {
	display: flex;
	flex-direction: column;
	min-width: 6.5rem;
	padding: 0.7rem 1rem;
	border: 1px solid rgba(0,0,0,0.1);
	border-left: 4px solid rgba(0,0,0,0.12);
	border-radius: 0.5rem;
	background: #fff;
	box-shadow: 0 1px 3px rgba(15,23,42,.06);
}

.starlibrary-admin-count.is-memory  { border-left-color: #2e8b57; }
.starlibrary-admin-count.is-comment { border-left-color: #d99b1c; }
.starlibrary-admin-count.is-report  { border-left-color: #a3202b; }

.starlibrary-admin-count-number { font-size: 1.5em; font-weight: bold; line-height: 1.1; }

.starlibrary-admin-count-label { font-size: 0.8em; opacity: 0.7; }

.starlibrary-admin-count-line { margin: 0 0 1rem; opacity: 0.8; }

/* Cards and rows */

.starlibrary-admin-queue,
.starlibrary-admin-rows { display: flex; flex-direction: column; gap: 1.25rem; }

.starlibrary-admin-card,
.starlibrary-admin-row,
.starlibrary-admin-licence {
	border: 1px solid rgba(0,0,0,0.12);
	border-left: 4px solid rgba(0,0,0,0.12);
	border-radius: 0.5rem;
	background: #fff;
	box-shadow: 0 1px 3px rgba(15,23,42,.06);
}

.starlibrary-admin-licence { padding: 1.5rem 1.75rem; margin-bottom: 1.25rem; }

.starlibrary-admin-card.is-memory  { border-left-color: #2e8b57; }
.starlibrary-admin-card.is-comment { border-left-color: #d99b1c; }
.starlibrary-admin-card.is-report  { border-left-color: #a3202b; }

/* Optimistic: it is on its way out before the server has answered */
.starlibrary-admin-card.is-leaving { opacity: 0.35; transition: opacity 0.15s ease-out; }

.starlibrary-admin-card-header {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: 0.75rem;
	padding: 0.9rem 1.75rem;
	border-bottom: 1px solid rgba(0,0,0,0.08);
}

.starlibrary-admin-kind {
	font-size: 0.75em;
	font-weight: bold;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	opacity: 0.6;
}

.starlibrary-admin-when { font-size: 0.8em; opacity: 0.6; }

.starlibrary-admin-card-body { padding: 1.25rem 1.75rem; }

/*
 * The card title is a plain heading, whatever the site does to h2 elsewhere.
 * The channel stylesheet paints a full width bar behind one, which swallows
 * the top of a card.
 */
.starlibrary-admin .starlibrary-admin-card-title {
	margin: 0 0 0.5rem;
	padding: 0;
	font-size: 1.15em;
	line-height: 1.3;
	text-align: left;
	background: none;
	border: 0;
	color: inherit;
}

.starlibrary-admin-meta { font-size: 0.85em; opacity: 0.75; }

.starlibrary-admin-quote {
	margin: 0.9rem 0 0;
	padding: 0.75rem 1rem;
	border-radius: 0.3rem;
	background: rgba(0,0,0,0.04);
	line-height: 1.6;
}

.starlibrary-admin-categories .starlibrary-chip { margin-right: 0.35rem; }

.starlibrary-admin-card-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	align-items: center;
	padding: 0.9rem 1.75rem;
	border-top: 1px solid rgba(0,0,0,0.08);
	background: rgba(0,0,0,0.02);
	border-radius: 0 0 0.5rem 0.5rem;
}

.starlibrary-admin-card-link { font-size: 0.9em; margin-left: auto; }

.starlibrary-admin-row {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	justify-content: space-between;
	gap: 1rem 1.5rem;
	padding: 1.25rem 1.75rem;
}

.starlibrary-admin-row-detail { flex: 1 1 22rem; min-width: 0; }

.starlibrary-admin-row-actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem;
	margin-left: auto;
}

.starlibrary-admin-empty {
	padding: 2rem 1.75rem;
	border: 1px dashed rgba(0,0,0,0.15);
	border-radius: 0.5rem;
	text-align: center;
	opacity: 0.75;
}

.starlibrary-admin-search { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0 0 1.25rem; }

.starlibrary-admin .starlibrary-admin-search input[type="search"] { flex: 1 1 18rem; margin: 0; max-width: 28rem; }

.starlibrary-admin-paging { display: flex; gap: 1rem; justify-content: center; margin: 1.5rem 0 0; }

.starlibrary-admin-findings { list-style: none; padding: 0; font-size: 0.9em; }

.starlibrary-admin-images { display: flex; flex-wrap: wrap; gap: 1rem; margin: 1rem 0; }

.starlibrary-admin-images figure { margin: 0; max-width: 12rem; }

.starlibrary-admin-images img { width: 100%; height: auto; border-radius: 0.3rem; }

.starlibrary-admin-table { width: 100%; border-collapse: collapse; }

.starlibrary-admin-table th,
.starlibrary-admin-table td { text-align: left; padding: 0.5rem; border-bottom: 1px solid rgba(0,0,0,0.1); vertical-align: top; }

.starlibrary-admin-inline-form { display: inline-flex; gap: 0.4rem; align-items: center; }

.starlibrary-admin .starlibrary-admin-inline-form select { width: auto; margin: 0; }

.starlibrary-admin-licence.is-current { border-left-color: #2e8b57; }

.starlibrary-badge { font-size: 0.75em; padding: 0.15rem 0.5rem; border-radius: 1rem; background: #2e8b57; color: #fff; vertical-align: middle; }

/* Categories: one short row each, dragged into order */

.starlibrary-admin-category-rows {
	list-style: none;
	margin: 0 0 2rem;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

.starlibrary-admin-category-row {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	padding: 0.6rem 0.9rem;
	border: 1px solid rgba(0,0,0,0.12);
	border-radius: 0.5rem;
	background: #fff;
	box-shadow: 0 1px 2px rgba(15,23,42,.05);
}

.starlibrary-admin-category-row.is-disabled { opacity: 0.55; }
.starlibrary-admin-category-row.is-saving { opacity: 0.7; }
.starlibrary-admin-category-row.is-leaving { opacity: 0.35; }
.starlibrary-admin-category-row.is-error { border-color: #a3202b; }

/* The row being dragged, and the gap it will drop into */
.starlibrary-admin-category-row.ui-sortable-helper { box-shadow: 0 6px 18px rgba(15,23,42,.18); }

.starlibrary-admin-category-row.ui-sortable-placeholder {
	visibility: visible !important;
	background: rgba(46,139,87,0.08);
	border: 1px dashed rgba(46,139,87,0.5);
	box-shadow: none;
}

.starlibrary-admin-drag {
	flex: 0 0 auto;
	cursor: grab;
	font-size: 1.1em;
	line-height: 1;
	opacity: 0.45;
	user-select: none;
}

.starlibrary-admin-drag:active { cursor: grabbing; }

.starlibrary-admin-tile {
	position: relative;
	flex: 0 0 3.5rem;
	width: 3.5rem;
	height: 3.5rem;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 0.35rem;
	overflow: hidden;
	background: rgba(0,0,0,0.05);
}

.starlibrary-admin-tile img { width: 100%; height: 100%; object-fit: cover; display: block; }

.starlibrary-admin-tile-empty { font-size: 1.3em; opacity: 0.4; }

/* Sits over the tile, and says what it is as soon as the row is touched */
.starlibrary-admin-tile-button {
	position: absolute;
	inset: 0;
	width: 100%;
	border: 0;
	padding: 0;
	font-size: 0.65em;
	font-weight: bold;
	line-height: 1.2;
	color: #fff;
	background: rgba(0,0,0,0.55);
	cursor: pointer;
	opacity: 0;
	transition: opacity 0.15s;
}

.starlibrary-admin-tile-button:focus,
.starlibrary-admin-category-row:hover .starlibrary-admin-tile-button { opacity: 1; }

.starlibrary-admin-category-fields {
	flex: 1 1 auto;
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 0.75rem;
	min-width: 0;
}

.starlibrary-admin-field { display: flex; flex-direction: column; gap: 0.15rem; min-width: 0; }

.starlibrary-admin-field.is-name { flex: 1 1 11rem; }
.starlibrary-admin-field.is-code { flex: 1 1 9rem; }
.starlibrary-admin-field.is-description { flex: 2 1 16rem; }

.starlibrary-admin-field-label { font-size: 0.7em; font-weight: bold; opacity: 0.6; }

.starlibrary-admin .starlibrary-admin-field input[type="text"] { width: 100%; margin: 0; }

.starlibrary-admin-category-actions {
	flex: 0 0 auto;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem 0.75rem;
	justify-content: flex-end;
	max-width: 16rem;
}

.starlibrary-admin .starlibrary-admin-category-actions .starlibrary-checkbox { margin: 0; font-size: 0.85em; }

.starlibrary-admin-category-count { font-size: 0.8em; opacity: 0.65; white-space: nowrap; }

.starlibrary-admin-edit { margin: 1rem 0 0; }

.starlibrary-admin-edit summary { cursor: pointer; font-weight: bold; }

@media (max-width: 40rem){

	.starlibrary-list { grid-template-columns: 1fr; }

	.starlibrary-memory-meta { grid-template-columns: 1fr; }

	.starlibrary-aside { flex-basis: 100%; margin-left: 0; }

	.starlibrary-my-card { padding: 1.1rem 1.25rem; }

	.starlibrary-my-actions { flex-basis: 100%; margin-left: 0; }

	.starlibrary .starlibrary-attribution-form select,
	.starlibrary .starlibrary-attribution-form input[type="text"] { width: 100%; min-width: 0; }

	.starlibrary-admin-card-header,
	.starlibrary-admin-card-body,
	.starlibrary-admin-card-actions,
	.starlibrary-admin-row { padding-left: 1.1rem; padding-right: 1.1rem; }

	.starlibrary-admin-licence { padding: 1.1rem 1.25rem; }

	.starlibrary-admin-card-link { margin-left: 0; }

	.starlibrary-admin-row-actions { margin-left: 0; flex-basis: 100%; }

	/* A row this narrow cannot be a row, so it stacks and the handle goes */
	.starlibrary-admin-category-row { flex-wrap: wrap; }

	.starlibrary-admin-category-actions { max-width: none; flex-basis: 100%; justify-content: flex-start; }

	.starlibrary-admin-drag { display: none; }
}

/*
 * The conversation on a Star Memory.
 *
 * An author's reply is indented and badged, because on an anonymous memory the
 * badge is the only thing that says who is speaking: the reply carries no name
 * at all, by construction. See StarLibraryCommentDirectory.
 *
 * Claude Code / 15th September 2026
 */

.starlibrary-comments {
	margin-top: 3rem;
	padding-top: 1.5rem;
	border-top: 1px solid rgba(0,0,0,0.1);
}

.starlibrary-comments-list { display: flex; flex-direction: column; gap: 1rem; }

.starlibrary-comments-empty { opacity: 0.7; }

.starlibrary-comment {
	padding: 1rem 1.25rem;
	border: 1px solid rgba(0,0,0,0.12);
	border-radius: 0.5rem;
	background: #fff;
}

.starlibrary-comment-reply {
	margin: 0.9rem 0 0 1.5rem;
	border-left: 3px solid #d99b1c;
	background: rgba(217,155,28,0.06);
}

.starlibrary-comment-byline {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 0.6rem;
	margin: 0 0 0.5rem;
	font-size: 0.9em;
}

.starlibrary-comment-who { font-weight: bold; }

.starlibrary-comment-when { opacity: 0.6; font-size: 0.9em; }

.starlibrary-comment-badge {
	padding: 0.1rem 0.5rem;
	border-radius: 1rem;
	font-size: 0.75em;
	font-weight: bold;
	background: #d99b1c;
	color: #241a05;
}

.starlibrary-comment-text { line-height: 1.6; }

.starlibrary-comment-reply-form {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	align-items: flex-start;
	margin: 0.9rem 0 0 1.5rem;
}

.starlibrary .starlibrary-comment-reply-form textarea { flex: 1 1 16rem; margin: 0; }

.starlibrary-comment-form { margin-top: 1.5rem; }

.starlibrary-comment-status { display: inline-block; margin-left: 0.75rem; font-size: 0.9em; color: #2e8b57; }

.starlibrary-comment-status.is-error { color: #a3202b; font-weight: bold; }

.starlibrary-comments-signin { margin-top: 1.5rem; opacity: 0.85; }

.starlibrary-memory-love { margin-top: 2rem; }


