/**
 * Simple Machines Forum (SMF) 2.1 Character Approval & Timeline Engine
 * [M45T3R5W4G3R] Dark Academia Fictional Timeline & Character Approval Stylesheet
 */

/* ==========================================================================
   Fictional Timeline Header Badge
   ========================================================================== */
.m4-timeline-header-badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	padding: 6px 18px;
	background: linear-gradient(135deg, rgba(22, 16, 36, 0.94) 0%, rgba(13, 9, 22, 0.97) 100%);
	border: 1px solid rgba(212, 175, 55, 0.38);
	border-radius: 30px;
	box-shadow: 0 4px 18px rgba(0, 0, 0, 0.55), inset 0 1px 1px rgba(255, 255, 255, 0.1), inset 0 0 12px rgba(212, 175, 55, 0.12);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
	font-family: inherit;
	line-height: 1.4;
	white-space: nowrap;
	transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
	user-select: none;
	margin: 0 auto;
	z-index: 10;
}

.m4-timeline-header-badge:hover {
	border-color: rgba(212, 175, 55, 0.7);
	box-shadow: 0 6px 24px rgba(0, 0, 0, 0.7), 0 0 14px rgba(212, 175, 55, 0.35), inset 0 0 16px rgba(212, 175, 55, 0.2);
	transform: translateY(-1px);
}

.m4-tl-star {
	color: #d4af37;
	font-size: 0.88rem;
	opacity: 0.85;
	animation: m4-tl-pulse 3s infinite ease-in-out;
}

.m4-tl-era {
	color: #a49a88;
	font-size: 0.76rem;
	text-transform: uppercase;
	letter-spacing: 1px;
	font-weight: 500;
	margin-right: 2px;
}

.m4-tl-date {
	color: #fce7a1;
	font-size: 0.92rem;
	font-weight: 700;
	letter-spacing: 0.4px;
	text-shadow: 0 0 8px rgba(212, 175, 55, 0.3);
}

.m4-tl-sep {
	color: rgba(212, 175, 55, 0.4);
	margin: 0 4px;
	font-weight: 300;
	font-size: 0.85rem;
}

.m4-tl-week {
	color: #e2d9cc;
	font-size: 0.88rem;
	font-weight: 500;
}

.m4-tl-frozen {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	margin-left: 6px;
	font-size: 0.74rem;
	background: rgba(59, 130, 246, 0.22);
	color: #93c5fd;
	border: 1px solid rgba(147, 197, 253, 0.45);
	padding: 2px 9px;
	border-radius: 12px;
	font-weight: 600;
	letter-spacing: 0.3px;
	box-shadow: 0 0 8px rgba(59, 130, 246, 0.2);
}

@keyframes m4-tl-pulse {
	0%, 100% {
		opacity: 0.65;
		transform: scale(1);
	}
	50% {
		opacity: 1;
		transform: scale(1.15);
		filter: drop-shadow(0 0 4px #d4af37);
	}
}

/* Header Doodle replacement / integration in Ashwinder */
.header-timeline-wrapper {
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 0 auto;
	padding: 4px 12px;
}

/* Responsive adjustments */
@media screen and (max-width: 900px) {
	.m4-timeline-header-badge {
		padding: 5px 12px;
		font-size: 0.82rem;
		gap: 4px;
	}
	.m4-tl-date {
		font-size: 0.85rem;
	}
	.m4-tl-week {
		font-size: 0.82rem;
	}
}

@media screen and (max-width: 720px) {
	.header-timeline-wrapper {
		order: 3;
		width: 100%;
		margin: 6px 0;
	}
	.m4-timeline-header-badge {
		flex-wrap: wrap;
		white-space: normal;
		text-align: center;
		padding: 5px 10px;
		border-radius: 16px;
	}
	.m4-tl-era {
		display: none;
	}
}

/* ==========================================================================
   Character Application Form Styles (Dark Academia RPG)
   ========================================================================== */
.m4-apply-wrap {
	max-width: 1000px;
	margin: 20px auto 40px auto;
	padding: 0 14px;
}

.m4-apply-header {
	text-align: center;
	margin-bottom: 28px;
	padding: 24px 20px;
	background: linear-gradient(180deg, rgba(26, 18, 42, 0.7) 0%, rgba(15, 11, 24, 0.4) 100%);
	border: 1px solid rgba(212, 175, 55, 0.25);
	border-radius: 12px;
	box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

.m4-apply-header-badge {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	background: rgba(212, 175, 55, 0.12);
	border: 1px solid rgba(212, 175, 55, 0.35);
	padding: 4px 14px;
	border-radius: 20px;
	font-size: 0.84rem;
	color: #fce7a1;
	margin-bottom: 12px;
}

.m4-apply-title {
	font-size: 1.85rem;
	font-weight: 700;
	color: #fbf6ee;
	letter-spacing: 0.5px;
	margin: 0 0 8px 0;
	text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8), 0 0 16px rgba(212, 175, 55, 0.25);
}

.m4-apply-subtitle {
	font-size: 0.96rem;
	color: #cfc5b4;
	margin: 0 auto;
	max-width: 700px;
	line-height: 1.55;
}

/* Section Containers */
.m4-section {
	background: linear-gradient(135deg, rgba(22, 17, 34, 0.88) 0%, rgba(14, 11, 22, 0.94) 100%);
	border: 1px solid rgba(212, 175, 55, 0.24);
	border-radius: 10px;
	padding: 22px 26px;
	margin-bottom: 22px;
	box-shadow: 0 6px 24px rgba(0, 0, 0, 0.45);
	backdrop-filter: blur(6px);
}

.m4-section-title {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 18px;
	border-bottom: 1px solid rgba(212, 175, 55, 0.18);
	padding-bottom: 12px;
}

.m4-section-title h3 {
	margin: 0;
	font-size: 1.22rem;
	color: #f6e3a1;
	font-weight: 600;
	letter-spacing: 0.3px;
}

.m4-step {
	width: 28px;
	height: 28px;
	border-radius: 50%;
	background: linear-gradient(135deg, #d4af37 0%, #aa8420 100%);
	color: #120e1e;
	font-weight: 700;
	font-size: 0.9rem;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 0 10px rgba(212, 175, 55, 0.4);
}

/* Grids & Fields */
.m4-grid-2 {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
	gap: 16px;
	margin-bottom: 14px;
}

.m4-grid-3 {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 16px;
	margin-bottom: 14px;
}

.m4-grid-4 {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
	gap: 14px;
	margin-bottom: 16px;
}

.m4-field {
	display: flex;
	flex-direction: column;
	gap: 6px;
	margin-bottom: 12px;
}

.m4-field label {
	font-size: 0.88rem;
	font-weight: 600;
	color: #e2d9cc;
	letter-spacing: 0.2px;
}

.m4-field label .req {
	color: #f87171;
	font-weight: 700;
}

.m4-hint {
	font-size: 0.78rem;
	color: #94a3b8;
}

.m4-input, .m4-select, .m4-textarea {
	background: rgba(13, 9, 20, 0.85);
	border: 1px solid rgba(212, 175, 55, 0.3);
	color: #f1f5f9;
	padding: 9px 12px;
	border-radius: 6px;
	font-size: 0.92rem;
	font-family: inherit;
	transition: all 0.25s ease;
	outline: none;
	width: 100%;
	box-sizing: border-box;
}

.m4-input:focus, .m4-select:focus, .m4-textarea:focus {
	border-color: rgba(212, 175, 55, 0.75);
	box-shadow: 0 0 12px rgba(212, 175, 55, 0.25);
	background: rgba(18, 12, 28, 0.95);
}

.m4-textarea {
	resize: vertical;
	line-height: 1.5;
}

.m4-stat-pill {
	background: rgba(13, 9, 20, 0.85);
	border: 1px solid rgba(212, 175, 55, 0.2);
	color: #fce7a1;
	font-weight: 600;
	padding: 9px 12px;
	border-radius: 6px;
	font-size: 0.92rem;
	display: flex;
	align-items: center;
}

/* Houses Grid */
.m4-houses-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
	gap: 12px;
	margin-top: 6px;
}

.m4-house-card {
	position: relative;
	cursor: pointer;
}

.m4-house-card input[type="radio"] {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}

.m4-house-inner {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 12px 14px;
	background: rgba(15, 11, 24, 0.75);
	border: 1px solid rgba(212, 175, 55, 0.2);
	border-radius: 8px;
	transition: all 0.25s ease;
}

.m4-house-card input[type="radio"]:checked + .m4-house-inner {
	border-color: var(--house-color);
	background: linear-gradient(135deg, rgba(22, 16, 36, 0.95) 0%, rgba(30, 20, 48, 0.95) 100%);
	box-shadow: 0 0 16px rgba(212, 175, 55, 0.25), inset 0 0 10px rgba(212, 175, 55, 0.1);
}

.m4-house-crest {
	font-size: 1.4rem;
}

.m4-house-name {
	font-size: 0.98rem;
	color: #f1f5f9;
}

/* Family Lore Card */
.m4-family-card {
	background: linear-gradient(135deg, rgba(28, 20, 44, 0.85) 0%, rgba(18, 13, 28, 0.92) 100%);
	border: 1px solid rgba(212, 175, 55, 0.4);
	border-radius: 8px;
	padding: 16px 20px;
	margin-top: 14px;
	box-shadow: 0 4px 18px rgba(0, 0, 0, 0.4);
	animation: m4-fade-in 0.3s ease;
}

.m4-family-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	flex-wrap: wrap;
	gap: 10px;
	margin-bottom: 10px;
	border-bottom: 1px solid rgba(212, 175, 55, 0.2);
	padding-bottom: 8px;
}

