/* ==========================================================================
   Control Selection & Next Quest Parchment Screen Styles
   ========================================================================== */

#controlSelectionScreen,
#nextQuestParchmentScreen {
	position: fixed;
	top: 0;
	left: 0;
	width: 100vw;
	height: 100vh;
	background: #110d0c;
	background-image: radial-gradient(circle at center, #3a2f2b 20%, #110d0c 100%);
	z-index: 58000;
	display: flex;
	justify-content: center;
	align-items: center;
	box-sizing: border-box;
	padding: 20px;
	opacity: 1;
	font-family: 'MedievalSharp', serif;
	color: #e0d2c5;
}

#nextQuestParchmentScreen {
	z-index: 70000;
	flex-direction: column;
}

/* Parchment Card Container */
.selection-card {
	background: #231b18;
	border: 12px double #8c6c53;
	border-radius: 8px;
	box-shadow: 0 12px 40px rgba(0, 0, 0, 0.8);
	width: 100%;
	max-width: 1080px;
	padding: 25px 30px;
	text-align: center;
	color: #e0d2c5;
	font-family: 'MedievalSharp', serif;
	max-height: 92vh;
	overflow-y: auto;
	transform: scale(0.97);
	transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
	will-change: transform;
	box-sizing: border-box;
}

.parchment-card {
	max-width: 950px;
	width: 100%;
	background: #231b18;
	border: 5px double #8c6c53;
	border-radius: 12px;
	padding: 40px;
	box-sizing: border-box;
	box-shadow: 0 12px 40px rgba(0, 0, 0, 0.8);
	text-align: center;
	display: flex;
	flex-direction: column;
	gap: 24px;
	max-height: 92vh;
	overflow-y: auto;
}

/* Headers */
.selection-campaign-header {
	font-size: 1.1em;
	letter-spacing: 1px;
	color: #ffb300;
	font-weight: bold;
	text-transform: uppercase;
	text-align: center;
}

.parchment-campaign-header {
	font-size: 1.1em;
	letter-spacing: 1px;
	color: #ffb300;
	font-weight: bold;
	text-transform: uppercase;
	text-align: left;
}

.selection-quest-header {
	font-family: 'Pirata One', serif;
	font-size: 2.3em;
	margin: 5px 0 15px 0;
	color: #d84315;
	border-bottom: 2px solid #8c6c53;
	padding-bottom: 10px;
}

.parchment-quest-header {
	font-family: 'Pirata One', serif;
	font-size: 2.5em;
	margin: 0;
	color: #d84315;
	border-bottom: 2px solid #8c6c53;
	padding-bottom: 10px;
	text-align: left;
}

/* Three-Column Layout */
.selection-columns-container {
	display: flex;
	gap: 20px;
	margin-top: 15px;
	align-items: stretch;
	flex-wrap: nowrap;
	justify-content: space-between;
}

.selection-col {
	flex: 1 1 300px;
	min-width: 260px;
	display: flex;
	flex-direction: column;
	gap: 12px;
	text-align: left;
}

.parchment-columns-container {
	display: flex;
	flex-direction: row;
	flex-wrap: wrap;
	gap: 30px;
	width: 100%;
}

