/* gort.house: ASCII, subtly neobrutalist. Monospace, hard 2px rules, offset
   shadows, box-drawing details, one amber accent. Colours use light-dark(),
   which follows color-scheme; the <meta name="color-scheme"> (set from the
   theme cookie) pins it when someone picks light or dark. */

:root {
	color-scheme: light dark;
	&:has(> head > meta[name="color-scheme"][content="dark"]) { color-scheme: dark; }
	&:has(> head > meta[name="color-scheme"][content="light"]) { color-scheme: light; }

	--paper: light-dark(#f4f1ea, #141311);
	--card: light-dark(#fffdf8, #1c1b18);
	--ink: light-dark(#141311, #e9e4d8);
	--dim: light-dark(#6b665c, #8f897c);
	--rule: light-dark(#141311, #4a463e);
	--shadow: light-dark(#141311, #000);
	--accent: #e8a33d;
	--accent-ink: #141311;
	--good: light-dark(#2f7d32, #7cc47f);
	--bad: light-dark(#b3261e, #ff8a80);
	--focus: light-dark(#1a5fb4, #8ab4f8);

	--mono: ui-monospace, "SF Mono", "Cascadia Mono", "JetBrains Mono", Menlo, Consolas, "Liberation Mono", monospace;
	--b: 2px;
	--lift: 4px;
	--gap: 1rem;

	font-family: var(--mono);
	font-size: 15px;
	line-height: 1.5;
	background: var(--paper);
	color: var(--ink);
	accent-color: var(--accent);
	-webkit-text-size-adjust: 100%;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-height: 100dvh; display: flex; flex-direction: column; }
main { flex: 1; width: 100%; max-width: 64rem; margin: 0 auto; padding: var(--gap); padding-inline: max(var(--gap), env(safe-area-inset-left)); }
h1, h2, h3 { font-size: 1rem; line-height: 1.3; margin: 0 0 .75rem; }
h1 { font-size: 1.15rem; }
h1::before { content: "# "; color: var(--accent); }
p { margin: 0 0 .75rem; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--accent); text-decoration-thickness: 2px; }
code, kbd { font-family: inherit; background: color-mix(in srgb, var(--ink) 8%, transparent); padding: 0 .3ch; }
kbd { border: 1px solid var(--rule); border-bottom-width: 2px; }
hr { border: 0; border-top: 1px dashed var(--dim); margin: 1rem 0; }
.dim { color: var(--dim); }
.good { color: var(--good); }
.bad { color: var(--bad); }
.sr-only, .skip:not(:focus) {
	position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}
.skip:focus { position: absolute; top: .5rem; left: .5rem; background: var(--accent); color: var(--accent-ink); padding: .25rem .5rem; z-index: 10; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

/* ── top bar ─────────────────────────────────────────── */
.top {
	display: flex; flex-wrap: wrap; align-items: center; gap: .25rem 1.25rem;
	padding: .6rem var(--gap); padding-top: max(.6rem, env(safe-area-inset-top));
	border-bottom: var(--b) solid var(--rule);
	background: var(--card);
	position: sticky; top: 0; z-index: 5;
}
.brand { font-weight: 700; text-decoration: none; white-space: nowrap; }
.brand > span[aria-hidden] { color: var(--accent); }
.top nav { flex: 1; min-width: 0; }
.top nav ul {
	list-style: none; margin: 0; padding: 0; display: flex; gap: 0 .2rem;
	overflow-x: auto; scrollbar-width: none;
}
.top nav a { display: block; padding: .15rem .5ch; text-decoration: none; white-space: nowrap; }
.top nav a::before { content: "["; color: transparent; }
.top nav a::after { content: "]"; color: transparent; }
.top nav a:hover::before, .top nav a:hover::after { color: var(--dim); }
.top nav a[aria-current="page"] { background: var(--accent); color: var(--accent-ink); }
.top nav a[aria-current="page"]::before, .top nav a[aria-current="page"]::after { color: var(--accent-ink); }
/* a section that isn't ready (web.WIPer): the link leads to its wip page */
.top nav a.wip:not([aria-current]) { color: var(--dim); text-decoration: line-through; text-decoration-color: var(--dim); }

.foot {
	display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; align-items: center; justify-content: center;
	padding: 1rem var(--gap) max(1rem, env(safe-area-inset-bottom));
	border-top: 1px dashed var(--dim); color: var(--dim); font-size: .9em;
}
.foot form { display: inline; }

/* ── panels: the main building block ─────────────────── */
.panel {
	background: var(--card);
	border: var(--b) solid var(--rule);
	box-shadow: var(--lift) var(--lift) 0 var(--shadow);
	margin-bottom: calc(var(--gap) + var(--lift));
	min-width: 0;
}
.panel > h1, .panel > h2 {
	display: flex; align-items: baseline; gap: 1ch;
	margin: 0; padding: .4rem .75rem;
	border-bottom: var(--b) solid var(--rule);
	font-size: 1rem;
}
.panel > h1::before, .panel > h2::before { content: "┌─"; color: var(--dim); }
.panel > h1::after, .panel > h2::after { content: ""; flex: 1; border-top: 1px dashed var(--dim); align-self: center; }
.panel > h2 a { text-decoration: none; }
.panel > .body { padding: .75rem; }
.panel > .body > :last-child { margin-bottom: 0; }
.panel.narrow { max-width: 32rem; margin-inline: auto; }

.cards { display: grid; gap: 0 var(--gap); grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr)); align-items: start; }

/* ascii tree lists: ├─ item / └─ last */
ul.tree { list-style: none; margin: 0 0 .75rem; padding: 0; }
ul.tree > li { position: relative; padding-left: 3ch; }
ul.tree > li::before { content: "├─"; position: absolute; left: 0; color: var(--dim); }
ul.tree > li:last-child::before { content: "└─"; }
ol.steps { padding-left: 3ch; }

/* ── people ──────────────────────────────────────────── */
.who {
	--hue: 30;
	font-weight: 700;
	color: light-dark(oklch(45% .13 var(--hue)), oklch(80% .12 var(--hue)));
	white-space: nowrap;
}
.who::before { content: "@"; font-weight: 400; opacity: .6; }

/* ── forms ───────────────────────────────────────────── */
label { display: block; margin-bottom: .2rem; }
.field { margin-bottom: .75rem; }
.hint { display: block; color: var(--dim); font-size: .9em; margin-bottom: .2rem; }
input:not([type="checkbox"], [type="radio"], [type="range"]), select, textarea {
	font: inherit; color: inherit;
	width: 100%; padding: .4rem .5rem;
	background: var(--paper);
	border: var(--b) solid var(--rule); border-radius: 0;
}
textarea { min-height: 5rem; resize: vertical; field-sizing: content; }
input:user-invalid, select:user-invalid, textarea:user-invalid { border-color: var(--bad); }
.field:has(:user-invalid) .error { display: block; }
.error { display: none; color: var(--bad); font-size: .9em; }
input[type="checkbox"], input[type="radio"] { width: 1.1em; height: 1.1em; vertical-align: -.15em; }
fieldset { border: 1px dashed var(--dim); margin: 0 0 .75rem; padding: .5rem .75rem; }
legend { padding: 0 .5ch; }

button, .button {
	font: inherit; color: var(--ink); text-decoration: none; cursor: pointer;
	display: inline-flex; align-items: center; gap: .5ch;
	padding: .3rem .8rem;
	background: var(--card);
	border: var(--b) solid var(--rule); border-radius: 0;
	box-shadow: 3px 3px 0 var(--shadow);
	transition: transform 60ms, box-shadow 60ms;
	touch-action: manipulation;
}
button:hover, .button:hover { background: color-mix(in srgb, var(--accent) 18%, var(--card)); }
button:active, .button:active { transform: translate(3px, 3px); box-shadow: 0 0 0 var(--shadow); }
button.primary, .button.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--shadow); }
button.danger { color: var(--bad); }
button[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); transform: translate(3px, 3px); box-shadow: none; }
button:disabled { opacity: .5; cursor: not-allowed; }
/* a button that reads as a link */
button.link { all: unset; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; color: inherit; }
button.link:focus-visible { outline: 2px solid var(--focus); }

.row { display: flex; flex-wrap: wrap; gap: .5rem; align-items: end; }
.row > .grow { flex: 1 1 12rem; }
.row > .field { margin-bottom: 0; }

/* status: the date field shows once "until a date…" is picked */
form:not(:has(option[value="date"]:checked)) .status-date { display: none; }
/* status: the home card's quick form */
.status-quick { display: grid; gap: .5rem; margin-top: .75rem; padding-top: .75rem; border-top: 1px dashed var(--dim); }
/* status: when it changed; the exact time is the title */
.status-list time[title] { text-decoration: underline dotted; text-underline-offset: .2em; }

/* compact inline forms (a tick box, a delete) */
form.inline { display: inline; }

/* ── tables ──────────────────────────────────────────── */
.scroll { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; }
th, td { text-align: left; padding: .3rem .6rem .3rem 0; border-bottom: 1px dashed color-mix(in srgb, var(--dim) 50%, transparent); vertical-align: top; }
th { font-weight: 400; color: var(--dim); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }

/* small status pill, e.g. [home] */
.tag { display: inline-block; padding: 0 .5ch; border: 1px solid currentColor; font-size: .85em; white-space: nowrap; }
.tag::before { content: "["; opacity: .5; } .tag::after { content: "]"; opacity: .5; }
.tag.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.tag.on::before, .tag.on::after { opacity: 1; }

/* empty states */
.empty { color: var(--dim); }
.empty::before { content: "∅ "; }

/* Shown only when the system scheme matches (the theme picker's hint). */
.only-dark { display: none; }
@media (prefers-color-scheme: dark) { .only-dark { display: inline; } .only-light { display: none; } }

/* htmx: dim a region while it's being refreshed */
.htmx-request:not(body) { opacity: .6; transition: opacity 150ms 150ms; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
@media (max-width: 40rem) {
	:root { --gap: .75rem; font-size: 14px; }
	.top nav { flex-basis: 100%; }
}

/* ── money ── */
.money-net { font-size: 1.15rem; margin-bottom: .5rem; }
.money-amt { font-variant-numeric: tabular-nums; white-space: nowrap; }
.money-actions { margin-bottom: calc(var(--gap) + var(--lift)); }
.money-wide { grid-column: 1 / -1; }
.money-form .row { margin-bottom: .75rem; }
.money-line { margin-bottom: .35rem; }
.money-bars { width: auto; }
.money-bars td { white-space: nowrap; }
.money-bar { color: var(--accent); letter-spacing: -.05em; }
.money-bar.dim { color: var(--dim); }
.money-modes { margin-bottom: .5rem; gap: .25rem 1.25rem; }
.money-modes label { margin: 0; }
.money-people td { vertical-align: middle; }
.money-people td label { margin: 0; white-space: nowrap; }
.money-people input:not([type="checkbox"]) { width: 7rem; max-width: 100%; }
.money-people .money-weight input { width: 5rem; }
/* only the inputs for the picked split show; the others are ignored */
.money-split:not(:has(input[name="split"][value="exact"]:checked)) .money-exact,
.money-split:not(:has(input[name="split"][value="shares"]:checked)) .money-weight { display: none; }
.money-pager { justify-content: space-between; }

/* ── cal ── */
.cal-nav { margin-bottom: calc(var(--gap) + var(--lift)); }
.cal-nav .button[aria-current="page"]:not(.primary) { background: var(--accent); color: var(--accent-ink); transform: translate(3px, 3px); box-shadow: none; }
.cal-pager { margin-top: .75rem; }
h3.cal-day { margin: .75rem 0 .25rem; }
h3.cal-day:first-child { margin-top: 0; }
h3.cal-day a { text-decoration: none; }
.cal-when { color: var(--dim); white-space: nowrap; }
.cal-when::after { content: " │"; opacity: .5; }
/* imported (read-only) events: dashed and italic, in the owner's colour */
.cal-imp { font-style: italic; }
ul.tree > li.cal-imp::before { content: "┆ "; }
.cal-meal .cal-when { color: var(--accent); }
.cal-inout { align-items: center; margin-bottom: .75rem; }
.cal-check { display: inline-block; margin-right: 2ch; }
details.cal-edit { margin-top: .5rem; }
details.cal-edit > summary { cursor: pointer; color: var(--dim); }
details.cal-edit[open] > summary { margin-bottom: .5rem; }
.panel.cal-tonight { border-color: var(--accent); }
form.cal-form > .row { margin-bottom: .75rem; }
form.cal-form:has(#cal-allday:checked) .cal-time { display: none; }

/* month grid: an ASCII-ruled table, compact on phones */
table.cal-grid { table-layout: fixed; border: var(--b) solid var(--rule); }
.cal-grid th, .cal-grid td { border: 1px dashed color-mix(in srgb, var(--dim) 60%, transparent); padding: .2rem .3rem; text-align: left; }
.cal-grid th { text-align: center; }
.cal-grid td { height: 5.5rem; overflow: hidden; }
.cal-grid td.cal-out { color: var(--dim); background: color-mix(in srgb, var(--ink) 4%, transparent); }
.cal-grid td.cal-today { outline: var(--b) solid var(--accent); outline-offset: -2px; }
.cal-grid td.cal-today .cal-num { background: var(--accent); color: var(--accent-ink); }
.cal-num { display: inline-block; min-width: 2.2ch; padding: 0 .3ch; text-decoration: none; font-weight: 700; }
.cal-cell { list-style: none; margin: 0; padding: 0; font-size: .8em; line-height: 1.3; }
.cal-cell li { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-cell li::before { content: "▪ "; color: var(--accent); }
.cal-cell li.cal-imp::before { content: "┆ "; color: var(--dim); }
.cal-cell .who::before { content: none; }
@media (max-width: 40rem) {
	.cal-grid th, .cal-grid td { padding: .1rem; }
	.cal-grid td { height: 3.5rem; }
	/* titles don't fit: one marker per item */
	.cal-cell li { display: inline; font-size: 0; }
	.cal-cell li::before { font-size: .9rem; content: "▪"; }
	.cal-cell li.cal-imp::before { content: "┆"; }
}

/* ── lists ───────────────────────────────────────────── */
.lists-sub { color: var(--dim); font-weight: 400; margin: .75rem 0 .25rem; }
.lists-sub:first-child { margin-top: 0; }
.lists-qty { flex: 0 1 6rem; }
.panel > .lists-quick { border-top: 1px dashed var(--dim); display: grid; gap: .5rem; }
.lists-quick > * { margin: 0; }
.lists-quick input { flex: 1 1 8rem; width: auto; min-width: 0; }
.lists-items > li { padding-block: .1rem; }
button.lists-tick { padding: 0 .4ch; box-shadow: 2px 2px 0 var(--shadow); margin-right: .5ch; }
.lists-bought .lists-name { color: var(--dim); }
.lists-del { margin-left: 1ch; }
.lists-del button { color: var(--dim); font-size: .85em; }
.lists-chores > li { padding-block: .15rem; }
.lists-chores > li.lists-mine::before { color: var(--accent); }
.lists-chores > li.lists-mine > a { font-weight: 700; }
.lists-acts { display: inline-flex; gap: .5rem; margin-left: .5ch; vertical-align: middle; }
.lists-acts button { padding: 0 .6rem; }
.tag.lists-late { color: var(--bad); }
.lists-filter { align-items: center; margin-bottom: .75rem; }
.lists-filter a[aria-current="page"] { background: var(--accent); color: var(--accent-ink); text-decoration: none; padding: 0 .5ch; }
.lists-filter .lists-new { margin-left: auto; }
.lists-notes { white-space: pre-line; }
.lists-day, .lists-pos { display: inline-flex; align-items: center; gap: .5ch; margin: 0; white-space: nowrap; }
.lists-pos input { width: 4.5rem; }
/* the chore form shows only the fields its choices need */
.lists-form:not(:has(#lists-repeat option:is([value="days"], [value="weeks"]):checked)) .lists-every,
.lists-form:not(:has(#lists-repeat option[value="weeks"]:checked)) :is(.lists-weekdays, .lists-unit-weeks),
.lists-form:has(#lists-repeat option[value="weeks"]:checked) .lists-unit-days,
.lists-form:not(:has(#lists-repeat option[value="monthly"]:checked)) .lists-monthday,
.lists-form:not(:has(#lists-assign option[value="fixed"]:checked)) .lists-person,
.lists-form:not(:has(#lists-assign option[value="rotate"]:checked)) .lists-rotation { display: none; }

/* ── polls ── */
.polls-actions { margin-bottom: calc(var(--gap) + var(--lift)); }
.polls-question { margin-bottom: calc(var(--gap) + var(--lift)); }
.polls-item + .polls-item { border-top: 1px dashed var(--dim); padding-top: .75rem; }
.polls-item > p { margin-bottom: .4rem; }
.polls-vote { margin-bottom: .75rem; }
.polls-vote .row { margin-bottom: 0; }
.polls-check { margin-bottom: .3rem; }
.polls-options input { margin-bottom: .4rem; }
.polls-kind { gap: .25rem 1.5rem; }
.polls-kind label { margin: 0; }
table.polls-bars { width: auto; margin-bottom: .75rem; }
.polls-bars td { white-space: nowrap; vertical-align: top; }
.polls-bars td:first-child { white-space: normal; min-width: 6ch; }
.polls-bar { color: var(--accent); letter-spacing: -.05em; }
.polls-won td:first-child { font-weight: 700; }
.polls-won td:first-child::before { content: "★ "; color: var(--accent); }
.polls-own { margin-bottom: .75rem; }
.polls-pager { justify-content: space-between; }

/* ── chat ── */
.panel.chat > .body { display: flex; flex-direction: column; gap: .75rem; }
/* column-reverse: the log starts scrolled to the bottom, without JS */
.chat-log {
	display: flex; flex-direction: column-reverse;
	height: max(14rem, calc(100dvh - 17rem)); overflow-y: auto; overscroll-behavior: contain;
	border-bottom: 1px dashed var(--dim);
}
h2.chat-day { text-align: center; color: var(--dim); font-weight: 400; font-size: .9em; margin: .75rem 0 .25rem; }
ul.chat-msgs { list-style: none; margin: 0; padding: 0; }
.chat-msg { padding: .15rem 0; overflow-wrap: anywhere; }
.chat-msg:target { background: color-mix(in srgb, var(--accent) 15%, transparent); }
.chat-time { color: var(--dim); font-size: .85em; }
.chat-text { white-space: pre-wrap; }
.chat-at { font-weight: 700; }
.chat-me { background: var(--accent); color: var(--accent-ink); padding: 0 .3ch; }
details.chat-act { display: inline; margin-left: .5ch; }
details.chat-act > summary { display: inline; cursor: pointer; color: var(--dim); font-size: .85em; list-style: none; }
details.chat-act > summary::-webkit-details-marker { display: none; }
details.chat-act[open] { display: block; margin: .25rem 0 .5rem; }
details.chat-act textarea { min-height: 3rem; margin-bottom: .5rem; }
.chat-older { text-align: center; margin: .25rem 0; }
.chat-form { display: flex; flex-wrap: wrap; gap: .5rem; align-items: end; }
.chat-attach { position: relative; padding-inline: .7rem; font-weight: 700; }
.chat-attach:focus-within { outline: 2px solid var(--focus); outline-offset: 2px; }
.chat-picked { flex-basis: 100%; margin: 0; color: var(--dim); font-size: .9em; }
.chat-picked.bad { color: var(--bad); }
.chat-files { display: flex; flex-wrap: wrap; gap: .5rem; margin: .35rem 0 .25rem; }
.chat-files img, .chat-files video { display: block; max-width: min(100%, 22rem); max-height: 20rem; border: var(--b) solid var(--rule); background: var(--card); }
.chat-files a:has(img) { line-height: 0; }
.chat-audio { display: flex; flex-wrap: wrap; align-items: center; gap: .5ch; max-width: 100%; }
.chat-audio audio { max-width: 100%; }
.chat-preview {
	display: flex; gap: .75rem; max-width: 32rem; margin: .35rem 0 .25rem; padding: .5rem;
	border: 1px dashed var(--dim); color: inherit; text-decoration: none; overflow-wrap: anywhere;
}
.chat-preview:hover { border-color: var(--accent); }
.chat-preview img { width: 6rem; height: 6rem; object-fit: cover; flex: none; }
.chat-preview > span { display: flex; flex-direction: column; gap: .15rem; min-width: 0; }
.chat-preview > span > span:last-child:not(.dim) { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; overflow: hidden; font-size: .9em; }
.chat-form textarea { flex: 1 1 10rem; min-height: 2.6rem; max-height: 10rem; }
.chat-recent li { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-recent .chat-text { white-space: nowrap; }

/* ── app ── */
/* JS reveals its controls; display rules above would otherwise win */
[hidden] { display: none !important; }
h3.app-h { margin: 1rem 0 .4rem; color: var(--dim); font-weight: 400; }
h3.app-h::before { content: "── "; }
.app-topics { display: flex; flex-wrap: wrap; gap: .25rem 2ch; }
.app-topics label { margin: 0; white-space: nowrap; }
.app-passkeys details { margin: .25rem 0 .5rem; }
.app-passkeys summary { cursor: pointer; }
.app-passkeys details[open] > summary { margin-bottom: .5rem; }
.app-passkeys details form { margin-bottom: .5rem; }
.app-check { align-items: center; margin-top: .75rem; }
.app-cards { padding-left: 3ch; margin: 0 0 .5rem; }
.app-cards li { display: flex; align-items: center; gap: .5ch; margin-bottom: .25rem; }
.app-cards .grow { flex: 1; }

/* ── home cards: drag by the grip to reorder ── */
.card { position: relative; }
.card-grip {
	position: absolute; top: calc(var(--b) + .15rem); right: calc(var(--b) + .35rem);
	padding: .1rem .4rem; border: 0; box-shadow: none; background: var(--card); color: var(--dim);
	cursor: grab; touch-action: none; -webkit-user-select: none; user-select: none;
}
.card-grip:hover, .card-grip:focus-visible, .card-grip:active { color: var(--accent); background: var(--card); transform: none; }
.card.dragging .card-grip { cursor: grabbing; }
.card.dragging > .panel { outline: 2px dashed var(--accent); outline-offset: 2px; opacity: .85; }

/* ── media ── */
.media-search { margin-bottom: .5rem; }
.media-tabs { margin-bottom: calc(var(--gap) + var(--lift)); }
.media-kinds { margin-bottom: var(--gap); }
.media-kinds .button { padding: .1rem .6rem; font-size: .9em; }
.media-tabs .button[aria-current="page"], .media-kinds .button[aria-current] { background: var(--accent); color: var(--accent-ink); transform: translate(3px, 3px); box-shadow: none; }
.media-ok { margin-top: -.25rem; }
.media-back { margin-top: .75rem; }
.media-sub { color: var(--dim); font-weight: 400; margin: .75rem 0 .25rem; }
.media-sub:first-child { margin-top: 0; }
.media-poster { flex: none; display: block; width: 60px; height: 90px; object-fit: cover; border: var(--b) solid var(--rule); background: var(--paper); }
.media-noposter { display: grid; place-items: center; color: var(--dim); }
ul.media-list { list-style: none; margin: 0 0 .75rem; padding: 0; }
ul.media-list > li { display: flex; gap: .75rem; align-items: flex-start; padding-block: .5rem; border-bottom: 1px dashed color-mix(in srgb, var(--dim) 50%, transparent); }
ul.media-list > li:last-child { border-bottom: 0; }
.media-info { flex: 1; min-width: 0; }
.media-info > p { margin-bottom: .35rem; overflow-wrap: anywhere; }
.media-info .row { gap: .5rem 1rem; align-items: center; }
details.media-playon > summary { cursor: pointer; color: var(--dim); }
details.media-playon[open] > summary { margin-bottom: .35rem; }
details.media-playon form { margin-bottom: .35rem; align-items: center; }
details.media-playon button { padding: .1rem .5rem; }
.media-acts { display: inline-flex; flex-wrap: wrap; gap: .5rem 1rem; align-items: center; margin-left: .5ch; vertical-align: middle; }
.media-acts button { padding: 0 .5rem; }
.media-device + .media-device { border-top: 1px dashed var(--dim); padding-top: .5rem; margin-top: .5rem; }
.media-device p { margin-bottom: .25rem; }
.media-wide { grid-column: 1 / -1; }
ul.media-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem .75rem; grid-template-columns: repeat(auto-fill, minmax(7.5rem, 1fr)); }
ul.media-grid > li { display: flex; flex-direction: column; gap: .35rem; min-width: 0; font-size: .9em; overflow-wrap: anywhere; }
ul.media-grid .media-poster { width: 100%; height: auto; aspect-ratio: 2 / 3; }
ul.media-strip { list-style: none; margin: 0 0 .75rem; padding: 0; display: grid; gap: .4rem; }
ul.media-strip > li { display: flex; gap: .6rem; align-items: center; min-width: 0; overflow-wrap: anywhere; }
ul.media-strip .media-poster { width: 32px; height: 48px; border-width: 1px; }

/* ── radio ── */
.radio-title { font-weight: 700; font-size: 1.1rem; margin-bottom: .1rem; overflow-wrap: anywhere; }
.radio-sub { margin-bottom: .1rem; }
.radio-bar { color: var(--accent); font-variant-numeric: tabular-nums; white-space: nowrap; margin: .5rem 0 .75rem; letter-spacing: -.02em; }
.radio-listening { margin: .75rem 0 0; }
.radio-next { margin: .5rem 0 .1rem; }
.radio-track { overflow-wrap: anywhere; }
.radio-queue > li, .radio-results > li { padding-block: .15rem; }
.radio-acts { display: inline-flex; flex-wrap: wrap; gap: .35rem; margin-left: .5ch; vertical-align: middle; }
.radio-acts button { padding: 0 .5rem; box-shadow: 2px 2px 0 var(--shadow); }
.radio-presets { margin-bottom: .75rem; }
.radio-speaker + .radio-speaker { border-top: 1px dashed var(--dim); padding-top: .5rem; margin-top: .5rem; }
.radio-speaker .row { align-items: center; }
.radio-speaker input[type="range"] { flex: 1 1 8rem; min-width: 0; }
.radio-pct { min-width: 4ch; text-align: right; font-variant-numeric: tabular-nums; }

/* ── wip ── */
.wip-sign { color: var(--accent); font-weight: 700; letter-spacing: .2ch; text-align: center; }

/* ── login door ──
   A frame with a leaf hinged on its left. app.js adds "ajar" while a
   passkey prompt is up and "open" just before signing in. */
button.door {
	all: unset; cursor: pointer;
	display: flex; flex-direction: column; align-items: center;
	margin: .5rem auto 1rem; width: fit-content;
}
button.door[hidden] { display: none; }
button.door:disabled { cursor: progress; }
.door:focus-visible .door-frame { outline: 2px solid var(--focus); outline-offset: 4px; }
.door-frame {
	position: relative; display: block;
	width: 7.5rem; height: 12rem;
	border: var(--b) solid var(--rule); border-bottom: 0;
	box-shadow: var(--lift) 0 0 var(--shadow);
	perspective: 60rem;
}
/* what's behind the door: warm light and the brand mark */
.door-inside {
	position: absolute; inset: 0;
	display: grid; place-items: center;
	font-size: 2.5rem; color: var(--accent-ink);
	background: radial-gradient(circle at 50% 40%, #ffd88a, var(--accent) 55%, color-mix(in srgb, var(--accent) 70%, #000));
}
.door-leaf {
	position: absolute; inset: 0;
	display: grid; grid-template-rows: 1fr 1.5fr; gap: .6rem; padding: .7rem .7rem 1.1rem;
	background: var(--card);
	border-right: var(--b) solid var(--rule);
	transform-origin: left center;
	transition: transform .8s cubic-bezier(.55, .05, .3, 1);
}
.door-panel { border: var(--b) solid var(--rule); background: color-mix(in srgb, var(--ink) 5%, var(--card)); }
.door-knob {
	position: absolute; right: .55rem; top: 52%;
	width: .75rem; height: .75rem;
	background: var(--accent); border: var(--b) solid var(--rule);
}
button.door:hover .door-leaf { transform: rotateY(-10deg); }
button.door.ajar .door-leaf { transform: rotateY(-28deg); }
button.door.open .door-leaf { transform: rotateY(-96deg); }
.door-mat {
	width: 9.5rem; padding: .1rem 0;
	border-top: var(--b) solid var(--rule);
	text-align: center; font-size: .7em; letter-spacing: .4ch; color: var(--dim);
}
.door-label {
	margin-top: .6rem; padding: .3rem .8rem;
	background: var(--accent); color: var(--accent-ink);
	border: var(--b) solid var(--shadow); box-shadow: 3px 3px 0 var(--shadow);
}
button.door:active .door-label { transform: translate(3px, 3px); box-shadow: none; }
