/* Every panel of the game (those opened from the journey menu, and those read
   inside a place: a station's text, a riddle, a trial, a chest), dressed as the
   menu is: dark weathered green, aged gold, cream lettering. Midian keeps the
   ivory sheets of its own pass (midian.css).

   Most of the work is done by giving these panels the menu's colours under the
   names the old stylesheet already uses; what follows after is what was
   written there as a fixed colour. */
:root:not([data-scene='midian'])
	:is(
		#board,
		#traveller,
		#naming,
		#pinPanel,
		#gate,
		#cabinet,
		#market,
		#ask,
		#gifting,
		#giftIn,
		#credits,
		#notes,
		#book,
		#room,
		#update,
		#school,
		#help,
		#station,
		#mission,
		#riddle,
		#treasure,
		#trial,
		#build,
		#inside,
		#finish,
		#finale,
		#start
	) {
	--ink: #eee0b8;
	--ink-soft: rgba(238, 224, 184, 0.5);
	--night-ink: #eee0b8;
	--lapis: #e6c877;
	--gold: #b99550;
	--sun-gold: #e6c877;
	--papyrus: #1d3328;
	--papyrus-light: #26402f;
	--papyrus-dark: #12221b;
	--scarlet: #e08a6c;
	--olive: #a9c383;
	--purple: #cdb1e0;
	--sheet: url('./art/ui/panel-patina.svg'),
		radial-gradient(ellipse at 30% 0%, #2c4433, #13231b 85%);
	--panel-line: #b995505c;
	--panel-muted: #b6b99c;
	background: rgba(6, 14, 10, 0.72);
}

:root:not([data-scene='midian'])
	:is(
		#board,
		#traveller,
		#naming,
		#pinPanel,
		#gate,
		#cabinet,
		#market,
		#ask,
		#gifting,
		#giftIn,
		#credits,
		#notes,
		#book,
		#room,
		#update,
		#school,
		#help,
		#station,
		#mission,
		#riddle,
		#treasure,
		#trial,
		#build,
		#inside,
		#finish,
		#finale,
		#start
	)
	> .card {
	color: var(--ink);
	background: var(--sheet);
	border: 1px solid #b28b4b;
	border-radius: 8px;
	box-shadow:
		inset 0 0 0 1px #071610,
		inset 0 0 0 4px #1b3024,
		inset 0 0 0 5px #b995503d,
		inset 0 0 90px #0005,
		0 18px 50px #000a;
	scrollbar-width: thin;
	scrollbar-color: #b99550 #0f1d16;
}

/* (no band of light across a dark panel: it reads as a flash) */
:root:not([data-scene='midian'])
	:is(
		#board,
		#traveller,
		#naming,
		#pinPanel,
		#gate,
		#cabinet,
		#market,
		#ask,
		#gifting,
		#giftIn,
		#credits,
		#notes,
		#book,
		#room,
		#update,
		#school,
		#help,
		#station,
		#mission,
		#riddle,
		#treasure,
		#trial,
		#build,
		#inside,
		#finish,
		#finale,
		#start
	)
	> .card::after {
	content: none;
	animation: none;
}

:root:not([data-scene='midian'])
	:is(
		#board,
		#traveller,
		#naming,
		#pinPanel,
		#gate,
		#cabinet,
		#market,
		#ask,
		#gifting,
		#giftIn,
		#credits,
		#notes,
		#book,
		#room,
		#update,
		#school,
		#help,
		#station,
		#mission,
		#riddle,
		#treasure,
		#trial,
		#build,
		#inside,
		#finish,
		#finale,
		#start
	)
	:is(h1, h2, h3) {
	color: #f1dfa6;
	text-shadow: 0 1px 0 #06120c;
}

:root:not([data-scene='midian'])
	:is(
		#board,
		#traveller,
		#naming,
		#pinPanel,
		#gate,
		#cabinet,
		#market,
		#ask,
		#gifting,
		#giftIn,
		#credits,
		#notes,
		#book,
		#room,
		#update,
		#school,
		#help,
		#station,
		#mission,
		#riddle,
		#treasure,
		#trial,
		#build,
		#inside,
		#finish,
		#finale,
		#start
	)
	:is(p, li, td, th, label, small, span, dd, dt, summary) {
	color: inherit;
}

:root:not([data-scene='midian'])
	:is(
		#board,
		#traveller,
		#naming,
		#pinPanel,
		#gate,
		#cabinet,
		#market,
		#ask,
		#gifting,
		#giftIn,
		#credits,
		#notes,
		#book,
		#room,
		#update,
		#school,
		#help,
		#station,
		#mission,
		#riddle,
		#treasure,
		#trial,
		#build,
		#inside,
		#finish,
		#finale,
		#start
	)
	:is(.note, .caption, .hint, .small, .build-line, .lead) {
	color: var(--panel-muted);
}

:root:not([data-scene='midian'])
	:is(
		#board,
		#traveller,
		#naming,
		#pinPanel,
		#gate,
		#cabinet,
		#market,
		#ask,
		#gifting,
		#giftIn,
		#credits,
		#notes,
		#book,
		#room,
		#update,
		#school,
		#help,
		#station,
		#mission,
		#riddle,
		#treasure,
		#trial,
		#build,
		#inside,
		#finish,
		#finale,
		#start
	)
	a {
	color: #e6c877;
}

/* Buttons: pressed brass for the one that matters, dark green for the rest */
:root:not([data-scene='midian'])
	:is(
		#board,
		#traveller,
		#naming,
		#pinPanel,
		#gate,
		#cabinet,
		#market,
		#ask,
		#gifting,
		#giftIn,
		#credits,
		#notes,
		#book,
		#room,
		#update,
		#school,
		#help,
		#station,
		#mission,
		#riddle,
		#treasure,
		#trial,
		#build,
		#inside,
		#finish,
		#finale,
		#start
	)
	.btn {
	color: #e5d6a2;
	background: linear-gradient(#4c5b39, #2a402a);
	border: 1px solid #9e8043;
	box-shadow:
		inset 0 1px 0 #eacb8a33,
		0 2px 0 #081710;
	text-shadow: none;
}

:root:not([data-scene='midian'])
	:is(
		#board,
		#traveller,
		#naming,
		#pinPanel,
		#gate,
		#cabinet,
		#market,
		#ask,
		#gifting,
		#giftIn,
		#credits,
		#notes,
		#book,
		#room,
		#update,
		#school,
		#help,
		#station,
		#mission,
		#riddle,
		#treasure,
		#trial,
		#build,
		#inside,
		#finish,
		#finale,
		#start
	)
	.btn:hover {
	background: #4b633b;
	border-color: #d9b66d;
}

:root:not([data-scene='midian'])
	:is(
		#board,
		#traveller,
		#naming,
		#pinPanel,
		#gate,
		#cabinet,
		#market,
		#ask,
		#gifting,
		#giftIn,
		#credits,
		#notes,
		#book,
		#room,
		#update,
		#school,
		#help,
		#station,
		#mission,
		#riddle,
		#treasure,
		#trial,
		#build,
		#inside,
		#finish,
		#finale,
		#start
	)
	.btn:not(.ghost):not(.small):not(.quiet) {
	color: #24160a;
	background: linear-gradient(#edcc7c, #c29546 50%, #b17a30);
	border: 1px solid #efcf85;
	text-shadow: none;
	font-weight: 700;
	box-shadow:
		inset 0 1px 0 #fff0bb,
		inset 0 -3px 0 #78501f,
		0 3px 0 #081710;
}

:root:not([data-scene='midian'])
	:is(
		#board,
		#traveller,
		#naming,
		#pinPanel,
		#gate,
		#cabinet,
		#market,
		#ask,
		#gifting,
		#giftIn,
		#credits,
		#notes,
		#book,
		#room,
		#update,
		#school,
		#help,
		#station,
		#mission,
		#riddle,
		#treasure,
		#trial,
		#build,
		#inside,
		#finish,
		#finale,
		#start
	)
	.btn:disabled {
	opacity: 0.5;
}

/* Fields to write in: cream on dark, with a brass edge */
:root:not([data-scene='midian'])
	:is(
		#board,
		#traveller,
		#naming,
		#pinPanel,
		#gate,
		#cabinet,
		#market,
		#ask,
		#gifting,
		#giftIn,
		#credits,
		#notes,
		#book,
		#room,
		#update,
		#school,
		#help,
		#station,
		#mission,
		#riddle,
		#treasure,
		#trial,
		#build,
		#inside,
		#finish,
		#finale,
		#start
	)
	:is(input, textarea, select) {
	color: #f3e7c2;
	background: #0f1e17;
	border: 1px solid #8d7340;
	box-shadow: inset 0 2px 6px #0008;
}

/* The journal is still a ruled page on the dark panels: faint gold lines */
:root:not([data-scene='midian']) #notes .notes-text {
	background:
		linear-gradient(transparent calc(1.75em - 1px), rgba(185, 149, 80, 0.3) 1px) 0 12px / 100%
			1.75em local,
		#0f1e17;
}

:root:not([data-scene='midian'])
	:is(
		#board,
		#traveller,
		#naming,
		#pinPanel,
		#gate,
		#cabinet,
		#market,
		#ask,
		#gifting,
		#giftIn,
		#credits,
		#notes,
		#book,
		#room,
		#update,
		#school,
		#help,
		#station,
		#mission,
		#riddle,
		#treasure,
		#trial,
		#build,
		#inside,
		#finish,
		#finale,
		#start
	)
	:is(input, textarea)::placeholder {
	color: #8f9a80;
}

/* Lines, rows and rules */
:root:not([data-scene='midian'])
	:is(
		#board,
		#traveller,
		#naming,
		#pinPanel,
		#gate,
		#cabinet,
		#market,
		#ask,
		#gifting,
		#giftIn,
		#credits,
		#notes,
		#book,
		#room,
		#update,
		#school,
		#help,
		#station,
		#mission,
		#riddle,
		#treasure,
		#trial,
		#build,
		#inside,
		#finish,
		#finale,
		#start
	)
	:is(hr, table, tr, td, th, li, details, fieldset) {
	border-color: var(--panel-line);
}

/* The head and the foot of a panel, which stay put while its middle scrolls */
:root:not([data-scene='midian'])
	:is(
		#board,
		#traveller,
		#naming,
		#pinPanel,
		#gate,
		#cabinet,
		#market,
		#ask,
		#gifting,
		#giftIn,
		#credits,
		#notes,
		#book,
		#room,
		#update,
		#school,
		#help,
		#station,
		#mission,
		#riddle,
		#treasure,
		#trial,
		#build,
		#inside,
		#finish,
		#finale,
		#start
	)
	> .card:not(.wide):not(.start-card)
	> h2:first-of-type {
	background: url('./art/ui/panel-patina.svg'), linear-gradient(#263e2f, #14251e);
	border-bottom: 2px solid #b28b4b;
	box-shadow:
		inset 0 -3px 0 #071610,
		0 5px 14px -6px #000c;
}

:root:not([data-scene='midian'])
	:is(
		#board,
		#traveller,
		#naming,
		#pinPanel,
		#gate,
		#cabinet,
		#market,
		#ask,
		#gifting,
		#giftIn,
		#credits,
		#notes,
		#book,
		#room,
		#update,
		#school,
		#help,
		#station,
		#mission,
		#riddle,
		#treasure,
		#trial,
		#build,
		#inside,
		#finish,
		#finale,
		#start
	)
	> .card:not(.wide):not(.start-card)
	> .actions:last-child {
	background: linear-gradient(#182b21, #101d17);
	border-top: 1px solid #b28b4b;
	box-shadow: 0 -5px 12px -6px #000c;
}

/* The cross that closes it: dark, ringed in brass */
:root:not([data-scene='midian'])
	:is(
		#board,
		#traveller,
		#naming,
		#pinPanel,
		#gate,
		#cabinet,
		#market,
		#ask,
		#gifting,
		#giftIn,
		#credits,
		#notes,
		#book,
		#room,
		#update,
		#school,
		#help,
		#station,
		#mission,
		#riddle,
		#treasure,
		#trial,
		#build,
		#inside,
		#finish,
		#finale,
		#start
	)
	.card-x
	button {
	color: #ecd69a;
	background: linear-gradient(#3c4b32, #1f3629);
	border-color: #bd9b56;
	box-shadow:
		inset 0 1px 0 #eacb8a44,
		0 2px 5px #0008;
}

/* Tabs and the things chosen among (who you are, which language): dark until chosen,
   brass when chosen */
:root:not([data-scene='midian'])
	:is(
		#board,
		#traveller,
		#naming,
		#pinPanel,
		#gate,
		#cabinet,
		#market,
		#ask,
		#gifting,
		#giftIn,
		#credits,
		#notes,
		#book,
		#room,
		#update,
		#school,
		#help,
		#station,
		#mission,
		#riddle,
		#treasure,
		#trial,
		#build,
		#inside,
		#finish,
		#finale,
		#start
	)
	:is(.panel-tab, .figure-choice, .lang-choice) {
	color: #d9cfa6;
	background: #10201899;
	border-color: #8d734099;
}

:root:not([data-scene='midian'])
	:is(
		#board,
		#traveller,
		#naming,
		#pinPanel,
		#gate,
		#cabinet,
		#market,
		#ask,
		#gifting,
		#giftIn,
		#credits,
		#notes,
		#book,
		#room,
		#update,
		#school,
		#help,
		#station,
		#mission,
		#riddle,
		#treasure,
		#trial,
		#build,
		#inside,
		#finish,
		#finale,
		#start
	)
	:is(.panel-tab, .figure-choice, .lang-choice):is(
		.on,
		[aria-selected='true'],
		[aria-pressed='true']
	) {
	color: #24160a;
	background: linear-gradient(#edcc7c, #c29546 60%, #b17a30);
	border-color: #efcf85;
	box-shadow:
		inset 0 1px 0 #fff0bb,
		0 2px 0 #081710;
	text-shadow: none;
	font-weight: 700;
}

/* Whether the journey is saved: a quiet box with a coloured edge */
:root:not([data-scene='midian'])
	:is(
		#board,
		#traveller,
		#naming,
		#pinPanel,
		#gate,
		#cabinet,
		#market,
		#ask,
		#gifting,
		#giftIn,
		#credits,
		#notes,
		#book,
		#room,
		#update,
		#school,
		#help,
		#station,
		#mission,
		#riddle,
		#treasure,
		#trial,
		#build,
		#inside,
		#finish,
		#finale,
		#start
	)
	.saved-box {
	background: #0f1e1799;
	border-color: #8d7340;
}

:root:not([data-scene='midian'])
	:is(
		#board,
		#traveller,
		#naming,
		#pinPanel,
		#gate,
		#cabinet,
		#market,
		#ask,
		#gifting,
		#giftIn,
		#credits,
		#notes,
		#book,
		#room,
		#update,
		#school,
		#help,
		#station,
		#mission,
		#riddle,
		#treasure,
		#trial,
		#build,
		#inside,
		#finish,
		#finale,
		#start
	)
	.saved-box.yes {
	border-color: #8fb46a;
}

:root:not([data-scene='midian'])
	:is(
		#board,
		#traveller,
		#naming,
		#pinPanel,
		#gate,
		#cabinet,
		#market,
		#ask,
		#gifting,
		#giftIn,
		#credits,
		#notes,
		#book,
		#room,
		#update,
		#school,
		#help,
		#station,
		#mission,
		#riddle,
		#treasure,
		#trial,
		#build,
		#inside,
		#finish,
		#finale,
		#start
	)
	.saved-box.yes
	strong {
	color: #b9dc92;
}

:root:not([data-scene='midian'])
	:is(
		#board,
		#traveller,
		#naming,
		#pinPanel,
		#gate,
		#cabinet,
		#market,
		#ask,
		#gifting,
		#giftIn,
		#credits,
		#notes,
		#book,
		#room,
		#update,
		#school,
		#help,
		#station,
		#mission,
		#riddle,
		#treasure,
		#trial,
		#build,
		#inside,
		#finish,
		#finale,
		#start
	)
	.saved-box.no {
	border-color: #d9a441;
}

:root:not([data-scene='midian'])
	:is(
		#board,
		#traveller,
		#naming,
		#pinPanel,
		#gate,
		#cabinet,
		#market,
		#ask,
		#gifting,
		#giftIn,
		#credits,
		#notes,
		#book,
		#room,
		#update,
		#school,
		#help,
		#station,
		#mission,
		#riddle,
		#treasure,
		#trial,
		#build,
		#inside,
		#finish,
		#finale,
		#start
	)
	.saved-box.no
	strong {
	color: #f0c267;
}

/* The row that asks whether to keep the journey with a code, and the box the
   code's wheels stand in: dark, edged in brass (the wheels keep their own brass) */
:root:not([data-scene='midian'])
	:is(
		#board,
		#traveller,
		#naming,
		#pinPanel,
		#gate,
		#cabinet,
		#market,
		#ask,
		#gifting,
		#giftIn,
		#credits,
		#notes,
		#book,
		#room,
		#update,
		#school,
		#help,
		#station,
		#mission,
		#riddle,
		#treasure,
		#trial,
		#build,
		#inside,
		#finish,
		#finale,
		#start
	)
	.code-keep {
	color: #e5d6a2;
	background: #0f1e1799;
	border-color: #8d7340;
}

:root:not([data-scene='midian'])
	:is(
		#board,
		#traveller,
		#naming,
		#pinPanel,
		#gate,
		#cabinet,
		#market,
		#ask,
		#gifting,
		#giftIn,
		#credits,
		#notes,
		#book,
		#room,
		#update,
		#school,
		#help,
		#station,
		#mission,
		#riddle,
		#treasure,
		#trial,
		#build,
		#inside,
		#finish,
		#finale,
		#start
	)
	.code-keep
	input {
	accent-color: #c29546;
}

:root:not([data-scene='midian'])
	:is(
		#board,
		#traveller,
		#naming,
		#pinPanel,
		#gate,
		#cabinet,
		#market,
		#ask,
		#gifting,
		#giftIn,
		#credits,
		#notes,
		#book,
		#room,
		#update,
		#school,
		#help,
		#station,
		#mission,
		#riddle,
		#treasure,
		#trial,
		#build,
		#inside,
		#finish,
		#finale,
		#start
	)
	.code-part {
	background: #0c1912;
	border-color: #8d7340;
	box-shadow: inset 0 2px 10px #000a;
}

:root:not([data-scene='midian'])
	:is(
		#board,
		#traveller,
		#naming,
		#pinPanel,
		#gate,
		#cabinet,
		#market,
		#ask,
		#gifting,
		#giftIn,
		#credits,
		#notes,
		#book,
		#room,
		#update,
		#school,
		#help,
		#station,
		#mission,
		#riddle,
		#treasure,
		#trial,
		#build,
		#inside,
		#finish,
		#finale,
		#start
	)
	.code-lead {
	color: #d9cfa6;
}

/* The wheels themselves are brass and ivory with dark digits, as on the map:
   they take the old colours back, or their digits would be cream on cream */
:root:not([data-scene='midian'])
	:is(
		#board,
		#traveller,
		#naming,
		#pinPanel,
		#gate,
		#cabinet,
		#market,
		#ask,
		#gifting,
		#giftIn,
		#credits,
		#notes,
		#book,
		#room,
		#update,
		#school,
		#help,
		#station,
		#mission,
		#riddle,
		#treasure,
		#trial,
		#build,
		#inside,
		#finish,
		#finale,
		#start
	)
	.codelock {
	--ink: #33230f;
	--ink-soft: rgba(51, 35, 15, 0.55);
	--night-ink: #1b1712;
	--lapis: #1f3f7a;
	--gold: #b8862b;
	--sun-gold: #e5b14a;
	--papyrus: #ecdcb0;
	--papyrus-light: #f7eed4;
	--papyrus-dark: #d6c08a;
	color: #33230f;
}

/* The answers to a question: dark tablets edged in brass; right is green, wrong is rust */
:root:not([data-scene='midian'])
	:is(
		#board,
		#traveller,
		#naming,
		#pinPanel,
		#gate,
		#cabinet,
		#market,
		#ask,
		#gifting,
		#giftIn,
		#credits,
		#notes,
		#book,
		#room,
		#update,
		#school,
		#help,
		#station,
		#mission,
		#riddle,
		#treasure,
		#trial,
		#build,
		#inside,
		#finish,
		#finale,
		#start
	)
	.options
	button {
	color: #f1e4bb;
	background: linear-gradient(#2f4534, #1a2e23);
	border-color: #9e8043;
	box-shadow:
		inset 0 1px 0 #eacb8a33,
		0 2px 0 #081710;
}

:root:not([data-scene='midian'])
	:is(
		#board,
		#traveller,
		#naming,
		#pinPanel,
		#gate,
		#cabinet,
		#market,
		#ask,
		#gifting,
		#giftIn,
		#credits,
		#notes,
		#book,
		#room,
		#update,
		#school,
		#help,
		#station,
		#mission,
		#riddle,
		#treasure,
		#trial,
		#build,
		#inside,
		#finish,
		#finale,
		#start
	)
	.options
	button:hover:not(:disabled) {
	background: #3b5540;
	border-color: #d9b66d;
}

:root:not([data-scene='midian'])
	:is(
		#board,
		#traveller,
		#naming,
		#pinPanel,
		#gate,
		#cabinet,
		#market,
		#ask,
		#gifting,
		#giftIn,
		#credits,
		#notes,
		#book,
		#room,
		#update,
		#school,
		#help,
		#station,
		#mission,
		#riddle,
		#treasure,
		#trial,
		#build,
		#inside,
		#finish,
		#finale,
		#start
	)
	.options
	button.right {
	color: #10210f;
	background: linear-gradient(#b9dc92, #7fae58);
	border-color: #d7f0b6;
}

:root:not([data-scene='midian'])
	:is(
		#board,
		#traveller,
		#naming,
		#pinPanel,
		#gate,
		#cabinet,
		#market,
		#ask,
		#gifting,
		#giftIn,
		#credits,
		#notes,
		#book,
		#room,
		#update,
		#school,
		#help,
		#station,
		#mission,
		#riddle,
		#treasure,
		#trial,
		#build,
		#inside,
		#finish,
		#finale,
		#start
	)
	.options
	button.wrong {
	color: #f6d5c8;
	background: linear-gradient(#7a3a2a, #54261c);
	border-color: #c9785f;
}

/* The small round and long buttons about a story's pages, and the box that tells the keys */
:root:not([data-scene='midian'])
	:is(
		#board,
		#traveller,
		#naming,
		#pinPanel,
		#gate,
		#cabinet,
		#market,
		#ask,
		#gifting,
		#giftIn,
		#credits,
		#notes,
		#book,
		#room,
		#update,
		#school,
		#help,
		#station,
		#mission,
		#riddle,
		#treasure,
		#trial,
		#build,
		#inside,
		#finish,
		#finale,
		#start
	)
	:is(.story-listen, .story-turn) {
	color: #e5d6a2;
	background: linear-gradient(#3c4b32, #1f3629);
	border-color: #9e8043;
}

:root:not([data-scene='midian'])
	:is(
		#board,
		#traveller,
		#naming,
		#pinPanel,
		#gate,
		#cabinet,
		#market,
		#ask,
		#gifting,
		#giftIn,
		#credits,
		#notes,
		#book,
		#room,
		#update,
		#school,
		#help,
		#station,
		#mission,
		#riddle,
		#treasure,
		#trial,
		#build,
		#inside,
		#finish,
		#finale,
		#start
	)
	.story-listen.on {
	color: #24160a;
	background: linear-gradient(#edcc7c, #c29546);
}

:root:not([data-scene='midian'])
	:is(
		#board,
		#traveller,
		#naming,
		#pinPanel,
		#gate,
		#cabinet,
		#market,
		#ask,
		#gifting,
		#giftIn,
		#credits,
		#notes,
		#book,
		#room,
		#update,
		#school,
		#help,
		#station,
		#mission,
		#riddle,
		#treasure,
		#trial,
		#build,
		#inside,
		#finish,
		#finale,
		#start
	)
	.controls {
	color: #d9cfa6;
	background: #0f1e1799;
	border-color: #8d734099;
}

/* A phone held on its side: a station's panel is laid in two columns there, and
   its head is no longer a bar across the top. The seal (which hangs from the
   card, and so fell over the text) is put away, and the foot loses its band. */
@media (min-width: 560px) and (max-height: 520px) {
	:root:not([data-scene='midian']) #station > .card > h2:first-of-type::after {
		content: none;
	}
	:root:not([data-scene='midian']) #station > .card:not(.wide) > h2:first-of-type {
		padding-left: var(--px);
	}
	:root:not([data-scene='midian']) #station > .card:not(.wide) > .actions:last-child {
		/* (said firmly: the rule it answers is written with more names) */
		background: none !important;
		border-top: 0 !important;
		box-shadow: none !important;
	}
}

/* A clue given with a mission: a quiet dark box, as the others are */
:root:not([data-scene='midian'])
	:is(
		#board,
		#traveller,
		#naming,
		#pinPanel,
		#gate,
		#cabinet,
		#market,
		#ask,
		#gifting,
		#giftIn,
		#credits,
		#notes,
		#book,
		#room,
		#update,
		#school,
		#help,
		#station,
		#mission,
		#riddle,
		#treasure,
		#trial,
		#build,
		#inside,
		#finish,
		#finale,
		#start
	)
	.clue {
	color: #d9cfa6;
	background: #0f1e1799;
	border-color: #8d734099;
}

/* The seed gathered at the end of a stop, and its verse: a dark box with a brass
   edge (it was a pale one, and its words are now cream) */
:root:not([data-scene='midian'])
	:is(
		#board,
		#traveller,
		#naming,
		#pinPanel,
		#gate,
		#cabinet,
		#market,
		#ask,
		#gifting,
		#giftIn,
		#credits,
		#notes,
		#book,
		#room,
		#update,
		#school,
		#help,
		#station,
		#mission,
		#riddle,
		#treasure,
		#trial,
		#build,
		#inside,
		#finish,
		#finale,
		#start
	)
	:is(.seed, :not(.seed) > .verse) {
	color: #f1e4bb;
	background: #0f1e17b3;
	border-color: #b99550;
}

:root:not([data-scene='midian'])
	:is(
		#board,
		#traveller,
		#naming,
		#pinPanel,
		#gate,
		#cabinet,
		#market,
		#ask,
		#gifting,
		#giftIn,
		#credits,
		#notes,
		#book,
		#room,
		#update,
		#school,
		#help,
		#station,
		#mission,
		#riddle,
		#treasure,
		#trial,
		#build,
		#inside,
		#finish,
		#finale,
		#start
	)
	.revealed {
	border-color: #b99550;
}

/* Lettering on brass, everywhere: dark and plain. (A pale shadow under it made
   the letters look doubled and soft; the menu's own Begin button had it too.) */
#chooser #pickNext,
#chooser #pickNext .hint-line {
	color: #24160a;
	text-shadow: none;
}
#chooser #pickNext .hint-line {
	color: #4a3214;
	font-weight: 600;
}
#chooser #pickNext .icon {
	color: #3a2610;
}

/* ---------- On a phone or a tablet: a panel is the whole screen ---------- */
/* Whatever its size in points (some phones report more than the 520 the older
   rule allows for, and every tablet does), a device worked by a finger gives
   each panel the whole screen, on a ground of its own: nothing of the place
   shows round it or blurred behind it. */
@media (pointer: coarse) {
	.overlay {
		padding: 0 !important;
		background: url('./art/ui/panel-patina.svg'),
			radial-gradient(ellipse at 30% 0%, #22382b, #0e1a15 85%) !important;
		backdrop-filter: none !important;
		-webkit-backdrop-filter: none !important;
	}
	.overlay > .card:not(.start-card) {
		align-self: stretch;
		width: 100% !important;
		max-width: none !important;
		height: 100%;
		max-height: 100dvh !important;
		border-radius: 0 !important;
		border-left: 0;
		border-right: 0;
	}
}

/* What is new (the notes in the update card): set into the dark panel like the
   other boxes, not on a pale ground of its own */
:root:not([data-scene='midian']) #update .update-notes {
	background: rgba(6, 14, 10, 0.34);
	border: 1px solid var(--panel-line);
	border-radius: 6px;
	color: var(--ink);
}
:root:not([data-scene='midian']) #update .update-notes h3 {
	color: var(--sun-gold);
	font-weight: 600;
	letter-spacing: 0.02em;
}
:root:not([data-scene='midian']) #update .update-notes ul {
	color: var(--ink);
	line-height: 1.45;
}
:root:not([data-scene='midian']) #update .update-notes li::marker {
	color: var(--gold);
}

/* The tiles of a chest that is opened by setting things in their order: pale
   tablets, so their lettering is the old dark ink (it had turned as pale as
   the tablet itself, and could not be read) */
:root:not([data-scene='midian']) #riddle .dials.order {
	--ink: #33230f;
	--ink-soft: rgba(51, 35, 15, 0.55);
	--night-ink: #1b1712;
	--lapis: #1f3f7a;
	--gold: #b8862b;
	--sun-gold: #e5b14a;
	--papyrus: #ecdcb0;
	--papyrus-light: #f7eed4;
	--papyrus-dark: #d6c08a;
	color: #33230f;
}
:root:not([data-scene='midian']) #riddle .dials.order .tile {
	color: #33230f;
	text-shadow: none;
}
/* (the line that says how is read on the dark panel itself, in its cream) */
:root:not([data-scene='midian']) #riddle .dials.order .order-how {
	color: #e9dcae;
}

/* A treasure's answer: on the dark panels a pale wash behind cream letters came
   out grey on grey, so the box is a deeper green there, with its olive bar */
:root:not([data-scene='midian']) #treasure .answer {
	background: rgba(0, 0, 0, 0.26);
	border-left-color: #a9c383;
}

/* (the bar's colours pass down to whatever scrolls inside a panel; its width
   does not, so it is given to everything in one) */
.overlay .card,
.overlay .card * {
	scrollbar-width: thin;
}
