/* Paperback Extension Repo — soft kawaii, light only */

:root {
	--bg: #fff5fa;
	--bg-blush: #ffe7f3;
	--bg-mint: #e6fbf7;
	--bg-lilac: #f1ebff;
	--card: #ffffff;
	--fg: #4a3350;
	--gray: #9c86a8;
	--border: #ffd9ec;
	--border-soft: #ffe9f4;
	--pink: #ff7ab8;
	--pink-deep: #f0559c;
	--cyan: #4fd3e0;
	--lilac: #b08bf0;
	--mint: #6fd8b8;
	--shadow: 0 6px 18px rgba(255, 122, 184, 0.13);
	--shadow-hover: 0 10px 26px rgba(255, 122, 184, 0.22);
	--radius: 1.25rem;
}

/* force light: the page is intentionally single-theme */
html {
	color-scheme: light;
	font-family:
		"Quicksand", "Nunito", system-ui, "Segoe UI", "Helvetica Neue", Arial,
		sans-serif;
	background: var(--bg);
	color: var(--fg);
	overflow-y: scroll;
	scroll-behavior: smooth;
}

body {
	margin: 0;
	padding: 0;
	color: var(--fg);
	scrollbar-gutter: stable;
	background:
		radial-gradient(1000px 420px at 12% -8%, var(--bg-blush) 0%, transparent 62%),
		radial-gradient(820px 380px at 92% 4%, var(--bg-mint) 0%, transparent 58%),
		radial-gradient(760px 420px at 50% 102%, var(--bg-lilac) 0%, transparent 60%),
		var(--bg);
	background-attachment: fixed;
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}
	* {
		animation: none !important;
		transition: none !important;
	}
}

/* ------------------------------------------------------------- header --- */

header {
	max-width: 760px;
	margin: 2.5rem auto 1.2em auto;
	padding: 1.5rem 1.5rem 0 1.5rem;
	text-align: center;
}

.header-sparkle {
	font-size: 1.6em;
	letter-spacing: 0.35em;
	margin-bottom: 0.35em;
	display: block;
	animation: float 4s ease-in-out infinite;
}

@keyframes float {
	0%,
	100% {
		transform: translateY(0);
	}
	50% {
		transform: translateY(-5px);
	}
}

header > h1 {
	font-size: 2.6em;
	font-weight: 700;
	margin: 0 0 0.25em 0;
	letter-spacing: -0.01em;
	line-height: 1.15;
}

.main-heading {
	background: linear-gradient(120deg, #ff7ab8 0%, #b08bf0 48%, #4fd3e0 100%);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
}

.main-description {
	color: var(--gray);
	font-size: 1.06em;
	font-weight: 500;
	margin: 0 auto;
	line-height: 1.6;
	max-width: 560px;
}

.main-description b {
	color: var(--pink-deep);
	font-weight: 700;
}

/* github icon */
#github-link {
	position: fixed;
	top: 1.4rem;
	right: 1.4rem;
	z-index: 100;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	background: var(--card);
	box-shadow: var(--shadow);
	border: 1.5px solid var(--border);
	text-decoration: none;
	transition:
		transform 0.18s ease,
		box-shadow 0.18s ease;
}
#github-link svg {
	width: 22px;
	height: 22px;
	fill: var(--pink-deep);
	display: block;
}
#github-link:hover,
#github-link:focus-visible {
	transform: translateY(-2px) rotate(-6deg);
	box-shadow: var(--shadow-hover);
}
@media (max-width: 640px) {
	#github-link {
		top: 0.7rem;
		right: 0.7rem;
		width: 38px;
		height: 38px;
	}
	#github-link svg {
		width: 19px;
		height: 19px;
	}
}

/* --------------------------------------------------------------- main --- */

main {
	max-width: 760px;
	margin: 1rem auto 2rem auto;
	padding: 0 1.5rem 2rem 1.5rem;
}