.m4-fam-name {
	margin: 0;
	font-size: 1.18rem;
	color: #fce7a1;
	font-weight: 700;
}

.m4-fam-motto {
	font-size: 0.88rem;
	font-style: italic;
	color: #d4af37;
	margin-top: 2px;
}

.m4-quota-badge {
	font-size: 0.78rem;
	background: rgba(34, 197, 94, 0.2);
	color: #86efac;
	border: 1px solid rgba(134, 239, 172, 0.4);
	padding: 3px 10px;
	border-radius: 20px;
	font-weight: 600;
	transition: all 0.2s ease;
}

.m4-quota-badge.closed {
	background: rgba(239, 68, 68, 0.2);
	color: #fca5a5;
	border: 1px solid rgba(252, 165, 165, 0.4);
}

.m4-fam-desc {
	font-size: 0.9rem;
	color: #ded6c9;
	line-height: 1.55;
	margin: 0 0 12px 0;
}

.m4-fam-bonuses {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
	font-size: 0.86rem;
}

.m4-fam-bonus-title {
	color: #a49a88;
	font-weight: 600;
}

.m4-bonus-pill {
	padding: 2px 9px;
	border-radius: 12px;
	font-weight: 600;
	font-size: 0.8rem;
}

.m4-bonus-pill.primary {
	background: rgba(212, 175, 55, 0.22);
	color: #fce7a1;
	border: 1px solid rgba(212, 175, 55, 0.45);
}

.m4-bonus-pill.secondary {
	background: rgba(147, 197, 253, 0.2);
	color: #bfdbfe;
	border: 1px solid rgba(147, 197, 253, 0.4);
}

/* Stat Pool & Steppers */
.m4-stat-pool-banner {
	display: flex;
	justify-content: space-between;
	align-items: center;
	background: rgba(15, 11, 24, 0.85);
	border: 1px solid rgba(212, 175, 55, 0.3);
	padding: 12px 18px;
	border-radius: 8px;
	margin-bottom: 14px;
}

.m4-rem-badge {
	padding: 4px 12px;
	border-radius: 20px;
	font-weight: 700;
	font-size: 0.88rem;
}

.m4-rem-badge.ok {
	background: rgba(34, 197, 94, 0.22);
	color: #86efac;
	border: 1px solid rgba(134, 239, 172, 0.4);
}

.m4-rem-badge.pending {
	background: rgba(234, 179, 8, 0.22);
	color: #fde047;
	border: 1px solid rgba(253, 224, 71, 0.4);
}

.m4-rem-badge.error {
	background: rgba(239, 68, 68, 0.22);
	color: #fca5a5;
	border: 1px solid rgba(252, 165, 165, 0.4);
}

.m4-stat-box {
	background: rgba(14, 10, 22, 0.75);
	border: 1px solid rgba(212, 175, 55, 0.2);
	border-top: 3px solid var(--stat-accent, #d4af37);
	border-radius: 8px;
	padding: 14px;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
}

.m4-stat-label {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 4px;
}

.m4-stat-label strong {
	color: #f1f5f9;
	font-size: 1rem;
}

.m4-tag-bonus {
	font-size: 0.7rem;
	background: rgba(212, 175, 55, 0.25);
	color: #fce7a1;
	border: 1px solid rgba(212, 175, 55, 0.4);
	padding: 1px 6px;
	border-radius: 10px;
	font-weight: 600;
}

.m4-stat-desc {
	font-size: 0.78rem;
	color: #94a3b8;
	line-height: 1.4;
	margin-bottom: 12px;
	min-height: 32px;
}

.m4-counter {
	display: flex;
	align-items: center;
	gap: 6px;
}

.m4-btn-c {
	width: 34px;
	height: 34px;
	background: rgba(30, 22, 48, 0.85);
	border: 1px solid rgba(212, 175, 55, 0.35);
	color: #fce7a1;
	font-weight: 700;
	font-size: 1.1rem;
	border-radius: 6px;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: all 0.2s ease;
}

.m4-btn-c:hover {
	background: rgba(212, 175, 55, 0.3);
	border-color: rgba(212, 175, 55, 0.7);
}

.m4-stat-input {
	flex: 1;
	text-align: center;
	font-size: 1.1rem;
	font-weight: 700;
	color: #f1f5f9;
	background: rgba(10, 7, 16, 0.8);
	border: 1px solid rgba(212, 175, 55, 0.25);
	border-radius: 6px;
	padding: 6px 4px;
}

.m4-warning-box {
	background: rgba(239, 68, 68, 0.15);
	border: 1px solid rgba(248, 113, 113, 0.4);
	color: #fca5a5;
	padding: 10px 14px;
	border-radius: 6px;
	font-size: 0.88rem;
	margin-top: 10px;
}

/* Alerts & Cards */
.m4-alert {
	display: flex;
	gap: 14px;
	padding: 16px 20px;
	border-radius: 8px;
	margin-bottom: 22px;
}

.m4-alert-icon {
	font-size: 1.6rem;
	line-height: 1;
}

.m4-alert-content h4 {
	margin: 0 0 6px 0;
	font-size: 1.05rem;
}

.m4-alert-content p, .m4-alert-content ul {
	margin: 0;
	font-size: 0.9rem;
	line-height: 1.5;
}

.m4-alert-content ul {
	padding-left: 20px;
}

.m4-alert-success {
	background: rgba(34, 197, 94, 0.16);
	border: 1px solid rgba(134, 239, 172, 0.4);
	color: #dcfce7;
}

.m4-alert-error {
	background: rgba(239, 68, 68, 0.16);
	border: 1px solid rgba(248, 113, 113, 0.4);
	color: #fee2e2;
}

.m4-alert-revision {
	background: rgba(234, 179, 8, 0.16);
	border: 1px solid rgba(253, 224, 71, 0.4);
	color: #fef08a;
}

.m4-status-card {
	padding: 24px 28px;
	border-radius: 10px;
	margin-bottom: 24px;
}

.m4-status-open {
	background: linear-gradient(135deg, rgba(28, 22, 44, 0.9) 0%, rgba(18, 14, 28, 0.95) 100%);
	border: 1px solid rgba(212, 175, 55, 0.35);
	color: #e2d9cc;
}

.m4-status-approved {
	background: linear-gradient(135deg, rgba(16, 36, 26, 0.9) 0%, rgba(10, 24, 18, 0.95) 100%);
	border: 1px solid rgba(74, 222, 128, 0.4);
	color: #dcfce7;
}

.m4-status-header {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 12px;
}

.m4-status-header h3 {
	margin: 0;
	font-size: 1.3rem;
	color: #fce7a1;
}

.m4-status-badge {
	font-size: 0.8rem;
	padding: 3px 10px;
	border-radius: 14px;
	font-weight: 600;
	background: rgba(212, 175, 55, 0.2);
	color: #fce7a1;
	border: 1px solid rgba(212, 175, 55, 0.4);
}

.m4-status-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 12px;
	margin-top: 14px;
	padding-top: 12px;
	border-top: 1px solid rgba(212, 175, 55, 0.2);
	font-size: 0.88rem;
}

/* Submit Bar */
.m4-submit-bar {
	text-align: center;
	margin-top: 28px;
}

.m4-btn-submit {
	padding: 14px 36px;
	font-size: 1.08rem;
	font-weight: 700;
	letter-spacing: 0.4px;
	background: linear-gradient(135deg, #2d1f42 0%, #171026 100%);
	border: 1px solid rgba(212, 175, 55, 0.55);
	color: #fce7a1;
	border-radius: 8px;
	cursor: pointer;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5), inset 0 0 12px rgba(212, 175, 55, 0.15);
	transition: all 0.25s ease;
}

.m4-btn-submit:hover {
	border-color: rgba(212, 175, 55, 0.9);
	box-shadow: 0 6px 26px rgba(0, 0, 0, 0.7), 0 0 16px rgba(212, 175, 55, 0.35);
	transform: translateY(-2px);
}

