/* /kin: the kin constellation (kin.html, kin/page.ts). The shell, the colors
   and the cards are site.css; this is the sky itself, the house row, the lit
   muse's card and the plain list under it. The sky's strokes and labels are
   sized in CSS pixels through --u, which page.ts sets to how many of the
   sky's own units one pixel is worth, so a thread stays a hairline at every
   width and at every zoom. */

main {
	max-width: 1240px;
	margin: 0 auto;
	padding: 28px var(--pad) calc(56px + env(safe-area-inset-bottom));
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 22px;
}
main > header {
	display: grid;
	gap: 4px;
}

/* The sky, its tools and the lit muse. One column on a phone; from 1040px
   the muse sits beside the sky, where there is room for it. */
.sky-box {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 14px;
	align-items: start;
}
.sky-tools {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
}
.find {
	display: block;
	flex: 1 1 200px;
	min-width: 0;
	max-width: 280px;
}
.find input {
	width: 100%;
	min-height: 44px;
	padding: 0 16px;
	border: 1px solid var(--line);
	border-radius: 999px;
	background: var(--card);
	color: var(--bone);
	font: 400 15px var(--sans);
}
.find input::placeholder {
	color: var(--dim);
}

.house-row {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}
.hb {
	min-height: 36px;
	padding: 0 13px;
	border: 1px solid var(--line);
	border-radius: 999px;
	background: var(--card);
	color: var(--soft);
	font: 400 13px var(--sans);
	cursor: pointer;
	transition:
		background-color 0.15s,
		color 0.15s;
}
.hb.on {
	background: rgba(var(--gold-rgb), 0.14);
	border-color: rgba(var(--gold-rgb), 0.4);
	color: var(--gold-hi);
}
@media (hover: hover) {
	.hb:hover {
		background: var(--card-hi);
		color: var(--bone);
	}
}

.sky {
	position: relative;
	width: 100%;
	max-width: 760px;
	margin: 0 auto;
	aspect-ratio: 1;
	border-radius: 20px;
	background:
		radial-gradient(circle at 50% 46%, rgba(var(--gold-rgb), 0.05), transparent 62%), var(--card);
	overflow: hidden;
	touch-action: manipulation;
}
.sky svg {
	display: block;
	width: 100%;
	height: 100%;
}
.sky-skel {
	position: absolute;
	inset: auto 0 50% 0;
	margin: 0 auto;
	width: 60%;
	height: 14px;
	border-radius: 999px;
	color: transparent;
}

/* Every thread and every star. The kind threads (a muse and its kin of the
   same species) run right across the sky, so they sit far back; the house
   threads stay inside one house and carry the shape of it. */
.th-kind {
	stroke: rgba(var(--gold-rgb), 0.5);
	stroke-opacity: 0.13;
	stroke-width: var(--w-th, 1);
	fill: none;
}
.th-house {
	stroke: rgba(var(--gold-rgb), 0.5);
	stroke-opacity: 0.6;
	stroke-width: var(--w-th, 1);
	fill: none;
}
.stars {
	fill: var(--bone);
}
.house-names {
	fill: var(--gold);
	font: italic 600 var(--label, 13px) / 1 var(--serif);
	paint-order: stroke;
	stroke: var(--void);
	stroke-width: var(--w-fl, 2);
	stroke-opacity: 0.75;
}
.near .house-names {
	display: none;
}

/* With one muse lit, the rest of the sky falls back and only its own
   threads, its kin and its name stay bright. */
.sky.one .th-kind,
.sky.one .th-house {
	stroke-opacity: 0.07;
}
.sky.one .stars {
	fill-opacity: 0.4;
}
.fl-th {
	stroke: var(--gold-hi);
	stroke-width: var(--w-fl, 2);
	stroke-linecap: round;
	fill: none;
}
.fl-kin {
	fill: var(--gold-hi);
}
.fl-star {
	fill: var(--bone);
}
.fl-ring {
	fill: none;
	stroke: var(--gold-hi);
	stroke-width: var(--w-th, 1);
	stroke-opacity: 0.8;
}
.fl-name {
	fill: var(--bone);
	font: 600 var(--label, 13px) / 1 var(--sans);
	paint-order: stroke;
	stroke: var(--void);
	stroke-width: var(--w-fl, 2);
	stroke-opacity: 0.85;
}