/* soft note cards */
.note {
	background: var(--card);
	border: 1.5px solid var(--border);
	border-radius: var(--radius);
	padding: 0.15em 1.15em;
	margin-bottom: 1.1em;
	line-height: 1.55;
	box-shadow: var(--shadow);
	font-size: 0.97em;
	font-weight: 500;
}
.note b {
	color: var(--pink-deep);
	font-weight: 700;
}
.note-compat {
	background: linear-gradient(135deg, #fff7fb, #f4fbff);
	border-color: var(--border-soft);
}
.note-sub {
	border-top: 2px dashed var(--border-soft);
	padding-top: 0.9em;
	font-size: 0.95em;
}

/* "how do I get 0.9" expander */
.note-how {
	padding: 0;
	overflow: hidden;
	background: linear-gradient(135deg, #fff7fb, #f2fbf8);
}
.note-how > summary {
	list-style: none;
	cursor: pointer;
	display: flex;
	align-items: center;
	gap: 0.5em;
	padding: 0.85em 1.15em;
	font-weight: 700;
	color: var(--pink-deep);
	user-select: none;
}
.note-how > summary::-webkit-details-marker {
	display: none;
}
.note-how > summary span {
	flex: 1 1 auto;
}
.note-how > summary:focus-visible {
	outline: 2px solid var(--pink);
	outline-offset: -3px;
	border-radius: var(--radius);
}
.note-how[open] .summary-chevron {
	transform: rotate(180deg);
}

.how-body {
	padding: 0 1.15em 0.4em 1.15em;
	border-top: 2px dashed var(--border-soft);
}
.how-body > p {
	margin: 0.9em 0 0.6em 0;
}
.how-body ol {
	margin: 0;
	padding-left: 1.3em;
}
.how-body li {
	margin-bottom: 0.5em;
	line-height: 1.5;
}
.how-body li::marker {
	color: var(--pink-deep);
	font-weight: 800;
}
.how-foot {
	color: var(--gray);
	font-size: 0.94em;
}
.note code {
	background: var(--bg-blush);
	border: 1px solid var(--border);
	border-radius: 8px;
	padding: 0.15em 0.45em;
	font-size: 0.94em;
}

/* ------------------------------------------------------------ filters --- */

#filter-container {
	display: flex;
	flex-direction: column;
	gap: 1.1em;
	margin-bottom: 1.5em;
}

.filter-label {
	color: var(--gray);
	font-size: 0.93em;
	font-weight: 700;
	letter-spacing: 0.02em;
	margin-bottom: 0.15em;
}

.filter-group {
	display: flex;
	flex-direction: column;
	gap: 0.4em;
}

#repo-search {
	width: 100%;
	font-family: inherit;
	font-size: 1em;
	font-weight: 500;
	padding: 0.75em 1.1em;
	border-radius: 999px;
	border: 2px solid var(--border);
	background: var(--card);
	color: var(--fg);
	box-shadow: var(--shadow);
	box-sizing: border-box;
	transition:
		border-color 0.18s,
		box-shadow 0.18s;
}
#repo-search::placeholder {
	color: #c9b6d2;
}
#repo-search:focus {
	outline: none;
	border-color: var(--pink);
	box-shadow: 0 0 0 4px rgba(255, 122, 184, 0.16);
}

#filter-menus-row {
	display: flex;
	flex-direction: row;
	gap: 0.9em;
	width: 100%;
}
#filter-menus-row .filter-group {
	flex: 1 1 0;
	min-width: 0;
}
@media (max-width: 640px) {
	#filter-menus-row {
		flex-direction: column;
	}
}

.select-wrapper {
	position: relative;
	width: 100%;
}

#version-select,
#category-select {
	font-family: inherit;
	font-size: 0.97em;
	font-weight: 600;
	padding: 0.7em 2.4em 0.7em 1.1em;
	border-radius: 999px;
	border: 2px solid var(--border);
	background: var(--card);
	color: var(--fg);
	appearance: none;
	-webkit-appearance: none;
	width: 100%;
	box-sizing: border-box;
	cursor: pointer;
	box-shadow: var(--shadow);
	transition:
		border-color 0.18s,
		box-shadow 0.18s;
}
#version-select:focus,
#category-select:focus {
	outline: none;
	border-color: var(--pink);
	box-shadow: 0 0 0 4px rgba(255, 122, 184, 0.16);
}

.select-chevron {
	position: absolute;
	right: 1em;
	top: 50%;
	transform: translateY(-50%);
	width: 16px;
	height: 16px;
	pointer-events: none;
	color: var(--pink);
}

/* ---------------------------------------------------------- repo list --- */

.list-meta {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 1em;
	margin-bottom: 0.4em;
	min-height: 1.6em;
}

.total-count {
	color: var(--gray);
	font-size: 0.93em;
	font-weight: 700;
	margin-left: auto;
	white-space: nowrap;
}

/* version bands — colour-coded to match each card's version badge so 0.9 and
   0.8 are told apart at a glance */
.group-header {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 0.55em;
	margin: 2em 0 0.9em 0;
	padding: 0.6em 0.85em;
	border-radius: 1em;
	border: 2px solid transparent;
}
.group-header:first-child {
	margin-top: 0.5em;
}