@keyframes m4-fade-in {
	from { opacity: 0; transform: translateY(-4px); }
	to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   Student Year Selection Pills & Guidance
   ========================================================================== */
.m4-year-pills {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 6px;
}

.m4-year-pill {
	position: relative;
	display: inline-flex;
	align-items: center;
	padding: 8px 16px;
	background: rgba(18, 14, 28, 0.85);
	border: 1px solid rgba(212, 175, 55, 0.3);
	border-radius: 20px;
	cursor: pointer;
	color: #e2d9cc;
	font-size: 0.9rem;
	font-weight: 500;
	transition: all 0.2s ease;
	user-select: none;
}

.m4-year-pill input[type="radio"] {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}

.m4-year-pill:hover:not(.disabled-year) {
	border-color: rgba(212, 175, 55, 0.7);
	background: rgba(45, 31, 66, 0.6);
	color: #fce7a1;
	transform: translateY(-1px);
}

.m4-year-pill.is-selected {
	background: linear-gradient(135deg, rgba(212, 175, 55, 0.25) 0%, rgba(138, 92, 246, 0.25) 100%);
	border-color: #d4af37;
	color: #fef08a;
	box-shadow: 0 0 12px rgba(212, 175, 55, 0.35);
	font-weight: 700;
}

.m4-year-pill.disabled-year {
	opacity: 0.45;
	cursor: not-allowed;
	border-color: rgba(255, 255, 255, 0.1);
	background: rgba(10, 8, 16, 0.6);
	color: #78716c;
}

.m4-year-pill.disabled-year small {
	font-size: 0.75rem;
	margin-left: 4px;
	color: #a8a29e;
}

.m4-age-guidance-note {
	margin-top: 8px;
	font-size: 0.85rem;
	color: #fce7a1;
	background: rgba(212, 175, 55, 0.1);
	border: 1px solid rgba(212, 175, 55, 0.25);
	padding: 6px 14px;
	border-radius: 6px;
	display: inline-block;
}

/* ==========================================================================
   Ability Preset Buttons
   ========================================================================== */
.m4-preset-bar {
	margin: 14px 0 16px 0;
	padding: 12px 16px;
	background: rgba(15, 11, 23, 0.7);
	border: 1px solid rgba(212, 175, 55, 0.25);
	border-radius: 8px;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.m4-preset-title {
	font-size: 0.84rem;
	font-weight: 600;
	color: #fce7a1;
	letter-spacing: 0.4px;
}

.m4-preset-buttons {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.m4-preset-btn {
	padding: 6px 14px;
	font-size: 0.85rem;
	font-weight: 600;
	background: linear-gradient(135deg, rgba(38, 28, 54, 0.9) 0%, rgba(22, 16, 34, 0.9) 100%);
	border: 1px solid rgba(212, 175, 55, 0.35);
	color: #e2d9cc;
	border-radius: 6px;
	cursor: pointer;
	transition: all 0.2s ease;
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.m4-preset-btn:hover {
	border-color: rgba(212, 175, 55, 0.8);
	background: linear-gradient(135deg, rgba(58, 42, 82, 0.95) 0%, rgba(32, 22, 50, 0.95) 100%);
	color: #fef08a;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4), 0 0 8px rgba(212, 175, 55, 0.25);
	transform: translateY(-1px);
}

.m4-preset-btn:active {
	transform: translateY(0);
}

/* ==========================================================================
   Rich Family Lore Card Details
   ========================================================================== */
.m4-fam-symbol-box {
	margin-top: 10px;
	padding: 8px 14px;
	background: rgba(212, 175, 55, 0.08);
	border-left: 3px solid #d4af37;
	border-radius: 0 6px 6px 0;
	font-size: 0.88rem;
	color: #e2d9cc;
	line-height: 1.5;
}

.m4-fam-npcs-box {
	margin-top: 14px;
	padding: 10px 14px;
	background: rgba(10, 7, 16, 0.5);
	border: 1px solid rgba(212, 175, 55, 0.18);
	border-radius: 6px;
	font-size: 0.86rem;
}

.m4-fam-npcs-box strong {
	color: #fce7a1;
	display: block;
	margin-bottom: 6px;
}

.m4-fam-npcs-list {
	margin: 0;
	padding-left: 18px;
	color: #c9bfb0;
	line-height: 1.6;
}

.m4-fam-npcs-list li {
	margin-bottom: 2px;
}

.m4-stat-pill.valid {
	border-color: rgba(74, 222, 128, 0.6);
	color: #86efac;
}

.m4-stat-pill.invalid {
	border-color: rgba(239, 68, 68, 0.6);
	color: #fca5a5;
}

/* ==========================================================================
   4-Colored Dynamic Ability Ratio Bar & Stat Breakdown
   ========================================================================== */
.m4-ratio-bar-wrap {
	margin: 16px 0 20px 0;
	background: linear-gradient(180deg, rgba(18, 12, 28, 0.92) 0%, rgba(10, 7, 16, 0.96) 100%);
	border: 1px solid rgba(212, 175, 55, 0.35);
	border-radius: 12px;
	padding: 14px 18px;
	box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.7), 0 4px 18px rgba(0, 0, 0, 0.45);
}

.m4-ratio-bar-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 12px;
	font-size: 0.85rem;
	color: #a49a88;
}

.m4-ratio-bar-title {
	font-weight: 600;
	color: #fce7a1;
	letter-spacing: 0.3px;
	display: flex;
	align-items: center;
	gap: 6px;
}

.m4-ratio-total-badge {
	font-weight: 700;
	color: #fef08a;
	background: rgba(212, 175, 55, 0.15);
	border: 1px solid rgba(212, 175, 55, 0.38);
	padding: 3px 12px;
	border-radius: 12px;
	font-size: 0.82rem;
	box-shadow: 0 0 10px rgba(212, 175, 55, 0.18);
}

/* Glassy Crystalline Bar with Elegant Thin Brass Frame (Dark Academia Glassmorphism) */
.m4-ratio-bar-wrap {
	margin: 16px 0 20px 0;
	background: rgba(14, 10, 22, 0.65);
	border: 1px solid rgba(212, 175, 55, 0.28);
	border-radius: 12px;
	padding: 14px 18px;
	box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.6), 0 4px 18px rgba(0, 0, 0, 0.4);
	backdrop-filter: blur(12px);
}

.m4-ratio-bar-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 12px;
	font-size: 0.85rem;
	color: #a49a88;
}

.m4-ratio-bar-title {
	font-weight: 600;
	color: #fce7a1;
	letter-spacing: 0.3px;
	display: flex;
	align-items: center;
	gap: 6px;
}

.m4-ratio-total-badge {
	font-weight: 700;
	color: #fef08a;
	background: rgba(212, 175, 55, 0.15);
	border: 1px solid rgba(212, 175, 55, 0.38);
	padding: 3px 12px;
	border-radius: 12px;
	font-size: 0.82rem;
	box-shadow: 0 0 10px rgba(212, 175, 55, 0.18);
}

.m4-ratio-bar {
	display: flex;
	width: 100%;
	height: 36px;
	border-radius: 9px;
	overflow: hidden;
	position: relative;
	background: rgba(8, 5, 14, 0.75);
	border: 1px solid rgba(212, 175, 55, 0.45); /* Antique brass frame */
	box-shadow: 
		0 0 0 1px rgba(0, 0, 0, 0.8),
		0 2px 10px rgba(0, 0, 0, 0.6),
		0 0 12px rgba(212, 175, 55, 0.12),
		inset 0 2px 8px rgba(0, 0, 0, 0.7);
	backdrop-filter: blur(16px);
}

/* Glass Specular Reflection Highlight (Delicate Frosted Glass Curvature) */
.m4-ratio-bar::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 42%;
	background: linear-gradient(180deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0.04) 60%, rgba(255, 255, 255, 0) 100%);
	border-radius: 8px 8px 0 0;
	pointer-events: none;
	z-index: 10;
}

/* Glass Ambient Rim Reflection */
.m4-ratio-bar::after {
	content: "";
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	height: 20%;
	background: linear-gradient(0deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0) 100%);
	pointer-events: none;
	z-index: 10;
}

.m4-bar-segment {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 100%;
	color: #f1ede4;
	font-size: 0.78rem;
	font-weight: 600;
	letter-spacing: 0.3px;
	text-shadow: 0 1px 4px rgba(0, 0, 0, 0.95);
	transition: width 0.35s cubic-bezier(0.4, 0, 0.2, 1);
	overflow: hidden;
	white-space: nowrap;
	position: relative;
	user-select: none;
}

/* Delicate Antique Brass Hairline Dividers */
.m4-bar-segment:not(:last-child) {
	border-right: 1px solid rgba(212, 175, 55, 0.4);
	box-shadow: 1px 0 2px rgba(0, 0, 0, 0.5);
}

/* 🪄 Mystic Sapphire Glass (Tılsım) - Moody Slate Cobalt */
.m4-bar-segment.seg-tilsim {
	background: linear-gradient(180deg, rgba(37, 99, 235, 0.48) 0%, rgba(30, 58, 138, 0.68) 100%);
	box-shadow: inset 0 0 10px rgba(59, 130, 246, 0.25);
}

/* ⚔️ Crimson Velvet Glass (Lanet) - Deep Burgundy / Wine */
.m4-bar-segment.seg-lanet {
	background: linear-gradient(180deg, rgba(185, 28, 28, 0.48) 0%, rgba(127, 29, 29, 0.68) 100%);
	box-shadow: inset 0 0 10px rgba(239, 68, 68, 0.25);
}

/* 🦅 Ancient Emerald Glass (Biçim Değiştirme) - Forest Moss */
.m4-bar-segment.seg-bicim {
	background: linear-gradient(180deg, rgba(21, 128, 61, 0.48) 0%, rgba(20, 83, 45, 0.68) 100%);
	box-shadow: inset 0 0 10px rgba(34, 197, 94, 0.25);
}

/* 🧪 Obsidian Amethyst Glass (İksir) - Smoky Violet Plum */
.m4-bar-segment.seg-iksir {
	background: linear-gradient(180deg, rgba(126, 34, 206, 0.48) 0%, rgba(88, 28, 135, 0.68) 100%);
	box-shadow: inset 0 0 10px rgba(168, 85, 247, 0.25);
}

.m4-bar-segment span {
	padding: 0 6px;
	pointer-events: none;
	display: inline-flex;
	align-items: center;
	gap: 4px;
	z-index: 12;
}

/* Stat Card Breakdown - Clear 3-Column Compartments with Math Formula */
.m4-stat-breakdown {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-top: 12px;
	padding: 8px 10px;
	background: rgba(10, 7, 18, 0.65);
	border: 1px solid rgba(212, 175, 55, 0.2);
	border-radius: 8px;
	box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.5);
	gap: 4px;
}

.m4-breakdown-col {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	flex: 1;
	min-width: 0;
	text-align: center;
}

.m4-col-title {
	font-size: 0.68rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.6px;
	color: #8c8273;
	margin-bottom: 2px;
	white-space: nowrap;
}

.m4-col-num {
	font-size: 0.95rem;
	font-weight: 700;
	color: #e2e8f0;
	line-height: 1.2;
}