.sky-keys {
	margin: 0;
	font-size: 14px;
	color: var(--dim);
}

/* The muse the sky has lit: its art, its line, its house and its kin with
   the words its soul speaks about each. */
.lit {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr);
	gap: 12px 14px;
	align-content: start;
	padding: 14px;
	border-radius: 20px;
	background: var(--card);
}
.lit-none {
	grid-column: 1 / -1;
	margin: 0;
	color: var(--soft);
}
.lit-art img {
	display: block;
	width: 76px;
	height: 76px;
	border-radius: 14px;
	object-fit: cover;
	background: var(--card-hi);
}
.lit-of {
	display: grid;
	gap: 4px;
	align-content: start;
	min-width: 0;
}
.lit-of h3 {
	margin: 0;
	font: italic 600 26px / 1.1 var(--serif);
}
.lit-of h3 a {
	color: var(--bone);
	text-decoration: none;
}
.lit-line,
.lit-house {
	margin: 0;
	font-size: 13px;
	color: var(--dim);
}
.lit-kin {
	grid-column: 1 / -1;
	margin: 0;
	padding: 0;
	list-style: none;
	display: grid;
	gap: 12px;
}
.lit-kin > li {
	display: grid;
	gap: 6px;
	padding-top: 12px;
	border-top: 1px solid var(--line);
}
.lit-kin p {
	margin: 0;
	font-size: 14px;
	color: var(--soft);
}
.lk {
	display: flex;
	align-items: center;
	gap: 10px;
	min-width: 0;
	text-decoration: none;
	color: var(--bone);
}
.lk img {
	flex: none;
	width: 44px;
	height: 44px;
	border-radius: 10px;
	object-fit: cover;
	background: var(--card-hi);
}
.lk > span {
	display: grid;
	gap: 4px;
	min-width: 0;
}
.lk > span > b {
	font: 600 15px var(--sans);
}
.lk > span > small {
	font: 400 12px var(--mono);
	color: var(--dim);
}

/* The same kin as words, a house at a time. */
.list-box {
	display: grid;
	gap: 16px;
}
.house-list {
	display: grid;
	gap: 4px;
}
.house-d > summary {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	min-height: 48px;
	padding: 0 4px;
	border-top: 1px solid var(--line);
	cursor: pointer;
	color: var(--bone);
}
.house-d > summary b {
	font: italic 600 22px var(--serif);
	color: var(--gold-hi);
}
.house-d > summary small {
	font: 400 12px var(--mono);
	color: var(--dim);
}
.kin-rows {
	margin: 0 0 14px;
	padding: 0;
	list-style: none;
	display: grid;
	gap: 4px;
}
.kin-rows > li {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 4px 12px;
	padding: 8px 4px;
	border-top: 1px solid var(--line);
}
.row-m {
	display: flex;
	align-items: baseline;
	gap: 8px;
	text-decoration: none;
	color: var(--bone);
}
.row-m b {
	font: 600 15px var(--sans);
}
.row-m small,
.row-k {
	font: 400 12px var(--mono);
	color: var(--dim);
}

@media (min-width: 1040px) {
	.sky-box {
		grid-template-columns: minmax(0, 1fr) 330px;
		grid-template-areas: "tools muse" "sky muse" "keys muse";
		column-gap: 22px;
	}
	.sky-tools {
		grid-area: tools;
	}
	.sky {
		grid-area: sky;
		max-width: none;
	}
	.sky-keys {
		grid-area: keys;
	}
	.lit {
		grid-area: muse;
		position: sticky;
		top: 86px;
	}
}