.group-pill {
	display: inline-block;
	margin: 0;
	padding: 0.35em 0.9em;
	border-radius: 999px;
	font-size: 0.92em;
	font-weight: 800;
	letter-spacing: 0.02em;
	color: #fff;
	white-space: nowrap;
	flex: 0 0 auto;
}

.group-count {
	font-size: 0.85em;
	font-weight: 700;
	white-space: nowrap;
	flex: 0 0 auto;
	margin-left: auto;
	opacity: 0.85;
}

/* 0.9 — cyan / mint */
.group-09 {
	background: linear-gradient(120deg, #e4fbfb, #eafaf4);
	border-color: #b6ecef;
}
.group-09 .group-pill {
	background: linear-gradient(120deg, var(--cyan), var(--mint));
	box-shadow: 0 3px 10px rgba(79, 211, 224, 0.35);
}
.group-09 .group-count {
	color: #2a8b98;
}

/* 0.8 — pink / lilac */
.group-08 {
	background: linear-gradient(120deg, #ffeaf5, #f3ebff);
	border-color: #ffcfe6;
}
.group-08 .group-pill {
	background: linear-gradient(120deg, var(--pink), var(--lilac));
	box-shadow: 0 3px 10px rgba(255, 122, 184, 0.35);
}
.group-08 .group-count {
	color: #a8559a;
}

#repo-list ul {
	list-style: none;
	padding: 0;
	margin: 0;
	display: flex;
	flex-direction: column;
	gap: 0.75em;
}

/* repo card */
.repo-card {
	background: var(--card);
	border: 2px solid var(--border-soft);
	border-radius: var(--radius);
	box-shadow: var(--shadow);
	overflow: hidden;
	transition:
		transform 0.18s ease,
		box-shadow 0.18s ease,
		border-color 0.18s ease;
}
.repo-card:hover {
	transform: translateY(-2px);
	box-shadow: var(--shadow-hover);
	border-color: var(--border);
}

.repo-top {
	display: flex;
	align-items: center;
	gap: 0.85em;
	padding: 0.95em 1.1em;
}

.repo-left {
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
	min-width: 0;
	gap: 0.18em;
}

.repo-title-row {
	display: flex;
	align-items: center;
	gap: 0.45em;
	flex-wrap: wrap;
}

.repo-name {
	font-weight: 700;
	font-size: 1.06em;
	color: var(--fg);
}

.repo-version-badge {
	display: inline-block;
	padding: 0.15em 0.6em;
	border-radius: 999px;
	font-size: 0.7em;
	font-weight: 800;
	letter-spacing: 0.04em;
	color: #fff;
}
.repo-version-09 {
	background: linear-gradient(120deg, var(--cyan), var(--mint));
}
.repo-version-08 {
	background: linear-gradient(120deg, var(--pink), var(--lilac));
}

.repo-url {
	color: var(--gray);
	font-size: 0.74em;
	font-weight: 500;
	word-break: break-all;
}

.repo-actions {
	display: flex;
	align-items: center;
	gap: 0.55em;
	flex: 0 0 auto;
}

.repo-add {
	display: inline-block;
	padding: 0.55em 1.05em;
	font-size: 0.76em;
	font-weight: 800;
	white-space: nowrap;
	border-radius: 999px;
	border: none;
	background: linear-gradient(120deg, var(--pink) 0%, var(--lilac) 100%);
	color: #fff;
	text-decoration: none;
	box-shadow: 0 4px 12px rgba(255, 122, 184, 0.35);
	transition:
		transform 0.16s ease,
		box-shadow 0.16s ease,
		filter 0.16s ease;
}
.repo-add:hover,
.repo-add:focus-visible {
	transform: translateY(-1px) scale(1.03);
	filter: brightness(1.05);
	box-shadow: 0 6px 16px rgba(255, 122, 184, 0.45);
}

.repo-github {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	border-radius: 50%;
	background: var(--bg-blush);
	color: var(--pink-deep);
	text-decoration: none;
	flex: 0 0 auto;
	transition:
		background 0.16s,
		transform 0.16s;
}
.repo-github svg {
	width: 17px;
	height: 17px;
	fill: currentColor;
	display: block;
}
.repo-github:hover,
.repo-github:focus-visible {
	background: var(--border);
	transform: rotate(-8deg);
}

/* ------------------------------------------------- expandable sources --- */

.repo-sources {
	border-top: 2px dashed var(--border-soft);
}

.repo-sources > summary {
	list-style: none;
	cursor: pointer;
	padding: 0.65em 1.1em;
	font-size: 0.84em;
	font-weight: 700;
	color: var(--pink-deep);
	display: flex;
	align-items: center;
	gap: 0.45em;
	user-select: none;
	transition: background 0.16s;
}
.repo-sources > summary::-webkit-details-marker {
	display: none;
}
.repo-sources > summary:hover {
	background: #fffafd;
}
.repo-sources > summary:focus-visible {
	outline: 2px solid var(--pink);
	outline-offset: -3px;
	border-radius: 0 0 var(--radius) var(--radius);
}

.summary-chevron {
	width: 14px;
	height: 14px;
	flex: 0 0 auto;
	transition: transform 0.22s ease;
	color: var(--pink);
}
.repo-sources[open] .summary-chevron {
	transform: rotate(180deg);
}

.summary-hint {
	margin-left: auto;
	color: var(--gray);
	font-weight: 600;
	font-size: 0.94em;
}

.source-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
	gap: 0.5em;
	padding: 0.2em 1.1em 1.1em 1.1em;
}