.m4-col-bonus {
	font-size: 0.85rem;
	font-weight: 700;
	padding: 1px 7px;
	border-radius: 4px;
	white-space: nowrap;
	display: inline-block;
	line-height: 1.3;
	transition: all 0.2s ease;
}

.m4-col-bonus.has-bonus {
	color: #fef08a;
	background: rgba(212, 175, 55, 0.22);
	border: 1px solid rgba(212, 175, 55, 0.45);
	box-shadow: 0 0 6px rgba(212, 175, 55, 0.25);
}

.m4-col-bonus.is-zero {
	color: #64748b;
	background: transparent;
	border: 1px dashed rgba(148, 163, 184, 0.25);
	font-weight: 500;
}

.m4-col-num.total {
	font-size: 1.05rem;
	font-weight: 800;
	color: #fef08a;
	text-shadow: 0 0 8px rgba(254, 240, 138, 0.35);
}

.m4-breakdown-sym {
	font-size: 0.8rem;
	font-weight: 700;
	color: rgba(212, 175, 55, 0.5);
	user-select: none;
	flex-shrink: 0;
}

/* ==========================================================================
   GM Character Approval Hub & Accordion Drawer (Item 7 & 8)
   ========================================================================== */

.m4-admin-hub-container {
	margin: 15px auto;
	font-family: inherit;
	color: #e2d9cc;
}

.m4-admin-hub-header {
	background: linear-gradient(135deg, rgba(24, 18, 38, 0.96) 0%, rgba(14, 10, 24, 0.98) 100%);
	border: 1px solid rgba(212, 175, 55, 0.35);
	border-radius: 12px;
	padding: 24px;
	margin-bottom: 24px;
	box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5), inset 0 1px 1px rgba(255, 255, 255, 0.08);
}

.m4-hub-title-row {
	display: flex;
	align-items: center;
	gap: 16px;
	margin-bottom: 18px;
}

.m4-hub-icon {
	font-size: 2.2rem;
	background: rgba(212, 175, 55, 0.12);
	border: 1px solid rgba(212, 175, 55, 0.35);
	width: 58px;
	height: 58px;
	border-radius: 12px;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
	flex-shrink: 0;
}

.m4-hub-title {
	margin: 0 0 6px 0;
	font-size: 1.55rem;
	font-weight: 700;
	color: #fce7a1;
	letter-spacing: 0.5px;
	text-shadow: 0 0 10px rgba(212, 175, 55, 0.35);
}

.m4-hub-subtitle {
	margin: 0;
	font-size: 0.88rem;
	color: #a49a88;
	line-height: 1.5;
}

/* Flash alerts */
.m4-alert {
	padding: 12px 18px;
	border-radius: 8px;
	margin-bottom: 16px;
	font-size: 0.92rem;
	font-weight: 500;
	display: flex;
	align-items: center;
	gap: 10px;
}

.m4-alert-success {
	background: rgba(20, 83, 45, 0.45);
	border: 1px solid rgba(34, 197, 94, 0.5);
	color: #86efac;
}

.m4-alert-warning {
	background: rgba(120, 53, 15, 0.45);
	border: 1px solid rgba(245, 158, 11, 0.5);
	color: #fde68a;
}

.m4-alert-danger {
	background: rgba(127, 29, 29, 0.45);
	border: 1px solid rgba(239, 68, 68, 0.5);
	color: #fca5a5;
}

.m4-alert-icon {
	font-weight: 800;
	font-size: 1.1rem;
}

/* Tabs Bar */
.m4-admin-tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	border-top: 1px solid rgba(212, 175, 55, 0.2);
	padding-top: 16px;
}

.m4-tab-item {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 9px 18px;
	border-radius: 8px;
	background: rgba(30, 24, 46, 0.7);
	border: 1px solid rgba(212, 175, 55, 0.22);
	color: #c5bba8;
	font-size: 0.88rem;
	font-weight: 600;
	text-decoration: none !important;
	transition: all 0.2s ease;
}

.m4-tab-item:hover {
	background: rgba(45, 34, 68, 0.85);
	border-color: rgba(212, 175, 55, 0.5);
	color: #fce7a1;
	transform: translateY(-1px);
}

.m4-tab-item.active {
	background: linear-gradient(135deg, rgba(62, 46, 92, 0.95) 0%, rgba(35, 25, 54, 0.98) 100%);
	border-color: #d4af37;
	color: #fef08a;
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.45), inset 0 0 8px rgba(212, 175, 55, 0.25);
}

.m4-tab-badge {
	font-size: 0.76rem;
	font-weight: 700;
	padding: 2px 7px;
	border-radius: 12px;
	line-height: 1.2;
}

.badge-gold {
	background: #d4af37;
	color: #120e1c;
	box-shadow: 0 0 8px rgba(212, 175, 55, 0.5);
}

.badge-amber {
	background: rgba(245, 158, 11, 0.3);
	color: #fde68a;
	border: 1px solid rgba(245, 158, 11, 0.6);
}

.badge-green {
	background: rgba(34, 197, 94, 0.25);
	color: #86efac;
	border: 1px solid rgba(34, 197, 94, 0.5);
}

.badge-red {
	background: rgba(239, 68, 68, 0.25);
	color: #fca5a5;
	border: 1px solid rgba(239, 68, 68, 0.5);
}

.badge-muted {
	background: rgba(148, 163, 184, 0.15);
	color: #94a3b8;
}

/* Empty State */
.m4-empty-state {
	text-align: center;
	padding: 60px 20px;
	background: rgba(20, 15, 30, 0.85);
	border: 1px dashed rgba(212, 175, 55, 0.3);
	border-radius: 12px;
}

.m4-empty-icon {
	font-size: 3rem;
	margin-bottom: 12px;
	opacity: 0.7;
}

.m4-empty-state h3 {
	margin: 0 0 8px 0;
	color: #fce7a1;
	font-size: 1.2rem;
}

.m4-empty-state p {
	margin: 0;
	color: #94a3b8;
	font-size: 0.9rem;
}

