* { box-sizing: border-box }

/* #region SCROLLBARS */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent }
::-webkit-scrollbar-thumb {
	background: var(--scroll-bar-color, #8885);
	border-radius: 2px;
}
::-webkit-scrollbar-thumb:hover { background: var(--scroll-bar-color-hover, #888); }
/* #endregion */

/* #region FONTS */
@font-face {
	font-family: 'Alegreya Sans';
	font-style: normal;
	font-weight: 100 900;
	src: url('/fonts/AlegreyaSans.woff2') format('woff2-variations');
}

@font-face {
	font-family: 'Alegreya Sans Italic';
	font-style: italic;
	font-weight: 100 900;
	src: url('/fonts/AlegreyaSans-Italic.woff2') format('woff2-variations');
}
/*
@font-face {
	font-family: 'Material Symbols Sharp';
	font-display: block;
	font-style: normal;
	font-weight: 100 700;
	src: url('/fonts/MaterialSymbolsSharpSubset.woff2') format('woff2');
}
*/
/* Fallback for Google/Opera GX issue */
@font-face {
  font-family: 'Material Symbols Sharp';
  font-style: normal;
  font-weight: 100 700;
  font-display: block;
  src: url(https://fonts.gstatic.com/icon/font?kit=gNMyW2J8Roq16WD5tFNRaeLQk6-SHQ_R00k4c2_whPnoY9ruReYU3rHmz74m0ZkGH-VBYe1x0TV6x4yFH8F-H5Od1kzVR4x9r8__USB3vnHsbjGWnTaNm-bZyUCWfPO-o9fx6SvviKLKxY1NAegCEGzRYS8kYqkhwBXrIiteuIrI4awktE5RuS3C4OOs3aKMaDMPtx8vopsd6zMMrp90i0R3daZdsWTTW45dXMi1xWwtqs8bk7lJgW0m1O5kQMz4rfc9sV8nkNGqiG8ssgDqOkbZNFfnqw&skey=b2b11cf3b396438f&v=v263) format('woff2');
}
/* #endregion */

/* #region BASICS */
html, body {
	padding: 0px;
	margin: 0px;
}

html { background-color: var(--background) }

body, a {
	font-family: var(--bodyFont);
	font-weight: 400;
	font-size: var(--fontSizeBase, 19px);
	color: var(--text);
	text-decoration: none;
}

h1, h2, h3, h4, h5 {
	font-family: var(--headlineFont);
	line-height: 120%;
	overflow-wrap: anywhere;
}

h1, h2, h3, h4 {
	font-variation-settings: 'wght' 600;
}

a {
	color: var(--link);
	font-variation-settings: 'wght' 600;
}
	a:hover {
		color: var(--linkHover);
	}

hr {
	border: none;
	border-top: 1px solid var(--text)
}

blockquote {
	border-left: 3px solid var(--linkVisited);
	padding-left: 15px;
	font-style: italic;
}

code {
	display: block;
	font-family: 'Courier New', Monospace;
	font-size: var(--fontSizeBase);
	background: black;
	padding: 10px;
	border-radius: 10px;
	color: #AAA;
	width: 100%;
	line-height: 150%;
}

summary { cursor: pointer }
summary:hover { color: var(--maximum) }

fieldset {
	border: none;
	padding: 0px;
}
/* #endregion */

/* #region TOASTS */
.notyf__toast {
	border-radius: 10px !important;
}
.notyf__dismiss-btn:after, .notyf__dismiss-btn:before {
	background-color: var(--background) !important;
}
.success {
	color: var(--background);
}
/* #endregion */

/* #region FORMS */
button, .button {
	display: inline-block;
	font-family: 'Alegreya Sans';
	font-size: var(--fontSizeInput);
	font-variation-settings: 'wght' 600;
	padding: 10px 20px;
	border-radius: 8px;
	color: var(--text);
	background-color: var(--buttonBg);
	border: 1px color-mix(in srgb, var(--buttonBg), var(--accent) 15%) solid;
	cursor: pointer;
	box-shadow: 2px 2px 3px #0003;
	text-align: center;
	text-decoration: none;
}
button.square, .button.square {
	padding: 10px;
}
button.round, .button.round {
	padding: 5px;
	border-radius: 50%;
}
button.plain, .button.plain {
	background: none;
	border: none;
	box-shadow: none;
	padding: 0px;
	border-radius: 0px;
}
button.plain:hover, .button.plain:hover {
	border: none;
	background: none;
}

button.large, .button.large {
	padding: 15px 30px;
	min-width: 240px;
}

button:hover, .button:hover {
	background-color: var(--buttonBgHover);
	border: 1px color-mix(in srgb, var(--buttonBg), var(--linkVisited) 30%) solid;
	transition: color 0.1s ease-in-out, background-color 0.1s ease-in-out;
	color: var(--buttonTxtHover);
}

button:disabled {
	color: var(--dim);
	background-color: var(--block);
	border: none;
	cursor: not-allowed;
	box-shadow: none;
}

button.material-symbols-rounded {
	border: none;
	background-color: transparent;
	box-shadow: none;
	padding: 0px;
}

button.secondary {
	border: none;
	background: none;
	color: var(--linkVisited);
	box-shadow: none;
	padding: 5px;
}

button.active {
	background-color: color-mix(in srgb, var(--panel), var(--background) 30%) ;
	border: 1px var(--panel) solid;
	box-shadow: inset 2px 2px 2px #0003;
	color: var(--dim);
}

.button:visited {
	color: var(--text);
}

input[type=text], input[type=email], input[type=password], textarea, input[type=checkbox] {
	font-family: 'Alegreya Sans', Arial, Helvetica, sans-serif;
	padding: 15px;
	margin: 0px;
	font-size: var(--fontSizeInput);
	border: none;
	color: var(--text);
	appearance: none;
	min-width: 40px;
	min-height: 40px;
	border-bottom: 3px var(--buttonBg) solid;
	background-color: var(--inputBg);
	box-shadow: inset 1px 1px 6px #0006;
	border-radius: 10px;
}

textarea, .ProseMirror {
	line-height: 120%;
	font-size: var(--fontSizeInput);
}

input[type=text]:focus, textarea:focus, select:focus {
	outline: 2px var(--buttonBg) solid;
}
.ProseMirror-focused {
	outline: none;
}
input[type=checkbox] {
	cursor: pointer;
}
input[type=color] {
	width: 36px;
	min-width: 36px;
	height: 36px;
	padding: 0px;
	appearance: none;
}
input[type=color]::-webkit-color-swatch-wrapper {
	padding: 3px;
}
input[type=checkbox]:checked {
	background-color: var(--accent);
	background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' height='20' viewBox='0 -960 960 960' width='20'><path d='M395-253 194-455l83-83 118 117 288-287 83 84-371 371Z' fill='%23201c1b'/></svg>");
	background-repeat: no-repeat;
	background-position: center center;
	background-size: 35px 35px;
	box-shadow: 1px 1px 6px #0006;
}

option {
	padding: 5px;
}
option:checked {
	color: white;
	background-color: var(--accent);
}
option.character:checked {
	color: white;
	background-color: var(--character);
}

select {
	padding: 15px;
	font-size: var(--fontSizeInput);
	box-shadow: 1px 1px 6px #0006;
	border: none;
	border-top: 3px var(--buttonBg) solid;
	color: var(--text);
	border-radius: 10px;
	cursor: pointer;
	appearance: none;
	position: relative;
	background-color: color-mix(in srgb, var(--panel), var(--prominent) 15%);
	background-image: url("data:image/svg+xml;utf8,<svg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'><path fill-rule='evenodd' clip-rule='evenodd' d='M12 1.41024L10.59 0.000244079L6 4.58024L1.41 0.000243678L-6.16331e-08 1.41024L6 7.41024L12 1.41024Z' fill='%23c4b6ab'/></svg>");
	background-repeat: no-repeat;
	background-position: right 16px center;
	background-size: 14px 14px;
}

::placeholder {
	color: var(--dim) !important;
}
/* #endregion */

/* #region COMMON */
.highlight {
	color: var(--new) !important;
	font-weight: bold;
}

.user {
	color: var(--user);
	text-decoration: none;
}
	a.user:hover {
		color: var(--userHover);
		text-decoration: none;
	}

.character {
	color: var(--character);
}
	a.character:hover {
		color: var(--characterHover);
		text-decoration: none;
	}

.toggle {
	display: flex;
	gap: 1px;
}
	.toggle button {
		padding: 10px;
	}
	.toggle button:first-child {
		border-radius: 10px 0px 0px 10px;
	}
	.toggle button:last-child {
		border-radius: 0px 10px 10px 0px;
	}

.editableLong p {
	padding: 10px 0px;
	margin: 0px;
}
.editableLong ol {
	margin: 0px;
}
.editableLong ol p, .editableLong ul p {
	padding: 0px;
}
.editableLong h1:first-child {
	margin-top: 0px;
}
.editableLong img {
	max-width: 100%;
}
/* #endregion */

/* #region SVELTE-SELECT */
.svelte-select {
	--font-size: var(--fontSizeInput);
	--border: none;
	--border-radius: 10px;
	--border-hover: none;
	--background: var(--inputBg);
	--color: var(--text);
	--padding: 3px 15px;
	--min-width: 40px;
	--min-height: 40px;
	--border-focused: 2px var(--buttonBg) solid;
	--list-background: var(--block);
	--list-shadow: 2px 2px 6px #0003;
	--item-hover-bg: var(--text);
	--item-hover-color: var(--background);
	--multi-item-bg: var(--buttonBg);
	--multi-item-outline: none;
	--multi-item-clear-icon-color: var(--text);
	--multi-item-height: 30px;
	cursor: text;
	box-shadow: inset 1px 1px 6px #0006;
	font-family: 'Alegreya Sans', Arial, Helvetica, sans-serif;
	border-bottom: 3px var(--buttonBg) solid !important;
}
	.svelte-select input {
		cursor: text !important;
		box-shadow: none;
	}
	.svelte-select .multi-item-clear {
		cursor: pointer;
	}
	.svelte-select .value-container {
		height: 50px;
		padding: 0px !important;
	}
/* #endregion */

/* #region TABS */
.tabs {
	position: relative;
}
	.tabs a, .tabs button {
		font-family: 'Alegreya Sans';
		font-variation-settings: 'wght' 600;
		display: inline-block;
		padding: 13px 20px;
		height: 50px;
		text-decoration: none;
		font-size: calc(1.2 * var(--fontSizeBase));
		color: #eee;
		text-shadow: 1px 1px 4px #000A;
		background-color: transparent;
		border: none;
		box-shadow: none;
	}
		.tabs a:hover, .tabs button:hover {
			color: var(--maximum); 
		}

.tabs a.active, .tabs button.active {
	color: var(--text);
	background-color: var(--panel);
	border-radius: 8px 8px 0px 0px;
	padding: 13px 20px;
	opacity: 1;
	position: relative;
	text-shadow: none;
}
	.tabs a.active:before, .tabs a.active:after, .tabs button.active:before, .tabs button.active:after {
		content: '';
		position: absolute;
		height: 8px;
		width: 16px;
		bottom: 0px;
	}
	.tabs a.active:after, .tabs button.active:after {
		right: -16px;
		border-radius: 0 0 0 8px;
		box-shadow: -8px 0 0 0 var(--panel);
	}
	.tabs a.active:before, .tabs button.active:before {
		left: -16px;
		border-radius: 0 0 8px 0;
		box-shadow: 8px 0 0 0 var(--panel);
	}
	.tabs button:disabled, #tabs button:disabled {
		color: var(--dim) !important;
		text-shadow: none !important;
		opacity: 0.5 !important;
	}

/* #region Secondary tabs */
.tabs.secondary button {
	text-shadow: 1px 1px 4px #0003;
}
.tabs.secondary:after {
	content: '';
	width: 100%;
	height: 10px;
	background-color: var(--block);
	position: absolute;
	bottom: -10px;
	left: 0px;
	box-shadow: 2px 2px 2px #0001;
}
.tabs.secondary button:not(.active) {
	color: var(--link);
	opacity: 1;
}
.tabs.secondary button:not(.active):hover {
	color: var(--text);
}
.tabs.secondary button.active {
	background-color: var(--block);
	box-shadow: 2px 0px 2px #0003;
}
.tabs.secondary button.active:after {
	box-shadow: -8px 0 0 0 var(--block);
}
.tabs.secondary button.active:before {
	box-shadow: 8px 0 0 0 var(--block);
}
.tabs.secondary button:first-child::before {
	content: none;
}
/* #endregion */

/* #region Tertiary tabs */
.tabs.tertiary button {
	color: var(--link);
	text-shadow: none;
}
.tabs.tertiary button:first-child {
	padding-left: 0px;
}
.tabs.tertiary button:not(.active):hover {
	color: var(--text);
}
/* #endregion */
/* #endregion */

/* #region MISC */
.clear {clear: both;}

.sep {
	width: 1px;
	height: 22px;
	border-left: 1px solid #0003;
	border-right: 1px solid #fff1;
	display: inline-block;
}

.diceRoll {line-height: 200%;}
.diceRoll h3 {margin: 0px;}
.diceRoll .row {font-family: courier, courier new, sans-serif;}
.diceRoll .type {
	display: inline-block;
	width: 80px;
}
.diceRoll b {font-size: 30px;}

.info {
	font-size: 20px;
	color: var(--dim);
	font-style: italic;
	padding-left: 10px;
}

.badge {
	position: absolute;
	top: -5px;
	right: -5px;
	width: 10px;
	height: 10px;
	border-radius: 50%;
	box-shadow: 2px 2px 4px #0006;
	background-color: var(--new);
	z-index: 100;
}

.status {
	position: absolute;
	top: 2px;
	left: 2px;
	width: 12px;
	height: 12px;
	border-radius: 50%;
	box-shadow: 2px 2px 4px #0006;
	background-color: var(--accent);
}

.content img, .content iframe {
	max-width: 100%;
}

.grecaptcha-badge {
	visibility: hidden !important;
}
/* #endregion */

/* #region POST CONTENT */
.post .content {
	/* white-space: break-spaces; fixes multiple spaces, breaks imported posts */
	padding: 20px;
	font-size: var(--fontSizeBase);
	font-weight: 375;
}
.post .content p {
	line-height: 120%;
	margin: 0px;
	padding: 5px 0px;
	min-height: 30px;
}
.post .content ol, .post .content ul {
	display: flex;
	flex-direction: column;
	margin: 10px;
	padding-left: 20px;
}
.post .content img, .post .content iframe {
	max-width: 100%;
	object-fit: contain;
	height: auto;
	cursor: pointer;
}
.post .content a {
	text-decoration: underline;
}
.post .content a.mention {
	text-decoration: none;
}
.post .content a:not(.mention):visited {
	color: var(--linkVisited);
}
.post .content a.button {
	text-decoration: none;
	margin: 5px 0px;
}
.post .content a.button:visited {
	color: var(--text);
}
.post .content .user:not(.highlight) {
	color: var(--user) !important;
}
.post .content a.user:hover {
	color: var(--userHover) !important;
}
.post .content .reply { /* reply */
	padding: 5px;
	padding-left: 0px;
	color: var(--user);
	font-style: normal;
	font-variation-settings: 'wght' 600;
	cursor: pointer;
}
.post .content .nestedReply {
	box-shadow: 0px 0px 6px #0006;
	margin-bottom: 20px;
}
.post .content .reply:hover {
	color: var(--userHover);
}

#chat .post .content {
	padding: 0px;
}

#lastPosts .content {
	max-height: 300px;
	overflow: auto;
}
/* #endregion */

/* #region WYSIWYG EDITOR - TipTap/ProseMirror */
.ProseMirror {
	font-family: 'Alegreya Sans', Arial, Helvetica, sans-serif;
	font-size: var(--font-size);
	border: none;
	color: var(--text);
	height: 100%;
	min-height: 140px;
	width: auto;
	margin: 0px;
	padding: 15px;
	padding-bottom: 50px;
	padding-right: 80px;
	overflow-wrap: break-word;
	word-break: break-word;
}
	.singleLine .ProseMirror {
		padding: 15px;
		padding-top: 8px;
		padding-bottom: 5px;
		min-height: 30px !important;
	}
.ProseMirror, .ProseMirror iframe {
	max-width: 100%;
}
.ProseMirror iframe {
	max-height: 100px;
}
.ProseMirror p {
	margin: 10px 0px;
}
.ProseMirror ol p, .ProseMirror ul p {
	margin: 0px;
}
.ProseMirror .details {
	display: flex;
	align-items: center;
	margin: 1rem 0;
	border: 1px solid var(--buttonBg);
	border-radius: 10px;
	padding: 5px;
	gap: 10px;
}
.ProseMirror .details>button {
	display: flex;
	cursor: pointer;
	padding: 0px;
}
.ProseMirror .details>button:before {
	content: "\25b6";
	display: flex;
	justify-content: center;
	align-items: center;
	width: 1.5em;
	height: 1.5em;
}
.ProseMirror .details.is-open>button:before {
	content: "\25bc";
}
.ProseMirror .is-empty:before {
	content: attr(data-placeholder);
	float: left;
	color: var(--dim);
	pointer-events: none;
	height: 0;
}
.ProseMirror .details>div {
	flex: 1 1 auto;
}
.ProseMirror cite { /* reply */
	padding: 5px;
	padding-left: 0px;
	color: var(--accent);
	font-style: normal;
	font-variation-settings: 'wght' 600;
}
img.ProseMirror-selectednode {
	outline: 2px var(--maximum) solid;
	border-radius: 5px;
}
.ProseMirror a.mention {
	pointer-events: none;
}

.sansserif { font-family: 'Alegreya Sans' }
.monospace { font-family: monospace }
.cursive { font-family: cursive }
.caveat { font-family: 'Caveat' }
.orbitron { font-family: 'Orbitron' }
/* #endregion */

/* #region SVELTE-EASY-CROP */
.cropperArea {
	border: 2px white solid !important;
	color: var(--panel) !important;
	opacity: 0.5;
}
/* #endregion */

/* #region TOOLTIP - Tippy */
.tippy-box {
	background-color: var(--background) !important;
	color: var(--text) !important;
	font-size: 18px !important;
	box-shadow: 1px 1px 6px #0002;
	padding: 0px;
}
.tippy-arrow {
	color: var(--background) !important;
}
.tippy-box-bubble {
	background-color: transparent !important;
	box-shadow: none !important;
}
	.tippy-box-bubble .tippy-arrow {
		display: none;
	}
/* #endregion */

/* #region ICONS */
.material {
	font-family: 'Material Symbols Sharp' !important;
	font-weight: normal;
	font-style: normal;
	font-size: 24px;
	line-height: 1;
	letter-spacing: normal;
	text-transform: none;
	display: inline-block;
	white-space: nowrap;
	word-wrap: normal;
	direction: ltr;
	font-feature-settings: 'liga';
	-webkit-font-feature-settings: 'liga';
	-webkit-font-smoothing: antialiased; /* subpixel-antialiased; */
	font-variation-settings: 'FILL' 1, 'wght' 700, 'GRAD' 0, 'opsz' 24;
}
/* #endregion */

/* #region MOBILE OVERRIDES */
@media (max-width: 768px) {
	body, a { font-size: var(--fontSizeBase) }
	h1 { font-size: calc(var(--fontSizeBase) * 2) }

	.tabs a.active, .tabs button.active {
		padding: 10px 15px;
		font-size: calc(var(--fontSizeBase) * 1.2);
	}

	.diceRoll b { font-size: 25px }
}

@media (max-width: 500px) {
	.tabs a, .tabs button {
		padding: 10px 8px;
		font-size: calc(var(--fontSizeBase) * 1.2);
	}
	.tabs a.active, .tabs button.active { padding: 10px 15px }
	.tabs.secondary { justify-content: space-between }
	.tabs.secondary button { padding: 0px 4px }
	.tabs.secondary button.active { padding: 10px }
	.ProseMirror { padding-right: 15px }
}
/* #endregion */