.source-item {
	display: flex;
	align-items: center;
	gap: 0.55em;
	padding: 0.5em 0.65em;
	border-radius: 0.85em;
	background: #fffafd;
	border: 1.5px solid var(--border-soft);
	min-width: 0;
	transition: background 0.14s;
}
.source-item:hover {
	background: var(--bg-blush);
}

.source-icon {
	width: 28px;
	height: 28px;
	border-radius: 8px;
	object-fit: cover;
	flex: 0 0 auto;
	background: var(--bg-blush);
}

.source-text {
	display: flex;
	flex-direction: column;
	min-width: 0;
	gap: 0.05em;
}

.source-name {
	font-size: 0.85em;
	font-weight: 700;
	color: var(--fg);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.source-meta {
	font-size: 0.7em;
	font-weight: 600;
	color: var(--gray);
	display: flex;
	align-items: center;
	gap: 0.35em;
	white-space: nowrap;
}

.source-rating {
	padding: 0.05em 0.4em;
	border-radius: 999px;
	font-size: 0.92em;
	font-weight: 800;
	color: #fff;
}
.rating-safe {
	background: var(--mint);
}
.rating-mature {
	background: #ffb454;
}
.rating-18 {
	background: var(--pink-deep);
}

.source-match {
	background: #fff2f8;
	border-color: var(--pink);
	box-shadow: 0 0 0 2px rgba(255, 122, 184, 0.16);
}

.sources-none {
	padding: 0.65em 1.1em;
	font-size: 0.82em;
	font-weight: 600;
	color: var(--gray);
	border-top: 2px dashed var(--border-soft);
}

/* ------------------------------------------------------------- states --- */

.empty-state {
	color: var(--gray);
	font-weight: 600;
	padding: 2.5em 1em;
	text-align: center;
	font-size: 1.02em;
}
.empty-state .big {
	display: block;
	font-size: 2.2em;
	margin-bottom: 0.25em;
}

footer {
	margin-top: 2.5em;
	padding-top: 1.4em;
	border-top: 2px dashed var(--border);
	color: var(--gray);
	font-size: 0.88em;
	font-weight: 500;
	line-height: 1.6;
	text-align: center;
}

.footer-hearts {
	display: block;
	font-size: 1.15em;
	margin-bottom: 0.5em;
	letter-spacing: 0.3em;
}

a {
	color: var(--pink-deep);
	font-weight: 700;
}

noscript {
	display: block;
	padding: 1em 0;
	color: var(--gray);
	font-weight: 600;
}


/* ------------------------------------------- individual repository pages --- */

.note-individual {
	margin-top: 1.1em;
}

.individual-repo-intro {
	color: var(--gray);
	font-size: 0.94em;
}

.individual-repo-list {
	list-style: none;
	margin: 0 0 1em 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 0.55em;
}

.individual-repo-list a {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75em;
	padding: 0.7em 0.8em;
	border: 1.5px solid var(--border-soft);
	border-radius: 0.85em;
	background: #fffafd;
	text-decoration: none;
	font-size: 0.9em;
}

.individual-repo-list a:hover,
.individual-repo-list a:focus-visible {
	background: var(--bg-blush);
	border-color: var(--border);
}

.individual-repo-version {
	color: var(--gray);
	font-size: 0.78em;
	white-space: nowrap;
}

.detail-header {
	margin-bottom: 0.5em;
}

.detail-eyebrow {
	margin: 0 0 0.35em 0;
	color: var(--gray);
	font-weight: 700;
	font-size: 0.9em;
}

.detail-back {
	display: inline-block;
	margin-bottom: 1em;
}

.repo-detail-card {
	background: var(--card);
	border: 1.5px solid var(--border);
	border-radius: var(--radius);
	box-shadow: var(--shadow);
	padding: 1.1em;
	margin-bottom: 1.1em;
}

.repo-detail-card h2 {
	margin: 0 0 0.8em 0;
	font-size: 1.12em;
	color: var(--fg);
}

.detail-actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.7em;
}