.parchment-col-left {
	flex: 1.2;
	min-width: 300px;
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.parchment-col-right {
	flex: 1;
	min-width: 300px;
	display: flex;
	flex-direction: column;
	gap: 20px;
}

/* Role Selection & Grid */
.selection-section-title {
	margin: 0;
	font-size: 1.1em;
	color: #ffb300;
	border-bottom: 1px dashed rgba(255, 179, 0, 0.25);
	padding-bottom: 3px;
}

.selection-instruction {
	margin: 0;
	font-size: 0.95em;
	font-style: italic;
	color: #cbbba9;
}

.selection-grid {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.selection-char-btn {
	background: #2e2420;
	border: 2px solid transparent;
	border-radius: 6px;
	padding: 8px 12px;
	font-family: 'MedievalSharp', serif;
	font-size: 1.05em;
	font-weight: bold;
	color: #e0d2c5;
	cursor: pointer;
	transition: all 0.2s ease;
	display: flex;
	justify-content: space-between;
	align-items: center;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
	outline: none;
	user-select: none;
}

.selection-char-btn:hover:not(.locked) {
	background: #8c281f;
	color: #ffffff;
}

.selection-char-btn.locked {
	opacity: 0.5;
	cursor: not-allowed;
}

.selection-drag-handle {
	margin-right: 8px;
	color: #8c6c53;
	font-size: 1.1em;
}

.selection-claim-status {
	margin-left: auto;
	font-size: 0.85em;
	font-weight: normal;
	font-style: italic;
	color: #ff9800;
	transition: color 0.2s ease;
}

.selection-char-btn:hover:not(.locked) .selection-claim-status {
	color: #ffffff;
}

/* Claim All Button */
.selection-claim-all-btn {
	margin-top: auto;
	background: #8e6c4e;
	border: none;
	border-radius: 8px;
	padding: 10px 15px;
	font-family: 'MedievalSharp', serif;
	font-size: 1.1em;
	font-weight: normal;
	color: #ffffff;
	cursor: pointer;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
	transition: all 0.2s ease;
	outline: none;
}

.selection-claim-all-btn:hover:not(:disabled) {
	background: #7a5a3e;
	transform: scale(1.02);
}

.selection-claim-all-btn:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

/* Party Members Box */
.selection-party-box {
	background: rgba(140, 108, 83, 0.08);
	border: 1px solid rgba(140, 108, 83, 0.25);
	border-radius: 6px;
	padding: 10px 15px;
	text-align: left;
}

.selection-party-title {
	margin: 0 0 5px 0;
	font-size: 1.1em;
	color: #ffb300;
	border-bottom: 1px dashed rgba(255, 179, 0, 0.25);
	padding-bottom: 3px;
}

.selection-party-list {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	font-size: 0.95em;
	margin-top: 5px;
}

.selection-party-member {
	background: #2e2420;
	border: 1px solid #8c6c53;
	border-radius: 4px;
	padding: 2px 8px;
	font-size: 0.9em;
	color: #e0d2c5;
	display: inline-flex;
	align-items: center;
	gap: 5px;
	transition: all 0.2s ease;
}

.selection-party-member.is-ready {
	border-color: #2e7d32;
	background: rgba(46, 125, 50, 0.08);
}

.selection-party-dot {
	display: inline-block;
	width: 10px;
	height: 10px;
	border-radius: 50%;
}

.selection-ready-badge {
	color: #2e7d32;
	font-weight: bold;
	margin-left: 5px;
}

/* Quest Select Box */
.selection-quest-box {
	background: rgba(140, 108, 83, 0.08);
	border: 1px solid rgba(140, 108, 83, 0.25);
	border-radius: 6px;
	padding: 10px 15px;
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.selection-quest-label {
	font-size: 1.05em;
	font-weight: bold;
	color: #ffb300;
}

.selection-quest-dropdown {
	background: #2e2420;
	color: #e0d2c5;
	border: 2px solid #8c6c53;
	border-radius: 6px;
	padding: 8px 12px;
	font-size: 1.05em;
	font-family: 'MedievalSharp', serif;
	outline: none;
	cursor: pointer;
	width: 100%;
}

.selection-quest-dropdown:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

.selection-fresh-row {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-top: 6px;
	user-select: none;
}

.selection-fresh-row.disabled {
	cursor: not-allowed;
	opacity: 0.6;
}

.selection-fresh-checkbox {
	width: 16px;
	height: 16px;
	accent-color: #ffb300;
	margin: 0;
}

.selection-fresh-label {
	font-size: 0.95em;
	color: #e0d2c5;
	font-family: 'MedievalSharp', serif;
	line-height: 1;
	position: relative;
	top: 4px;
}

/* Action Buttons Row */
.selection-action-row {
	margin-top: auto;
	display: flex;
	gap: 12px;
	width: 100%;
}

.selection-cancel-btn {
	flex: 1;
	background: #8c281f;
	border: none;
	border-radius: 8px;
	padding: 12px 18px;
	font-family: 'MedievalSharp', serif;
	font-size: 1.25em;
	font-weight: normal;
	color: #ffffff;
	cursor: pointer;
	box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
	transition: all 0.2s ease;
	outline: none;
	height: 48px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.selection-cancel-btn:hover {
	background: #b71c1c;
	transform: scale(1.02);
}

.selection-launch-btn {
	flex: 1;
	background: #ffc107;
	border: none !important;
	border-radius: 8px;
	padding: 12px 18px;
	font-family: 'MedievalSharp', serif;
	font-size: 1.25em;
	font-weight: normal;
	color: #1c1512;
	cursor: pointer;
	box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
	transition: all 0.2s ease;
	outline: none !important;
	height: 48px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.selection-launch-btn:hover:not(:disabled) {
	background: #ffca2c;
	transform: scale(1.02);
}

.selection-launch-btn.ready-cancel {
	background: #c62828;
	color: #ffffff;
}

.selection-launch-btn.ready-cancel:hover {
	background: #d32f2f;
}

.selection-launch-btn:disabled {
	background: #555555;
	color: #888888;
	cursor: not-allowed;
	transform: none;
}

/* Parchment Screen Styles */
.parchment-narrative-block {
	font-family: 'MedievalSharp', serif;
	font-size: 1.2em;
	line-height: 1.6;
	font-style: italic;
	color: #e0d2c5;
	background: rgba(140, 108, 83, 0.08);
	border-left: 4px solid #d84315;
	padding: 20px;
	text-align: left;
	max-height: 40vh;
	overflow-y: auto;
}

.parchment-objectives-container {
	display: flex;
	flex-direction: column;
	gap: 12px;
	width: 100%;
	box-sizing: border-box;
}

.parchment-bottom-row {
	display: flex;
	flex-direction: row;
	gap: 30px;
	width: 100%;
	align-items: stretch;
}

.parchment-tts-card {
	flex: 1.2;
	min-width: 300px;
	display: flex;
	flex-direction: column;
	gap: 16px;
	border: 1px solid #5d4037;
	border-radius: 8px;
	padding: 20px;
	background: rgba(0, 0, 0, 0.15);
	box-sizing: border-box;
}

.parchment-vol-container {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	font-size: 1.1em;
	color: #e0d2c5;
	width: 100%;
}

.parchment-vol-slider {
	cursor: pointer;
	accent-color: #8c281f;
	flex: 1;
	margin: 0 10px;
}

.parchment-vol-val {
	min-width: 45px;
	text-align: right;
}

.parchment-narration-btn {
	background: #5d4037;
	border: none;
	border-radius: 8px;
	padding: 10px 16px;
	font-family: 'MedievalSharp', serif;
	font-size: 1.1em;
	font-weight: bold;
	color: #e0d2c5;
	cursor: pointer;
	box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
	transition: all 0.2s ease;
	align-self: stretch;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
}

.parchment-narration-btn:hover {
	background: #7d5648;
}

.parchment-action-container {
	flex: 1;
	min-width: 300px;
	display: flex;
	flex-direction: column;
	align-items: stretch;
	justify-content: flex-end;
	gap: 10px;
}

.parchment-headstart-container {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	font-family: 'MedievalSharp', serif;
	font-size: 1.15em;
	user-select: none;
	background: rgba(0, 0, 0, 0.3);
	border-radius: 8px;
	padding: 10px 14px;
	box-sizing: border-box;
	width: 100%;
	transition: all 0.2s ease;
}

.parchment-headstart-container.available {
	color: #ffd54f;
	border: 1px dashed #ffa000;
	cursor: pointer;
}

.parchment-headstart-container.claimed {
	color: #8d6e63;
	border: 1px dashed #5d4037;
	cursor: not-allowed;
}

.parchment-headstart-checkbox {
	width: 18px;
	height: 18px;
	accent-color: #e65100;
	margin: 0;
}

.parchment-action-row {
	display: flex;
	gap: 12px;
	width: 100%;
	align-items: center;
}

.parchment-return-btn {
	flex: 0 0 160px;
	min-width: 140px;
	height: 48px;
	font-size: 1.15em !important;
}

.parchment-begin-btn {
	flex: 1;
	width: auto;
	background: #8c281f;
	border: none;
	border-radius: 8px;
	padding: 10px 20px;
	font-family: 'Pirata One', serif;
	font-size: 1.8em;
	font-weight: normal;
	color: #ffffff;
	cursor: pointer;
	box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
	transition: all 0.2s ease;
	height: 48px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.parchment-begin-btn:hover:not(:disabled) {
	background: #b71c1c;
	transform: scale(1.02);
}

.parchment-begin-btn:disabled {
	cursor: not-allowed;
	opacity: 0.6;
}

.parchment-waiting-text {
	flex: 1;
	padding: 10px 14px;
	font-family: 'MedievalSharp', serif;
	font-size: 1.15em;
	font-weight: bold;
	color: #ffb300;
	text-align: center;
	letter-spacing: 0.5px;
	display: flex;
	align-items: center;
	justify-content: center;
}

/* Debug Asset Panel Button */
.debug-asset-btn {
	background: #2b2b2b;
	color: #ffeb3b;
	border: 1px solid #555;
	padding: 6px;
	border-radius: 4px;
	font-family: 'MedievalSharp', serif;
	font-size: 13px;
	cursor: pointer;
	text-align: left;
	transition: background 0.2s;
}

.debug-asset-btn:hover {
	background: #3d3d3d;
}

/* ==========================================================================
   Spell Control (3rd Middle Skinny Column) Styles
   ========================================================================== */

.selection-spell-col {
	flex: 0 0 210px !important;
	min-width: 190px !important;
	max-width: 230px !important;
	text-align: center !important;
	background: transparent !important;
	padding: 0 !important;
	border: none !important;
	box-sizing: border-box;
}

.selection-spell-instruction {
	font-size: 0.85em !important;
	line-height: 1.25 !important;
	margin: 0 0 4px 0 !important;
	color: #cbbba9 !important;
	font-style: italic !important;
	text-align: center !important;
}

.selection-spell-turn-indicator {
	background: rgba(20, 14, 11, 0.85);
	border: 1px solid #8c6c53;
	border-radius: 4px;
	padding: 5px 8px;
	font-size: 0.82em;
	font-weight: bold;
	color: #ffd700;
	margin-bottom: 8px;
	text-align: center;
	line-height: 1.25;
	box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.6);
	transition: all 0.3s ease;
}

.selection-spell-turn-indicator.turn-wizard {
	border-color: #d84315;
	color: #ff8a65;
}

.selection-spell-turn-indicator.turn-elf {
	border-color: #2e7d32;
	color: #81c784;
}

.selection-spell-turn-indicator.completed {
	border-color: #4caf50;
	color: #a5d6a7;
}

.selection-spell-turn-indicator.locked {
	border-color: #757575;
	color: #9e9e9e;
	font-style: italic;
}

.selection-spell-stack {
	display: flex;
	flex-direction: column;
	gap: 7px;
	align-items: stretch;
}

.selection-spell-thumb-wrapper {
	position: relative;
	background: #19120e;
	border: 2px solid #5a4436;
	border-radius: 6px;
	padding: 4px 8px;
	display: flex;
	align-items: center;
	gap: 10px;
	box-sizing: border-box;
	transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
	cursor: default;
	user-select: none;
	overflow: hidden;
}

.selection-spell-thumb-img {
	width: 38px;
	height: 54px;
	object-fit: cover;
	border-radius: 3px;
	border: 1px solid rgba(255, 255, 255, 0.15);
	box-shadow: 0 3px 6px rgba(0, 0, 0, 0.7);
	flex-shrink: 0;
	pointer-events: none;
}

.selection-spell-label {
	font-family: 'Pirata One', serif;
	font-size: 1.35em;
	color: #e0d2c5;
	letter-spacing: 0.5px;
	text-align: left;
	pointer-events: none;
}

.selection-spell-badge {
	position: absolute;
	top: 3px;
	right: 4px;
	font-family: 'MedievalSharp', serif;
	font-size: 0.65em;
	padding: 1px 5px;
	border-radius: 3px;
	background: rgba(0, 0, 0, 0.65);
	color: #cbbba9;
	border: 1px solid rgba(140, 108, 83, 0.4);
	text-transform: uppercase;
	letter-spacing: 0.3px;
	pointer-events: none;
	transition: all 0.2s ease;
}

/* Interactivity & Hover States */
.selection-spell-thumb-wrapper.clickable {
	cursor: var(--gauntlet-cursor, url('/webp/gauntlet_pointer.webp') 0 0, pointer) !important;
	border-color: #ffd700;
}

.selection-spell-thumb-wrapper.clickable:hover {
	transform: translateY(-2px) scale(1.02);
	background: #271c17;
	box-shadow: 0 4px 14px rgba(255, 215, 0, 0.45);
	border-color: #fff8e1;
}

.selection-spell-thumb-wrapper.pulse-turn {
	animation: pulse-spell-turn 1.8s infinite ease-in-out;
}

@keyframes pulse-spell-turn {
	0%, 100% {
		box-shadow: 0 0 5px rgba(255, 215, 0, 0.3);
		border-color: #ffb300;
	}
	50% {
		box-shadow: 0 0 16px rgba(255, 215, 0, 0.85);
		border-color: #fff9c4;
	}
}

.selection-spell-thumb-wrapper.selected {
	background: #231914;
	border-width: 2.5px;
}

.selection-spell-thumb-wrapper.disabled {
	opacity: 0.45;
	filter: grayscale(0.5);
	pointer-events: none;
}

.selection-spell-thumb-wrapper.locked {
	opacity: 0.75;
	filter: grayscale(0.3);
	cursor: default;
}

.selection-spell-thumb-wrapper.waiting {
	opacity: 0.6;
	cursor: default;
}

