.world-quest-vars {
	--wq-primary: #b0894f;
	--wq-bg: #171514;
	--wq-panel: #241f1b;
	--wq-text: #f5efe4;
	--wq-radius: 8px;
	--wq-font: Georgia, serif;
	--wq-max: 1180px;
	color: var(--wq-text);
	font-family: var(--wq-font);
}

.world-quest-route {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
	width: 100%;
}

.world-quest-fill {
	box-sizing: border-box;
	min-height: calc(100vh - var(--wq-header-offset, 0px) - var(--wp-admin--admin-bar--height, 0px));
	width: 100%;
}

.world-quest-list,
.world-quest-viewer,
.world-quest-about,
.world-quest-help {
	background: radial-gradient(circle at top, color-mix(in srgb, var(--wq-primary), transparent 72%), var(--wq-bg));
	border: 1px solid color-mix(in srgb, var(--wq-primary), transparent 55%);
	border-radius: 0;
	box-sizing: border-box;
	margin: 0;
	max-width: none;
	min-height: calc(100vh - var(--wq-header-offset, 0px) - var(--wp-admin--admin-bar--height, 0px));
	padding: 24px;
	width: 100%;
}

.world-quest-intro {
	align-items: center;
	background: color-mix(in srgb, var(--wq-panel), transparent 5%);
	border: 1px solid color-mix(in srgb, var(--wq-primary), transparent 58%);
	border-radius: 8px;
	display: grid;
	gap: 18px;
	grid-template-columns: minmax(0, 1fr) auto;
	margin-bottom: 18px;
	padding: 20px;
}

.world-quest-intro span,
.world-quest-about__content span,
.world-quest-help__hero span {
	color: var(--wq-primary);
	display: block;
	font-size: 13px;
	font-weight: 700;
	text-transform: uppercase;
}

.world-quest-intro h1,
.world-quest-about__content h1,
.world-quest-help__hero h1 {
	color: var(--wq-text);
	font-size: clamp(28px, 3.2vw, 48px);
	line-height: 1.05;
	margin: 4px 0 8px;
}

.world-quest-intro p,
.world-quest-help__hero p {
	margin: 0;
	max-width: 780px;
}

.world-quest-intro__link {
	white-space: nowrap;
}

.world-quest-intro__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	justify-content: flex-end;
}

.world-quest-create-toggle {
	cursor: pointer;
}

.world-quest-create-form {
	background: color-mix(in srgb, var(--wq-panel), transparent 4%);
	border: 1px solid color-mix(in srgb, var(--wq-primary), transparent 55%);
	border-radius: 8px;
	display: grid;
	gap: 12px;
	margin: 0 0 18px;
	padding: 18px;
}

.world-quest-create-form[hidden] {
	display: none;
}

.world-quest-create-form h2 {
	color: var(--wq-primary);
	margin: 0;
}

.world-quest-create-form label {
	display: grid;
	gap: 6px;
}

.world-quest-create-form input,
.world-quest-create-form textarea {
	background: #120f0d;
	border: 1px solid color-mix(in srgb, var(--wq-primary), transparent 50%);
	border-radius: 6px;
	color: var(--wq-text);
	padding: 10px;
}

.world-quest-create-form textarea {
	min-height: 110px;
}

.world-quest-create-status {
	color: var(--wq-primary);
	font-weight: 700;
	margin: 0;
}

.world-quest-viewer {
	display: grid;
	gap: 12px;
	grid-template-areas:
		"tip"
		"hero"
		"stage"
		"inventory"
		"choices"
		"suggest"
		"form";
	grid-template-rows: auto auto minmax(0, 1fr) minmax(48px, auto) minmax(52px, auto) auto auto;
	height: calc(100vh - var(--wq-header-offset, 0px) - var(--wp-admin--admin-bar--height, 0px));
	overflow: hidden;
	padding: 16px 24px;
}

.world-quest-orientation-tip {
	background: color-mix(in srgb, var(--wq-primary), transparent 84%);
	border: 1px solid color-mix(in srgb, var(--wq-primary), transparent 55%);
	border-radius: var(--wq-radius);
	color: var(--wq-primary);
	display: none;
	font-size: 14px;
	font-weight: 700;
	grid-area: tip;
	padding: 8px 10px;
	text-align: center;
}

.world-quest-filter {
	display: grid;
	gap: 10px;
	grid-template-columns: minmax(180px, 1fr) 150px 150px auto;
	margin-bottom: 18px;
}