.detail-github {
	display: inline-block;
	padding: 0.55em 1.05em;
	border: 2px solid var(--border);
	border-radius: 999px;
	background: var(--card);
	text-decoration: none;
	font-size: 0.82em;
}

.detail-source-grid {
	padding: 0;
}

.detail-sources-none {
	grid-column: 1 / -1;
	border-top: 0;
	padding: 0.4em 0;
	margin: 0;
}

@media (max-width: 520px) {
	.individual-repo-list {
		grid-template-columns: 1fr;
	}

	.detail-actions {
		align-items: stretch;
		flex-direction: column;
	}

	.detail-actions a {
		box-sizing: border-box;
		text-align: center;
		width: 100%;
	}
}


/* ------------------------------------------------------ guide additions --- */

.compatibility-list,
.detail-notes,
.detail-steps {
	padding-left: 1.35em;
	line-height: 1.6;
}

.compatibility-list li,
.detail-notes li,
.detail-steps li {
	margin-bottom: 0.5em;
}

.muted-note {
	color: var(--gray);
	font-size: 0.92em;
}

.gallery-intro {
	color: var(--gray);
	margin-top: -0.2em;
}

.guide-gallery-wide {
	display: grid;
	grid-template-columns: 1fr;
	gap: 0.85em;
}

.guide-gallery-portrait {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 0.75em;
	margin-top: 0.85em;
}

.guide-image-card,
.content-settings-visual {
	margin: 0;
	padding: 0.5em;
	border: 1.5px solid var(--border-soft);
	border-radius: 1em;
	background: linear-gradient(135deg, #fffafd, #f7f5ff);
	box-shadow: 0 4px 12px rgba(255, 122, 184, 0.1);
	overflow: hidden;
}

.guide-image-card img,
.content-settings-visual img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 0.7em;
}

.guide-image-card figcaption,
.content-settings-visual figcaption {
	padding: 0.55em 0.25em 0.15em;
	color: var(--gray);
	font-size: 0.8em;
	font-weight: 700;
	text-align: center;
}

.content-settings-visual {
	margin-top: 1em;
}

.detail-faq {
	padding: 0;
	overflow: hidden;
}

.detail-faq > summary {
	list-style: none;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1em;
	padding: 1em 1.1em;
	color: var(--pink-deep);
	font-weight: 800;
}

.detail-faq > summary::-webkit-details-marker {
	display: none;
}

.detail-faq > summary:focus-visible {
	outline: 2px solid var(--pink);
	outline-offset: -3px;
	border-radius: var(--radius);
}

.faq-hint {
	color: var(--gray);
	font-size: 0.78em;
	font-weight: 600;
}

.detail-faq-body {
	padding: 0.2em 1.1em 1em;
	border-top: 2px dashed var(--border-soft);
}

.faq-list {
	margin: 0;
}

.faq-list dt {
	margin-top: 0.9em;
	font-weight: 800;
	color: var(--fg);
}

.faq-list dd {
	margin: 0.25em 0 0;
	color: var(--gray);
	line-height: 1.55;
}

.guide-credit {
	margin-top: 1.1em;
	font-size: 0.84em;
	color: var(--gray);
}

.site-disclaimer {
	margin: 1.2em 0;
	padding: 0.9em 1em;
	border: 1.5px dashed var(--border);
	border-radius: 1em;
	background: linear-gradient(135deg, #fff9fc, #f5fbff);
	color: var(--gray);
	font-size: 0.8em;
	font-weight: 600;
	line-height: 1.55;
	text-align: center;
}

.site-disclaimer strong {
	color: var(--fg);
}

.repo-detail-card code {
	background: var(--bg-blush);
	border: 1px solid var(--border);
	border-radius: 8px;
	padding: 0.12em 0.38em;
}

@media (min-width: 700px) {
	.guide-gallery-wide {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.guide-gallery-wide .guide-image-card:last-child {
		grid-column: 1 / -1;
	}
}

@media (max-width: 560px) {
	.guide-gallery-portrait {
		grid-template-columns: 1fr;
	}

	.guide-gallery-portrait .guide-image-card {
		max-width: 330px;
		margin-inline: auto;
	}
}