/* Queue List & App Cards */
.m4-queue-list {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.m4-app-card {
	background: rgba(20, 15, 32, 0.94);
	border: 1px solid rgba(212, 175, 55, 0.3);
	border-radius: 10px;
	overflow: hidden;
	box-shadow: 0 4px 18px rgba(0, 0, 0, 0.4);
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.m4-app-card:hover {
	border-color: rgba(212, 175, 55, 0.55);
	box-shadow: 0 6px 24px rgba(0, 0, 0, 0.55);
}

/* Summary Bar Row */
.m4-app-summary-bar {
	display: grid;
	grid-template-columns: 190px 1.4fr 1.2fr 160px 140px 120px;
	align-items: center;
	gap: 14px;
	padding: 14px 20px;
	cursor: pointer;
	user-select: none;
	background: linear-gradient(90deg, rgba(28, 22, 44, 0.7) 0%, rgba(18, 14, 28, 0.8) 100%);
	border-bottom: 1px solid transparent;
	transition: background 0.2s ease;
}

.m4-app-summary-bar:hover {
	background: linear-gradient(90deg, rgba(38, 30, 58, 0.85) 0%, rgba(24, 18, 38, 0.95) 100%);
}

.m4-app-col-user {
	display: flex;
	align-items: center;
	gap: 10px;
}

.m4-avatar-circle {
	width: 38px;
	height: 38px;
	border-radius: 50%;
	background: linear-gradient(135deg, #382856 0%, #1e1432 100%);
	border: 1px solid rgba(212, 175, 55, 0.45);
	color: #fef08a;
	font-weight: 700;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 0.95rem;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
	flex-shrink: 0;
}

.m4-user-info {
	overflow: hidden;
}

.m4-username-link {
	display: block;
	color: #e2e8f0;
	font-weight: 600;
	font-size: 0.9rem;
	text-decoration: none;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.m4-username-link:hover {
	color: #fce7a1;
	text-decoration: underline;
}

.m4-user-sub {
	font-size: 0.75rem;
	color: #8b8072;
}

.m4-app-col-char {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.m4-char-name {
	color: #fce7a1;
	font-size: 1.05rem;
	font-weight: 700;
}

.m4-role-badge {
	font-size: 0.78rem;
	font-weight: 600;
	display: inline-flex;
	align-items: center;
	gap: 4px;
	width: fit-content;
	padding: 2px 8px;
	border-radius: 12px;
}

.badge-student {
	background: rgba(59, 130, 246, 0.2);
	color: #93c5fd;
	border: 1px solid rgba(59, 130, 246, 0.4);
}

.badge-adult {
	background: rgba(168, 85, 247, 0.2);
	color: #d8b4fe;
	border: 1px solid rgba(168, 85, 247, 0.4);
}

.m4-app-col-family {
	display: flex;
	align-items: center;
	gap: 6px;
	flex-wrap: wrap;
}

.m4-family-pill {
	font-size: 0.84rem;
	font-weight: 600;
	color: #e2d9cc;
	background: rgba(212, 175, 55, 0.12);
	border: 1px solid rgba(212, 175, 55, 0.3);
	padding: 3px 10px;
	border-radius: 6px;
}

.m4-family-none {
	color: #64748b;
}

.m4-subrole-tag {
	font-size: 0.74rem;
	font-weight: 700;
	color: #a7f3d0;
	background: rgba(16, 185, 129, 0.2);
	border: 1px solid rgba(16, 185, 129, 0.4);
	padding: 2px 7px;
	border-radius: 10px;
}

.m4-app-col-date {
	display: flex;
	flex-direction: column;
	font-size: 0.82rem;
}

.m4-date-main {
	color: #cbd5e1;
	white-space: nowrap;
}

.m4-date-ago {
	color: #80766a;
	font-size: 0.74rem;
}

.m4-status-badge {
	display: inline-block;
	font-size: 0.8rem;
	font-weight: 700;
	padding: 4px 10px;
	border-radius: 20px;
	text-align: center;
	white-space: nowrap;
}

.status-open {
	background: rgba(212, 175, 55, 0.2);
	color: #fef08a;
	border: 1px solid rgba(212, 175, 55, 0.5);
	box-shadow: 0 0 10px rgba(212, 175, 55, 0.25);
}

.status-awaiting_revision,
.status-awaiting-revision {
	background: rgba(245, 158, 11, 0.22);
	color: #fde68a;
	border: 1px solid rgba(245, 158, 11, 0.5);
}

.status-revision-submitted {
	background: rgba(16, 185, 129, 0.25);
	color: #a7f3d0;
	border: 1px solid rgba(16, 185, 129, 0.6);
	box-shadow: 0 0 10px rgba(16, 185, 129, 0.35);
}

.m4-chip-btn {
	background: rgba(212, 175, 55, 0.12);
	border: 1px solid rgba(212, 175, 55, 0.35);
	color: #f6e3a1;
	font-size: 0.76rem;
	font-weight: 600;
	padding: 3px 9px;
	border-radius: 12px;
	cursor: pointer;
	transition: all 0.2s ease;
}

.m4-chip-btn:hover {
	background: rgba(212, 175, 55, 0.25);
	border-color: #d4af37;
	color: #ffffff;
}

.status-approved {
	background: rgba(34, 197, 94, 0.2);
	color: #86efac;
	border: 1px solid rgba(34, 197, 94, 0.5);
}

.status-declined {
	background: rgba(239, 68, 68, 0.2);
	color: #fca5a5;
	border: 1px solid rgba(239, 68, 68, 0.5);
}

.status-timed_out {
	background: rgba(100, 116, 139, 0.2);
	color: #94a3b8;
	border: 1px solid rgba(100, 116, 139, 0.4);
}

.m4-btn-drawer-toggle {
	background: rgba(212, 175, 55, 0.12);
	border: 1px solid rgba(212, 175, 55, 0.4);
	color: #fce7a1;
	border-radius: 6px;
	padding: 6px 12px;
	font-size: 0.82rem;
	font-weight: 600;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	cursor: pointer;
	transition: all 0.2s ease;
}

.m4-btn-drawer-toggle:hover {
	background: rgba(212, 175, 55, 0.25);
	border-color: #d4af37;
	color: #fff;
}

.m4-toggle-arrow {
	transition: transform 0.2s ease;
	font-size: 0.72rem;
}

.m4-btn-drawer-toggle.open .m4-toggle-arrow {
	transform: rotate(180deg);
}

/* Expandable Drawer */
.m4-app-drawer {
	border-top: 1px solid rgba(212, 175, 55, 0.25);
	background: rgba(14, 10, 22, 0.98);
	padding: 20px 24px 28px 24px;
	animation: m4-drawer-slide 0.25s ease-out;
}

@keyframes m4-drawer-slide {
	from {
		opacity: 0;
		transform: translateY(-8px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.m4-drawer-topbar {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 16px;
	padding-bottom: 16px;
	margin-bottom: 20px;
	border-bottom: 1px solid rgba(212, 175, 55, 0.18);
	flex-wrap: wrap;
}

.m4-btn-view-topic {
	background: linear-gradient(135deg, rgba(62, 46, 92, 0.9) 0%, rgba(30, 20, 48, 0.9) 100%);
	border: 1px solid rgba(212, 175, 55, 0.5);
	color: #fef08a;
	padding: 7px 16px;
	border-radius: 6px;
	font-size: 0.86rem;
	font-weight: 700;
	text-decoration: none !important;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
	transition: all 0.2s ease;
}

.m4-btn-view-topic:hover {
	border-color: #d4af37;
	color: #fff;
	box-shadow: 0 4px 16px rgba(212, 175, 55, 0.3);
	transform: translateY(-1px);
}

.m4-btn-no-topic {
	background: rgba(30, 24, 46, 0.5);
	border: 1px dashed rgba(148, 163, 184, 0.3);
	color: #94a3b8;
	padding: 7px 14px;
	border-radius: 6px;
	font-size: 0.84rem;
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.m4-tl-chip {
	font-size: 0.82rem;
	color: #e2d9cc;
	background: rgba(30, 24, 46, 0.8);
	border: 1px solid rgba(212, 175, 55, 0.25);
	padding: 5px 12px;
	border-radius: 20px;
}

/* 2-Column Grid inside Drawer */
.m4-drawer-grid {
	display: grid;
	grid-template-columns: 1.15fr 1fr;
	gap: 28px;
}

.m4-panel-title {
	margin: 0 0 16px 0;
	font-size: 1.12rem;
	color: #fce7a1;
	font-weight: 700;
	display: flex;
	align-items: center;
	gap: 8px;
	border-bottom: 1px solid rgba(212, 175, 55, 0.2);
	padding-bottom: 8px;
}

.m4-dossier-section {
	margin-bottom: 18px;
}

.m4-sec-heading {
	margin: 0 0 8px 0;
	font-size: 0.88rem;
	color: #d4af37;
	text-transform: uppercase;
	letter-spacing: 0.8px;
	font-weight: 600;
}

/* 4 Stats Cards */
.m4-stats-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 8px;
	margin-bottom: 6px;
}

.m4-stat-card {
	background: rgba(24, 18, 38, 0.8);
	border: 1px solid rgba(212, 175, 55, 0.25);
	border-radius: 6px;
	padding: 10px 8px;
	text-align: center;
}

.m4-stat-card.stat-tilsim { border-top: 3px solid #60a5fa; }
.m4-stat-card.stat-lanet  { border-top: 3px solid #f87171; }
.m4-stat-card.stat-bicim  { border-top: 3px solid #fbbf24; }
.m4-stat-card.stat-iksir  { border-top: 3px solid #34d399; }

.m4-stat-name {
	display: block;
	font-size: 0.74rem;
	color: #a49a88;
	margin-bottom: 4px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.m4-stat-val {
	display: block;
	font-size: 1.35rem;
	font-weight: 800;
	color: #fef08a;
}

.m4-stat-total-row {
	display: flex;
	justify-content: flex-end;
	gap: 8px;
	font-size: 0.82rem;
	color: #a49a88;
}

.m4-stat-total-row strong {
	color: #fef08a;
}

/* Lore Table */
.m4-lore-table {
	background: rgba(22, 16, 36, 0.6);
	border: 1px solid rgba(212, 175, 55, 0.18);
	border-radius: 6px;
	overflow: hidden;
}

.m4-lore-row {
	display: grid;
	grid-template-columns: 140px 1fr;
	padding: 8px 12px;
	border-bottom: 1px solid rgba(212, 175, 55, 0.1);
	font-size: 0.86rem;
}

.m4-lore-row:last-child {
	border-bottom: none;
}

.m4-lore-key {
	color: #a49a88;
	font-weight: 500;
}

.m4-lore-val {
	color: #e2e8f0;
}

.m4-lore-row.highlight-corven {
	background: rgba(16, 185, 129, 0.08);
}

.m4-lore-row-full {
	padding: 10px 12px;
	border-bottom: 1px solid rgba(212, 175, 55, 0.1);
	font-size: 0.86rem;
}

.m4-lore-row-full.highlight-falkner {
	background: rgba(217, 119, 6, 0.08);
}

.m4-falkner-box {
	margin-top: 6px;
	padding: 8px 12px;
	background: rgba(30, 20, 10, 0.6);
	border-left: 3px solid #d97706;
	color: #fef3c7;
	border-radius: 4px;
	line-height: 1.4;
}

/* Text & History Scroll Boxes */
.m4-text-preview-box {
	background: rgba(22, 16, 36, 0.6);
	border: 1px solid rgba(212, 175, 55, 0.18);
	border-radius: 6px;
	padding: 12px 14px;
	font-size: 0.88rem;
	line-height: 1.5;
	color: #cbd5e1;
}

.m4-history-scroll-box {
	background: rgba(22, 16, 36, 0.6);
	border: 1px solid rgba(212, 175, 55, 0.18);
	border-radius: 6px;
	padding: 12px 14px;
	font-size: 0.88rem;
	line-height: 1.6;
	color: #cbd5e1;
	max-height: 220px;
	overflow-y: auto;
}

.m4-notes-box {
	padding: 10px 14px;
	border-radius: 6px;
	font-size: 0.86rem;
	line-height: 1.45;
}

.m4-notes-box.warning {
	background: rgba(120, 53, 15, 0.35);
	border: 1px solid rgba(245, 158, 11, 0.4);
	color: #fef3c7;
}

.m4-notes-box.muted {
	background: rgba(30, 41, 59, 0.5);
	border: 1px solid rgba(100, 116, 139, 0.4);
	color: #cbd5e1;
}

/* Right Column: GM Action Form */
.m4-gm-action-form {
	background: rgba(24, 18, 38, 0.85);
	border: 1px solid rgba(212, 175, 55, 0.35);
	border-radius: 8px;
	padding: 20px;
	box-shadow: 0 4px 18px rgba(0, 0, 0, 0.4);
}

.m4-form-group {
	margin-bottom: 14px;
}

.m4-label {
	display: block;
	font-size: 0.84rem;
	font-weight: 600;
	color: #e2d9cc;
	margin-bottom: 6px;
}

.m4-label-with-action {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 6px;
}

.m4-btn-mini-save {
	background: rgba(212, 175, 55, 0.15);
	border: 1px solid rgba(212, 175, 55, 0.4);
	color: #fce7a1;
	border-radius: 4px;
	padding: 3px 8px;
	font-size: 0.74rem;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.2s ease;
}

.m4-btn-mini-save:hover {
	background: rgba(212, 175, 55, 0.3);
	color: #fff;
}

.m4-input,
.m4-select {
	width: 100%;
	padding: 8px 12px;
	background: rgba(14, 10, 22, 0.9);
	border: 1px solid rgba(212, 175, 55, 0.3);
	border-radius: 6px;
	color: #f1f5f9;
	font-size: 0.88rem;
	font-family: inherit;
	box-sizing: border-box;
	transition: border-color 0.2s ease;
}

.m4-input:focus,
.m4-select:focus {
	outline: none;
	border-color: #d4af37;
	box-shadow: 0 0 8px rgba(212, 175, 55, 0.35);
}

.m4-checkbox-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 6px;
	max-height: 140px;
	overflow-y: auto;
	background: rgba(14, 10, 22, 0.7);
	padding: 8px 10px;
	border-radius: 6px;
	border: 1px solid rgba(212, 175, 55, 0.2);
}

.m4-chk-label {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 0.78rem;
	color: #cbd5e1;
	cursor: pointer;
}

.m4-quota-pill {
	font-size: 0.7rem;
	color: #a49a88;
	margin-left: 2px;
}

.m4-stat-inputs-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 8px;
}

.m4-mini-label {
	display: block;
	font-size: 0.72rem;
	color: #a49a88;
	margin-bottom: 2px;
	text-align: center;
}

.m4-input-num {
	width: 100%;
	padding: 6px;
	background: rgba(14, 10, 22, 0.9);
	border: 1px solid rgba(212, 175, 55, 0.3);
	border-radius: 6px;
	color: #fef08a;
	font-weight: 700;
	font-size: 0.95rem;
	text-align: center;
	font-family: inherit;
	box-sizing: border-box;
}

.m4-double-input {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 8px;
}

.m4-textarea,
.m4-textarea-compact {
	width: 100%;
	padding: 8px 12px;
	background: rgba(14, 10, 22, 0.9);
	border: 1px solid rgba(212, 175, 55, 0.3);
	border-radius: 6px;
	color: #f1f5f9;
	font-size: 0.86rem;
	font-family: inherit;
	box-sizing: border-box;
	resize: vertical;
}

.m4-textarea:focus,
.m4-textarea-compact:focus {
	outline: none;
	border-color: #d4af37;
	box-shadow: 0 0 8px rgba(212, 175, 55, 0.35);
}

/* 1-Click Action Buttons Bar */
.m4-action-buttons-bar {
	display: grid;
	grid-template-columns: 1.3fr 1fr 1fr;
	gap: 10px;
	margin-top: 18px;
	padding-top: 14px;
	border-top: 1px solid rgba(212, 175, 55, 0.2);
}

.m4-btn-action {
	padding: 10px 14px;
	border-radius: 6px;
	font-size: 0.88rem;
	font-weight: 700;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	text-align: center;
	transition: all 0.2s ease;
	font-family: inherit;
}

.btn-approve {
	background: linear-gradient(135deg, #14532d 0%, #052e16 100%);
	border: 1px solid rgba(34, 197, 94, 0.6);
	color: #86efac;
	box-shadow: 0 4px 14px rgba(34, 197, 94, 0.25);
}

.btn-approve:hover {
	background: linear-gradient(135deg, #15803d 0%, #14532d 100%);
	border-color: #22c55e;
	color: #fff;
	box-shadow: 0 6px 20px rgba(34, 197, 94, 0.45);
	transform: translateY(-1px);
}

.btn-revision {
	background: linear-gradient(135deg, #78350f 0%, #451a03 100%);
	border: 1px solid rgba(245, 158, 11, 0.6);
	color: #fde68a;
	box-shadow: 0 4px 14px rgba(245, 158, 11, 0.2);
}

.btn-revision:hover {
	background: linear-gradient(135deg, #92400e 0%, #78350f 100%);
	border-color: #f59e0b;
	color: #fff;
	box-shadow: 0 6px 20px rgba(245, 158, 11, 0.4);
	transform: translateY(-1px);
}

.btn-decline {
	background: linear-gradient(135deg, #7f1d1d 0%, #450a0a 100%);
	border: 1px solid rgba(239, 68, 68, 0.6);
	color: #fca5a5;
	box-shadow: 0 4px 14px rgba(239, 68, 68, 0.2);
}

.btn-decline:hover {
	background: linear-gradient(135deg, #991b1b 0%, #7f1d1d 100%);
	border-color: #ef4444;
	color: #fff;
	box-shadow: 0 6px 20px rgba(239, 68, 68, 0.4);
	transform: translateY(-1px);
}

/* Families Grid Template */
.m4-families-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
	gap: 20px;
}

.m4-family-card {
	background: linear-gradient(135deg, rgba(24, 18, 38, 0.94) 0%, rgba(14, 10, 24, 0.98) 100%);
	border: 1px solid rgba(212, 175, 55, 0.35);
	border-radius: 10px;
	padding: 20px;
	box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
}

.m4-family-card-header {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 16px;
	padding-bottom: 12px;
	border-bottom: 1px solid rgba(212, 175, 55, 0.2);
}

.m4-fam-crest-wrap {
	width: 44px;
	height: 44px;
	min-width: 44px;
	border-radius: 8px;
	background: rgba(212, 175, 55, 0.15);
	border: 1px solid rgba(212, 175, 55, 0.4);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 1.4rem;
	overflow: hidden;
}

.m4-fam-name {
	margin: 0 0 4px 0;
	font-size: 1.15rem;
	color: #fce7a1;
	font-weight: 700;
}

.m4-fam-stat-badge {
	font-size: 0.74rem;
	font-weight: 700;
	color: #86efac;
	background: rgba(34, 197, 94, 0.18);
	border: 1px solid rgba(34, 197, 94, 0.35);
	padding: 2px 7px;
	border-radius: 8px;
}

.m4-quota-stats-row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 12px;
	margin-bottom: 14px;
}

.m4-quota-box {
	background: rgba(14, 10, 22, 0.7);
	border: 1px solid rgba(212, 175, 55, 0.2);
	border-radius: 6px;
	padding: 8px 10px;
}

.m4-quota-label {
	display: block;
	font-size: 0.76rem;
	color: #a49a88;
	margin-bottom: 6px;
}

.m4-quota-inputs {
	display: flex;
	align-items: center;
	gap: 8px;
}

.m4-used-text {
	font-size: 0.8rem;
	color: #cbd5e1;
	white-space: nowrap;
}

.m4-used-text strong {
	color: #fef08a;
}

.m4-corven-quotas-block {
	background: rgba(16, 185, 129, 0.06);
	border: 1px solid rgba(16, 185, 129, 0.25);
	border-radius: 6px;
	padding: 10px;
	margin-bottom: 14px;
}

.m4-mini-heading {
	margin: 0 0 8px 0;
	font-size: 0.78rem;
	color: #a7f3d0;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.m4-corven-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 6px;
}

.btn-save-family {
	width: 100%;
	background: linear-gradient(135deg, rgba(62, 46, 92, 0.95) 0%, rgba(30, 20, 48, 0.95) 100%);
	border: 1px solid rgba(212, 175, 55, 0.5);
	color: #fef08a;
	padding: 9px 16px;
	font-size: 0.88rem;
	margin-top: 8px;
}

.btn-save-family:hover {
	border-color: #d4af37;
	color: #fff;
	box-shadow: 0 4px 16px rgba(212, 175, 55, 0.35);
}

/* Responsive adjustments */
@media (max-width: 992px) {
	.m4-app-summary-bar {
		grid-template-columns: 1fr 1fr;
		gap: 10px;
	}
	.m4-drawer-grid {
		grid-template-columns: 1fr;
	}
	.m4-action-buttons-bar {
		grid-template-columns: 1fr;
	}
}

/* [M45T3R5W4G3R] Character Access Barrier Styles BEGIN */
.m4-barrier-wrapper {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 55vh;
	padding: 40px 16px;
}

.m4-barrier-card {
	background: linear-gradient(145deg, rgba(18, 14, 28, 0.96) 0%, rgba(10, 8, 16, 0.98) 100%);
	border: 1px solid rgba(212, 175, 55, 0.45);
	border-radius: 14px;
	box-shadow: 0 20px 50px rgba(0, 0, 0, 0.65), 0 0 30px rgba(212, 175, 55, 0.12);
	max-width: 660px;
	width: 100%;
	padding: 44px 36px;
	text-align: center;
	position: relative;
	backdrop-filter: blur(16px);
}

.m4-barrier-card::before {
	content: '';
	position: absolute;
	top: 0;
	left: 15%;
	right: 15%;
	height: 1px;
	background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.8), transparent);
}

.m4-barrier-seal {
	width: 68px;
	height: 68px;
	margin: 0 auto 18px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	background: radial-gradient(circle, rgba(212, 175, 55, 0.22) 0%, rgba(18, 14, 28, 0.6) 80%);
	border: 2px solid rgba(212, 175, 55, 0.6);
	color: #f1dfa5;
	font-size: 1.8rem;
	box-shadow: 0 0 22px rgba(212, 175, 55, 0.25);
}

.m4-barrier-badge {
	display: inline-block;
	background: rgba(212, 175, 55, 0.12);
	border: 1px solid rgba(212, 175, 55, 0.35);
	color: #f5eedc;
	font-size: 0.76rem;
	text-transform: uppercase;
	letter-spacing: 1.2px;
	padding: 4px 16px;
	border-radius: 20px;
	margin-bottom: 12px;
}

.m4-barrier-title {
	font-family: 'Cinzel', 'Times New Roman', serif;
	font-size: 1.65rem;
	color: #f8fafc;
	margin: 0 0 6px;
	letter-spacing: 0.5px;
}

.m4-barrier-topic {
	color: #d4af37;
	font-size: 1.05rem;
	font-style: italic;
	margin-bottom: 16px;
}

.m4-barrier-divider {
	height: 1px;
	background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.45), transparent);
	margin: 18px auto 22px;
	max-width: 280px;
}

.m4-barrier-message {
	color: #cbd5e1;
	font-size: 1.02rem;
	line-height: 1.7;
	margin: 0 auto 28px;
	max-width: 520px;
}

.m4-barrier-status-box {
	background: rgba(25, 20, 36, 0.7);
	border: 1px solid rgba(212, 175, 55, 0.2);
	border-left: 3px solid #d4af37;
	padding: 18px 22px;
	border-radius: 8px;
	margin-bottom: 24px;
	text-align: left;
}

.m4-barrier-status-header {
	margin-bottom: 8px;
}

.m4-barrier-status-text {
	color: #e2e8f0;
	font-size: 0.93rem;
	line-height: 1.6;
	margin: 0;
}

.m4-barrier-actions {
	display: flex;
	gap: 12px;
	justify-content: center;
	flex-wrap: wrap;
}

.m4-barrier-home-link {
	color: #94a3b8;
	font-size: 0.88rem;
	text-decoration: none;
	transition: color 0.2s ease;
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.m4-barrier-home-link:hover {
	color: #d4af37;
}
/* [M45T3R5W4G3R] Character Access Barrier Styles END */

/* ==========================================================================
   [M45T3R5W4G3R] Hogwarts Acceptance Letter & Starter Bursary Styles BEGIN
   ========================================================================== */
.m4-letter-backdrop {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	background: radial-gradient(circle at center, rgba(16, 12, 26, 0.88) 0%, rgba(6, 4, 10, 0.96) 100%);
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
	padding: 20px;
	box-sizing: border-box;
	transition: opacity 0.5s ease;
	animation: m4FadeIn 0.4s ease-out;
}

.m4-letter-backdrop.is-closing {
	opacity: 0;
	pointer-events: none;
}

.m4-letter-container {
	position: relative;
	max-width: 660px;
	width: 100%;
	perspective: 1200px;
}

/* State 1: Wax-Sealed Parchment Envelope */
.m4-envelope-card {
	position: relative;
	background: linear-gradient(135deg, #eaddc0 0%, #d8caa7 50%, #c9b993 100%);
	border: 2px solid #b8a274;
	border-radius: 12px;
	box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.85), 0 0 35px rgba(212, 175, 55, 0.25);
	padding: 45px 35px 35px 35px;
	cursor: pointer;
	text-align: center;
	transition: transform 0.4s ease, box-shadow 0.4s ease;
	overflow: hidden;
	user-select: none;
}

.m4-envelope-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 30px 60px -12px rgba(0, 0, 0, 0.95), 0 0 45px rgba(212, 175, 55, 0.4);
}

.m4-envelope-card.is-opening {
	animation: m4EnvelopeOpen 0.6s forwards;
}

.m4-envelope-crest {
	font-size: 2rem;
	color: #8c734b;
	margin-bottom: 8px;
	opacity: 0.8;
}

.m4-envelope-address {
	display: flex;
	flex-direction: column;
	gap: 4px;
	color: #3d3121;
	font-family: 'Cinzel', serif;
}

.m4-env-line-to {
	font-size: 0.85rem;
	letter-spacing: 2px;
	text-transform: uppercase;
	color: #7a6341;
}

.m4-env-name {
	font-size: 1.55rem;
	color: #1f180f;
	font-weight: 700;
	margin: 4px 0;
	letter-spacing: 0.5px;
}

.m4-env-detail {
	font-size: 0.98rem;
	color: #4a3d2b;
}

.m4-env-house,
.m4-env-family {
	font-size: 0.92rem;
	color: #5a4b35;
	font-style: italic;
}

.m4-env-loc {
	font-size: 0.82rem;
	letter-spacing: 1.5px;
	text-transform: uppercase;
	color: #7a6341;
	margin-top: 10px;
}

.m4-wax-seal-wrapper {
	margin-top: 26px;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 10px;
}

.m4-wax-seal {
	width: 78px;
	height: 78px;
	border-radius: 50%;
	background: radial-gradient(circle at 35% 35%, #ad1d1d 0%, #7d1010 60%, #4a0707 100%);
	border: 3px solid #5a0909;
	box-shadow: 0 8px 20px rgba(0, 0, 0, 0.6), inset 0 2px 5px rgba(255, 255, 255, 0.3), 0 0 20px rgba(173, 29, 29, 0.4);
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	position: relative;
	transition: transform 0.25s ease, box-shadow 0.25s ease;
	outline: none;
}

.m4-wax-seal:hover {
	transform: scale(1.1);
	box-shadow: 0 10px 25px rgba(0, 0, 0, 0.8), inset 0 2px 5px rgba(255, 255, 255, 0.4), 0 0 30px rgba(212, 175, 55, 0.6);
}

.m4-wax-seal-inner {
	width: 58px;
	height: 58px;
	border-radius: 50%;
	border: 1.5px dashed rgba(212, 175, 55, 0.6);
	display: flex;
	align-items: center;
	justify-content: center;
}

.m4-wax-seal-monogram {
	font-family: 'Cinzel', serif;
	font-size: 1.85rem;
	font-weight: 800;
	color: #f5dfa3;
	text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.8);
}

.m4-wax-seal-tooltip {
	font-size: 0.82rem;
	color: #5a4931;
	font-weight: 600;
	letter-spacing: 0.5px;
	font-family: 'Cinzel', serif;
}

.m4-wax-sparkle {
	color: #992323;
	font-size: 0.9rem;
}

/* State 2: Unfolded Parchment Letter */
.m4-parchment-letter {
	background: linear-gradient(180deg, #fdfbf5 0%, #f6efe0 50%, #eee3cb 100%);
	border: 2px solid #b8a06e;
	border-radius: 12px;
	box-shadow: 0 30px 70px rgba(0, 0, 0, 0.9), 0 0 40px rgba(212, 175, 55, 0.25);
	padding: 38px 32px;
	color: #241c14;
	font-family: 'Cinzel', serif;
	line-height: 1.7;
	position: relative;
	max-height: 85vh;
	overflow-y: auto;
}

.m4-parchment-letter.is-unfolding {
	animation: m4ParchmentUnfold 0.65s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.m4-parchment-header {
	text-align: center;
	border-bottom: 1.5px double rgba(184, 160, 110, 0.6);
	padding-bottom: 18px;
	margin-bottom: 22px;
}

.m4-letter-crest-icon {
	font-size: 2.5rem;
	margin-bottom: 8px;
}

.m4-parchment-title {
	font-size: 1.35rem;
	color: #1a1209;
	font-weight: 700;
	letter-spacing: 1px;
	margin: 0 0 5px 0;
	font-family: 'Cinzel', serif;
}

.m4-parchment-subtitle {
	font-size: 0.88rem;
	color: #695639;
	font-style: italic;
	margin: 0;
}

.m4-parchment-divider {
	color: #b8a06e;
	font-size: 0.85rem;
	letter-spacing: 4px;
	margin-top: 10px;
}

.m4-parchment-body p {
	margin: 0 0 14px 0;
	font-family: 'Inter', sans-serif;
	font-size: 0.95rem;
	color: #2c2317;
	line-height: 1.75;
}

.m4-letter-salutation {
	font-family: 'Cinzel', serif !important;
	font-size: 1.15rem !important;
	font-weight: 700 !important;
	color: #160e07 !important;
	margin-bottom: 14px !important;
}

.m4-letter-bursary-note {
	background: rgba(212, 175, 55, 0.14);
	border-left: 3px solid #d4af37;
	padding: 12px 16px;
	border-radius: 4px;
	font-weight: 600;
	color: #3b2d12 !important;
	font-family: 'Inter', sans-serif !important;
}

.m4-parchment-signature {
	text-align: right;
	margin-top: 26px;
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 2px;
}

.m4-sig-closing {
	font-size: 0.92rem;
	font-style: italic;
	color: #57452d;
}

.m4-sig-name {
	font-size: 1.18rem;
	color: #140d06;
	font-family: 'Cinzel', serif;
}

.m4-sig-title {
	font-size: 0.82rem;
	color: #6b573a;
}

.m4-parchment-footer {
	margin-top: 28px;
	text-align: center;
	border-top: 1px solid rgba(184, 160, 110, 0.4);
	padding-top: 22px;
}

.m4-claim-galleons-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	width: 100%;
	max-width: 460px;
	padding: 14px 24px;
	background: linear-gradient(135deg, #10b981 0%, #059669 50%, #047857 100%);
	color: #ffffff;
	border: 1.5px solid #34d399;
	border-radius: 8px;
	font-family: 'Cinzel', serif;
	font-size: 1.02rem;
	font-weight: 700;
	cursor: pointer;
	box-shadow: 0 8px 25px rgba(16, 185, 129, 0.35);
	transition: all 0.25s ease;
	outline: none;
}

.m4-claim-galleons-btn:hover {
	transform: translateY(-2px);
	box-shadow: 0 12px 30px rgba(16, 185, 129, 0.5);
	filter: brightness(1.1);
}

.m4-claim-galleons-btn.success {
	background: linear-gradient(135deg, #059669 0%, #047857 100%);
	border-color: #6ee7b7;
	cursor: default;
	transform: none;
}

.m4-claim-feedback {
	margin-top: 10px;
	font-size: 0.88rem;
	color: #dc2626;
	font-weight: 600;
}

@keyframes m4FadeIn {
	0% { opacity: 0; }
	100% { opacity: 1; }
}

@keyframes m4EnvelopeOpen {
	0% { transform: scale(1); opacity: 1; }
	50% { transform: scale(1.05) rotateX(12deg); opacity: 0.8; }
	100% { transform: scale(0.92); opacity: 0; }
}

@keyframes m4ParchmentUnfold {
	0% { transform: translateY(40px) scale(0.92); opacity: 0; }
	100% { transform: translateY(0) scale(1); opacity: 1; }
}
/* [M45T3R5W4G3R] Hogwarts Acceptance Letter & Starter Bursary Styles END */

/* [M45T3R5W4G3R] Plot Timeline Post Tagging (In-Universe Date Badge) BEGIN */
.m4-timeline-tag {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin-left: 10px;
	padding: 2px 10px;
	background: linear-gradient(135deg, rgba(28, 20, 44, 0.88) 0%, rgba(16, 12, 26, 0.92) 100%);
	border: 1px solid rgba(212, 175, 55, 0.35);
	border-radius: 14px;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.08);
	color: #d8ceb9;
	font-size: 0.82rem;
	font-weight: 500;
	line-height: 1.4;
	vertical-align: middle;
	letter-spacing: 0.2px;
	transition: all 0.2s ease-in-out;
}

.m4-timeline-tag:hover {
	border-color: rgba(212, 175, 55, 0.65);
	background: linear-gradient(135deg, rgba(38, 28, 58, 0.95) 0%, rgba(22, 16, 36, 0.98) 100%);
	box-shadow: 0 3px 10px rgba(0, 0, 0, 0.5), 0 0 8px rgba(212, 175, 55, 0.2);
	color: #f5eedc;
}

.m4-timeline-tag i {
	color: #d4af37;
	font-size: 0.82rem;
	opacity: 0.9;
}

.m4-timeline-tag strong {
	color: #f7e2a9;
	font-weight: 600;
}
/* [M45T3R5W4G3R] Plot Timeline Post Tagging (In-Universe Date Badge) END */

/* [M45T3R5W4G3R] User RPG History BBCode Generator Styles BEGIN */
.m4-rpghistory-container {
	padding: 24px;
	border-radius: 8px;
	background: rgba(18, 14, 28, 0.95);
	border: 1px solid rgba(212, 175, 55, 0.35);
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.55);
	color: #e2d9cc;
	margin-top: 10px;
}

.m4-rpghistory-header {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: 20px;
	padding-bottom: 16px;
	border-bottom: 1px solid rgba(212, 175, 55, 0.2);
}

.m4-rpghistory-desc {
	margin: 0;
	color: #a49a88;
	font-size: 0.92rem;
	line-height: 1.5;
	max-width: 650px;
}

.m4-rpghistory-meta {
	display: flex;
	gap: 12px;
	flex-wrap: wrap;
}

.m4-rpghistory-badge {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 6px 14px;
	background: rgba(30, 24, 46, 0.8);
	border: 1px solid rgba(212, 175, 55, 0.3);
	border-radius: 20px;
	font-size: 0.86rem;
	color: #f1f5f9;
}

.m4-rpghistory-badge.char strong {
	color: #fce7a1;
}

.m4-rpghistory-badge.count {
	border-color: rgba(59, 130, 246, 0.35);
	color: #93c5fd;
}

.m4-rpghistory-controls {
	display: flex;
	flex-wrap: wrap;
	gap: 20px;
	margin-bottom: 18px;
	padding: 12px 18px;
	background: rgba(24, 18, 38, 0.7);
	border-radius: 8px;
	border: 1px solid rgba(212, 175, 55, 0.18);
}

.m4-toggle-label {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	cursor: pointer;
	font-size: 0.88rem;
	color: #d1c7b7;
	user-select: none;
	transition: color 0.15s ease;
}

.m4-toggle-label:hover {
	color: #fce7a1;
}

.m4-toggle-label input[type="checkbox"] {
	cursor: pointer;
	accent-color: #d4af37;
	width: 16px;
	height: 16px;
}

.m4-rpghistory-editor {
	margin-bottom: 20px;
}

.m4-rpg-textarea {
	width: 100%;
	min-height: 260px;
	padding: 16px;
	box-sizing: border-box;
	background: rgba(12, 9, 20, 0.95);
	border: 1px solid rgba(212, 175, 55, 0.35);
	border-radius: 6px;
	color: #f3efe6;
	font-family: Consolas, "Courier New", monospace;
	font-size: 0.88rem;
	line-height: 1.6;
	resize: vertical;
	box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.6);
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.m4-rpg-textarea:focus {
	outline: none;
	border-color: rgba(212, 175, 55, 0.8);
	box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.6), 0 0 12px rgba(212, 175, 55, 0.25);
}

.m4-rpghistory-actions {
	display: flex;
	align-items: center;
	justify-content: flex-end;
}

.m4-btn-copy {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 10px 24px;
	background: linear-gradient(135deg, #2d2042 0%, #1c142c 100%);
	border: 1px solid rgba(212, 175, 55, 0.6);
	color: #fce7a1;
	font-size: 0.94rem;
	font-weight: 600;
	border-radius: 6px;
	cursor: pointer;
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45);
	transition: all 0.2s ease-in-out;
}

.m4-btn-copy:hover {
	transform: translateY(-1px);
	box-shadow: 0 6px 20px rgba(0, 0, 0, 0.6), 0 0 12px rgba(212, 175, 55, 0.3);
	border-color: rgba(212, 175, 55, 0.9);
	color: #ffffff;
}

.m4-btn-copy.m4-btn-copied {
	background: linear-gradient(135deg, #065f46 0%, #044e39 100%);
	border-color: #34d399;
	color: #a7f3d0;
	box-shadow: 0 4px 14px rgba(6, 95, 70, 0.4);
}

.m4-empty-history {
	padding: 20px;
	background: rgba(30, 24, 46, 0.5);
	border: 1px dashed rgba(212, 175, 55, 0.3);
	border-radius: 6px;
	color: #cbd5e1;
	font-size: 0.92rem;
	display: flex;
	align-items: center;
	gap: 10px;
}

/* Profile Hero Action Button */
.rpg-action-btn.rpg-btn-rpghistory,
a.rpg-btn-rpghistory {
	background: linear-gradient(135deg, rgba(88, 28, 135, 0.4) 0%, rgba(59, 7, 100, 0.6) 100%);
	border-color: rgba(192, 132, 252, 0.6);
	color: #f3e8ff !important;
}

.rpg-action-btn.rpg-btn-rpghistory:hover,
a.rpg-btn-rpghistory:hover {
	background: linear-gradient(135deg, rgba(126, 34, 206, 0.6) 0%, rgba(88, 28, 135, 0.8) 100%);
	border-color: #d8b4fe;
	color: #ffffff !important;
	box-shadow: 0 4px 14px rgba(147, 51, 234, 0.45);
	transform: translateY(-1px);
}
/* [M45T3R5W4G3R] User RPG History BBCode Generator Styles END */

/* [M45T3R5W4G3R] Cast Checking & Family Stat Bonus Badge Styles BEGIN */
.m4-cast-status-wrap {
	margin-top: 6px;
	padding: 6px 12px;
	border-radius: 6px;
	font-size: 0.85rem;
	line-height: 1.4;
	transition: all 0.25s ease;
}
.m4-cast-status-wrap.checking {
	background: rgba(59, 130, 246, 0.12);
	border: 1px solid rgba(59, 130, 246, 0.35);
	color: #93c5fd;
}
.m4-cast-status-wrap.available {
	background: rgba(34, 197, 94, 0.12);
	border: 1px solid rgba(34, 197, 94, 0.35);
	color: #86efac;
}
.m4-cast-status-wrap.fuzzy {
	background: rgba(234, 179, 8, 0.12);
	border: 1px solid rgba(234, 179, 8, 0.35);
	color: #fde047;
}
.m4-cast-status-wrap.taken {
	background: rgba(239, 68, 68, 0.14);
	border: 1px solid rgba(239, 68, 68, 0.45);
	color: #fca5a5;
}

.m4-cast-badge {
	display: inline-flex;
	align-items: center;
	padding: 2px 8px;
	border-radius: 4px;
	font-size: 0.78rem;
	font-weight: 600;
	margin-left: 8px;
	vertical-align: middle;
}
.m4-cast-badge.available {
	background: rgba(34, 197, 94, 0.15);
	border: 1px solid rgba(34, 197, 94, 0.4);
	color: #86efac;
}
.m4-cast-badge.fuzzy {
	background: rgba(234, 179, 8, 0.15);
	border: 1px solid rgba(234, 179, 8, 0.4);
	color: #fde047;
}
.m4-cast-badge.taken {
	background: rgba(239, 68, 68, 0.15);
	border: 1px solid rgba(239, 68, 68, 0.4);
	color: #fca5a5;
}

.m4-stat-bonus-sub {
	display: block;
	font-size: 0.72rem;
	color: #d4af37;
	font-weight: 600;
	margin-top: 3px;
	letter-spacing: 0.3px;
}
/* [M45T3R5W4G3R] Cast Checking & Family Stat Bonus Badge Styles END */