.world-quest-filter input,
.world-quest-filter select,
.world-quest-filter button,
.world-quest-choices button,
.world-quest-link {
	background: var(--wq-panel);
	border: 1px solid color-mix(in srgb, var(--wq-primary), transparent 45%);
	border-radius: var(--wq-radius);
	color: var(--wq-text);
	padding: 11px 14px;
	text-decoration: none;
}

.world-quest-filter button,
.world-quest-choices button,
.world-quest-link {
	background: var(--wq-primary);
	color: #171514;
	cursor: pointer;
	font-weight: 700;
}

.world-quest-grid {
	display: grid;
	gap: 16px;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

.world-quest-card {
	background: color-mix(in srgb, var(--wq-panel), transparent 8%);
	border: 1px solid color-mix(in srgb, var(--wq-primary), transparent 65%);
	border-radius: 8px;
	display: grid;
	gap: 12px;
	grid-template-rows: auto minmax(52px, auto) auto;
	overflow: hidden;
	padding: 14px;
}

.world-quest-card img,
.world-quest-card__placeholder {
	aspect-ratio: 16 / 9;
	background: linear-gradient(135deg, var(--wq-panel), var(--wq-primary));
	border-radius: 6px;
	display: block;
	height: auto;
	object-fit: cover;
	width: 100%;
}

.world-quest-card h3 {
	align-self: start;
	color: var(--wq-text);
	font-size: 22px;
	line-height: 1.15;
	margin: 0;
}

.world-quest-card .world-quest-link {
	align-self: end;
	text-align: center;
}

.world-quest-link--ghost {
	background: transparent;
	color: var(--wq-primary);
}

.world-quest-reset-progress {
	font: inherit;
}

.world-quest-reset-status {
	color: var(--wq-primary);
	font-weight: 700;
	margin: 12px 0 0;
}

.world-quest-about {
	display: grid;
	gap: 22px;
	grid-template-columns: minmax(280px, 1.05fr) minmax(280px, .95fr);
}

.world-quest-about__media,
.world-quest-about__content,
.world-quest-help__hero,
.world-quest-help__grid article {
	background: color-mix(in srgb, var(--wq-panel), transparent 6%);
	border: 1px solid color-mix(in srgb, var(--wq-primary), transparent 62%);
	border-radius: 8px;
}

.world-quest-about__media {
	align-self: stretch;
	min-height: 360px;
	overflow: hidden;
}

.world-quest-about__media img,
.world-quest-about__media .world-quest-card__placeholder {
	display: block;
	height: 100%;
	object-fit: cover;
	width: 100%;
}

.world-quest-about__content {
	display: grid;
	grid-template-rows: auto auto minmax(0, 1fr) auto;
	min-height: 0;
	padding: 24px;
}

.world-quest-about__description {
	min-height: 0;
	overflow: auto;
	padding-right: 8px;
}

.world-quest-about__actions {
	display: grid;
	gap: 12px;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	margin-top: 18px;
}

.world-quest-about__actions .world-quest-link {
	text-align: center;
}

.world-quest-help {
	display: grid;
	gap: 18px;
	grid-template-rows: auto minmax(0, 1fr) auto;
}

.world-quest-help__hero,
.world-quest-help__grid article {
	padding: 22px;
}

.world-quest-help__grid {
	display: grid;
	gap: 16px;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	min-height: 0;
	overflow: auto;
}

.world-quest-help__grid h2 {
	color: var(--wq-primary);
	margin: 0 0 12px;
}

.world-quest-help__grid ol,
.world-quest-help__grid ul {
	margin-bottom: 0;
	padding-left: 22px;
}

.world-quest-help__grid li + li {
	margin-top: 8px;
}

.world-quest-help__back {
	justify-self: start;
}

.world-quest-hero {
	align-items: end;
	background: linear-gradient(135deg, color-mix(in srgb, var(--wq-primary), transparent 35%), transparent), var(--wq-panel);
	border-radius: 8px;
	display: flex;
	gap: 14px;
	grid-area: hero;
	justify-content: space-between;
	min-height: 72px;
	padding: 14px 18px;
}

.world-quest-hero span {
	color: var(--wq-primary);
	display: block;
	font-size: 13px;
	font-weight: 700;
	text-transform: uppercase;
}

.world-quest-hero h1 {
	color: var(--wq-text);
	font-size: clamp(26px, 3vw, 42px);
	line-height: 1.05;
	margin: 2px 0 0;
}

.world-quest-stage {
	display: grid;
	gap: 18px;
	grid-area: stage;
	grid-template-columns: 1.55fr 1fr;
	margin-top: 0;
	min-height: 0;
	overflow: hidden;
}

.world-quest-media,
.world-quest-copy {
	background: var(--wq-panel);
	border: 1px solid color-mix(in srgb, var(--wq-primary), transparent 65%);
	border-radius: 8px;
	min-height: 0;
	overflow: hidden;
}

.world-quest-media {
	align-self: stretch;
}

.world-quest-media img {
	display: block;
	height: 100%;
	object-fit: cover;
	width: 100%;
}

.world-quest-image-open {
	background: transparent;
	border: 0;
	cursor: zoom-in;
	display: block;
	height: 100%;
	padding: 0;
	width: 100%;
}

.world-quest-node-placeholder {
	align-items: center;
	background: linear-gradient(145deg, #2b2926, #4a3828);
	display: flex;
	height: 100%;
	justify-content: center;
	min-height: 100%;
}

.world-quest-node-placeholder span {
	border: 1px solid var(--wq-primary);
	border-radius: 50%;
	color: var(--wq-primary);
	font-size: 44px;
	padding: 34px;
}

.world-quest-copy {
	display: grid;
	grid-template-rows: auto minmax(0, 1fr);
	padding: 20px;
}

.world-quest-copy h2 {
	color: var(--wq-primary);
	font-size: 24px;
	margin: 0 0 12px;
}

.world-quest-voice {
	align-items: center;
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	justify-content: flex-end;
	margin: 0;
	margin-left: auto;
}

.world-quest-voice button,
.world-quest-voice select {
	background: #120f0d;
	border: 1px solid color-mix(in srgb, var(--wq-primary), transparent 45%);
	border-radius: var(--wq-radius);
	color: var(--wq-text);
	cursor: pointer;
	padding: 8px 10px;
}

.world-quest-voice button {
	background: var(--wq-primary);
	color: #171514;
	font-weight: 700;
}

.world-quest-voice label {
	align-items: center;
	display: inline-flex;
	gap: 6px;
}

.world-quest-copy__scroll {
	max-height: none;
	min-height: 0;
	overflow: auto;
	padding-right: 8px;
}

.world-quest-choices {
	display: grid;
	gap: 12px;
	grid-area: choices;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	margin-top: 0;
	position: relative;
}

.world-quest-choices button,
.world-quest-suggest,
.world-quest-suggest-form button {
	min-height: 52px;
	transition: transform .15s ease, filter .15s ease;
}

.world-quest-choices button:hover,
.world-quest-suggest:hover,
.world-quest-suggest-form button:hover {
	filter: brightness(1.08);
	transform: translateY(-1px);
}

.world-quest-choices .world-quest-back {
	background: transparent;
	color: var(--wq-primary);
}

.world-quest-choices .world-quest-back:disabled {
	cursor: not-allowed;
	filter: grayscale(.6);
	opacity: .55;
	transform: none;
}

.world-quest-choices button.is-reward-taken,
.world-quest-choices button:disabled {
	cursor: not-allowed;
	opacity: .58;
	transform: none;
}

.world-quest-inline-check {
	align-items: center;
	display: flex !important;
	flex-direction: row;
	gap: 8px;
}

.world-quest-inventory {
	align-items: center;
	background: color-mix(in srgb, var(--wq-panel), transparent 5%);
	border: 1px solid color-mix(in srgb, var(--wq-primary), transparent 58%);
	border-radius: var(--wq-radius);
	display: flex;
	gap: 12px;
	grid-area: inventory;
	min-height: 48px;
	overflow: hidden;
	padding: 8px 12px;
	position: relative;
}

.world-quest-inventory strong {
	color: var(--wq-primary);
	white-space: nowrap;
}

.world-quest-inventory__items {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	min-width: 0;
}

.world-quest-inventory__item {
	align-items: center;
	background: color-mix(in srgb, var(--wq-panel), #000 18%);
	border: 1px solid color-mix(in srgb, var(--wq-primary), transparent 45%);
	border-radius: 999px;
	display: inline-flex;
	gap: 6px;
	max-width: 220px;
	padding: 4px 9px 4px 4px;
}

.world-quest-inventory__item img,
.world-quest-inventory__item span {
	align-items: center;
	aspect-ratio: 1;
	border-radius: 50%;
	display: inline-flex;
	height: 28px;
	justify-content: center;
	object-fit: cover;
	width: 28px;
}

.world-quest-inventory__item span {
	background: var(--wq-primary);
	color: #15100c;
	font-weight: 700;
}

.world-quest-inventory__item em {
	font-style: normal;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.world-quest-inventory__empty,
.world-quest-inventory__message {
	margin: 0;
}

.world-quest-inventory__message {
	color: var(--wq-primary);
	font-weight: 700;
	margin-left: auto;
}

.world-quest-suggest {
	background: transparent;
	border: 1px dashed var(--wq-primary);
	border-radius: var(--wq-radius);
	color: var(--wq-primary);
	cursor: pointer;
	display: block;
	font-weight: 700;
	grid-area: suggest;
	margin-top: 0;
	padding: 12px 16px;
	width: 100%;
}

.world-quest-suggest-form {
	background: color-mix(in srgb, var(--wq-panel), transparent 4%);
	border: 1px solid color-mix(in srgb, var(--wq-primary), transparent 60%);
	border-radius: 8px;
	display: grid;
	gap: 12px;
	grid-area: form;
	margin-top: 0;
	max-height: 34vh;
	overflow: auto;
	padding: 16px;
}

.world-quest-suggest-form[hidden] {
	display: none;
}

.world-quest-suggest-form label {
	display: grid;
	gap: 6px;
}

.world-quest-suggest-form input,
.world-quest-suggest-form select,
.world-quest-suggest-form textarea {
	background: #120f0d;
	border: 1px solid color-mix(in srgb, var(--wq-primary), transparent 50%);
	border-radius: 6px;
	color: var(--wq-text);
	padding: 10px;
}

.world-quest-target-mode {
	display: grid;
	gap: 8px;
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.world-quest-target-mode button {
	background: transparent;
	border: 1px solid color-mix(in srgb, var(--wq-primary), transparent 45%);
	border-radius: var(--wq-radius);
	color: var(--wq-primary);
	cursor: pointer;
	font-weight: 700;
	padding: 10px 12px;
}

.world-quest-target-mode button.is-active {
	background: var(--wq-primary);
	color: #171514;
}

.world-quest-new-target,
.world-quest-existing-target {
	display: grid;
	gap: 12px;
}

.world-quest-new-target[hidden],
.world-quest-existing-target[hidden] {
	display: none;
}

.world-quest-suggest-form textarea {
	min-height: 110px;
}

.world-quest-hp {
	left: -9999px;
	position: absolute;
}

.world-quest-image-modal[hidden] {
	display: none;
}

.world-quest-image-modal {
	align-items: center;
	background: rgba(0, 0, 0, .82);
	bottom: 0;
	display: flex;
	justify-content: center;
	left: 0;
	padding: 28px;
	position: fixed;
	right: 0;
	top: 0;
	z-index: 99999;
}

.world-quest-image-modal img {
	border-radius: 8px;
	max-height: 88vh;
	max-width: 92vw;
	object-fit: contain;
}

.world-quest-image-modal__close {
	background: var(--wq-primary);
	border: 0;
	border-radius: 6px;
	color: #171514;
	cursor: pointer;
	font-weight: 700;
	padding: 10px 14px;
	position: absolute;
	right: 24px;
	top: 24px;
}

@media (max-width: 760px) {
	.world-quest-list,
	.world-quest-viewer,
	.world-quest-about,
	.world-quest-help {
		padding: 14px;
	}

	.world-quest-viewer {
		height: auto;
		min-height: calc(100vh - var(--wq-header-offset, 0px) - var(--wp-admin--admin-bar--height, 0px));
		overflow: visible;
	}

	.world-quest-filter,
	.world-quest-stage,
	.world-quest-choices,
	.world-quest-target-mode,
	.world-quest-intro,
	.world-quest-about,
	.world-quest-about__actions,
	.world-quest-help__grid {
		grid-template-columns: 1fr;
	}

	.world-quest-media,
	.world-quest-copy,
	.world-quest-node-placeholder {
		min-height: 260px;
	}
}

@media (max-width: 760px) {
	.world-quest-list,
	.world-quest-viewer,
	.world-quest-about,
	.world-quest-help {
		padding: 10px;
	}

	.world-quest-viewer {
		gap: 10px;
	}

	.world-quest-orientation-tip {
		display: block;
	}

	.world-quest-hero {
		align-items: stretch;
		flex-direction: column;
		min-height: 52px;
		padding: 10px 12px;
	}

	.world-quest-hero span {
		font-size: 11px;
	}

	.world-quest-hero h1 {
		font-size: 24px;
		line-height: 1.05;
	}

	.world-quest-media,
	.world-quest-copy,
	.world-quest-node-placeholder {
		min-height: 220px;
	}

	.world-quest-copy {
		padding: 14px;
	}

	.world-quest-copy h2 {
		font-size: 20px;
	}

	.world-quest-voice {
		gap: 6px;
		justify-content: flex-start;
		margin-left: 0;
	}

	.world-quest-voice button,
	.world-quest-voice select {
		min-height: 40px;
		padding: 8px;
	}

	.world-quest-choices {
		gap: 8px;
	}

	.world-quest-choices button,
	.world-quest-suggest,
	.world-quest-suggest-form button,
	.world-quest-create-form button,
	.world-quest-link {
		min-height: 48px;
		padding: 12px 14px;
	}

	.world-quest-inventory {
		align-items: flex-start;
		flex-direction: column;
		gap: 8px;
	}

	.world-quest-inventory__message {
		margin-left: 0;
	}

	.world-quest-suggest-form,
	.world-quest-create-form {
		max-height: none;
		padding: 12px;
	}

	.world-quest-filter,
	.world-quest-intro__actions {
		align-items: stretch;
		display: grid;
		grid-template-columns: 1fr;
	}
}

@media (max-width: 1024px) and (orientation: landscape) {
	.world-quest-viewer {
		gap: 6px;
		grid-template-rows: auto auto minmax(0, 1fr) minmax(30px, auto) minmax(36px, auto) auto auto;
		height: calc(100vh - var(--wq-header-offset, 0px) - var(--wp-admin--admin-bar--height, 0px));
		overflow: hidden;
		padding: 8px 10px;
	}

	.world-quest-orientation-tip {
		display: none;
	}

	.world-quest-hero {
		align-items: center;
		flex-direction: row;
		min-height: 34px;
		padding: 6px 10px;
	}

	.world-quest-hero span {
		font-size: 10px;
	}

	.world-quest-hero h1 {
		font-size: 18px;
		overflow: hidden;
		text-overflow: ellipsis;
		white-space: nowrap;
	}

	.world-quest-stage {
		gap: 8px;
		grid-template-columns: minmax(0, 1.25fr) minmax(260px, .75fr);
		min-height: 0;
	}

	.world-quest-media,
	.world-quest-copy,
	.world-quest-node-placeholder {
		min-height: 0;
	}

	.world-quest-copy {
		padding: 10px;
	}

	.world-quest-copy h2 {
		font-size: 18px;
		margin-bottom: 6px;
	}

	.world-quest-voice {
		flex-wrap: nowrap;
		margin-bottom: 0;
		margin-left: auto;
	}

	.world-quest-voice button,
	.world-quest-voice select {
		font-size: 13px;
		min-height: 30px;
		padding: 5px 7px;
	}

	.world-quest-copy__scroll {
		font-size: 14px;
		line-height: 1.35;
	}

	.world-quest-choices {
		gap: 6px;
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.world-quest-choices button,
	.world-quest-suggest {
		font-size: 15px;
		line-height: 1.15;
		min-height: 36px;
		max-height: 44px;
		overflow: hidden;
		padding: 6px 8px;
		text-overflow: ellipsis;
	}

	.world-quest-inventory {
		align-items: center;
		flex-direction: row;
		font-size: 13px;
		gap: 8px;
		min-height: 30px;
		padding: 6px 8px;
	}

	.world-quest-inventory__empty,
	.world-quest-inventory__message {
		line-height: 1.2;
	}

	.world-quest-inventory__message {
		margin-left: auto;
	}

	.world-quest-inventory__item img,
	.world-quest-inventory__item span {
		height: 22px;
		width: 22px;
	}

	.world-quest-inventory__item {
		max-width: 160px;
		padding: 3px 7px 3px 3px;
	}

	.world-quest-suggest-form {
		max-height: 58vh;
	}
}

@media (max-width: 1024px) and (orientation: landscape) and (max-height: 460px) {
	.world-quest-viewer {
		gap: 5px;
		grid-template-rows: auto auto minmax(0, 1fr) minmax(28px, auto) minmax(32px, auto) auto auto;
		padding: 6px 8px;
	}

	.world-quest-copy__scroll {
		font-size: 13px;
		line-height: 1.3;
	}

	.world-quest-choices button,
	.world-quest-suggest {
		font-size: 14px;
		min-height: 32px;
		max-height: 38px;
		padding: 5px 8px;
	}

	.world-quest-inventory {
		min-height: 28px;
		padding: 4px 7px;
	}
}
