* {
	box-sizing: border-box;
}

body {
	margin: 0;
	color: var(--dark);
	background:
		radial-gradient(circle at top left, rgba(160, 106, 74, 0.14), transparent 30%),
		radial-gradient(circle at bottom right, rgba(58, 74, 58, 0.16), transparent 25%),
		linear-gradient(180deg, var(--light-base) 0%, #ddd6cc 100%);
	font-family: "Trebuchet MS", "Segoe UI", sans-serif;
}

html[data-theme='dark'] {
	--primary: var(--accent-base);
	--secondary: var(--secondary-base);
	--tertiary: var(--primary-base);
	--accent: var(--primary-base);
	--light: var(--dark-base);
	--dark: var(--light-base);
}

html[data-theme='dark'] body {
	background:
		radial-gradient(circle at top left, rgba(160, 106, 74, 0.2), transparent 35%),
		radial-gradient(circle at bottom right, rgba(29, 42, 68, 0.24), transparent 35%),
		linear-gradient(180deg, #171212 0%, #1f1817 100%);
}

a {
	color: inherit;
	text-decoration: none;
}

img {
	display: block;
	max-width: 100%;
}

.page-shell {
	min-height: 100vh;
}

.site-header,
.site-footer,
.hero,
.panel {
	width: min(1180px, calc(100% - 2rem));
	margin: 1rem auto;
}

.site-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 1rem;
	padding: 1rem 1.25rem;
	border: 1px solid rgba(17, 17, 17, 0.12);
	border-radius: 24px;
	background: rgba(255, 255, 255, 0.78);
	backdrop-filter: blur(16px);
	box-shadow: 0 18px 40px rgba(17, 17, 17, 0.08);
}

.brand {
	font-family: Georgia, "Times New Roman", serif;
	font-size: 1.35rem;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.site-nav {
	display: flex;
	flex-wrap: wrap;
	gap: 0.9rem;
	align-items: center;
	color: rgba(17, 17, 17, 0.75);
}

.thread-state-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 1.4rem;
	height: 1.4rem;
	margin-right: 0.25rem;
	border-radius: 999px;
	background: rgba(198, 40, 40, 0.12);
	font-size: 0.9rem;
}

.content-wrap {
	padding-bottom: 1rem;
}

.hero {
	display: grid;
	grid-template-columns: minmax(0, 1.3fr) minmax(280px, 0.9fr);
	gap: 1.25rem;
	align-items: stretch;
}

.hero__copy,
.hero__art,
.panel,
.node-card,
.post-card {
	border: 1px solid rgba(17, 17, 17, 0.12);
	border-radius: 28px;
	background: rgba(255, 255, 255, 0.84);
	box-shadow: 0 18px 45px rgba(17, 17, 17, 0.08);
}

html[data-theme='dark'] .site-header,
html[data-theme='dark'] .site-footer,
html[data-theme='dark'] .panel,
html[data-theme='dark'] .node-card,
html[data-theme='dark'] .post-card,
html[data-theme='dark'] .profile-choice-preview,
html[data-theme='dark'] .profile-detail-item,
html[data-theme='dark'] .notification-dock,
html[data-theme='dark'] .notification-card {
	background: rgba(31, 24, 23, 0.86);
	border-color: rgba(234, 230, 223, 0.2);
	box-shadow: 0 18px 45px rgba(0, 0, 0, 0.3);
}

html[data-theme='dark'] .panel__intro,
html[data-theme='dark'] .node-card p,
html[data-theme='dark'] .post-card__body,
html[data-theme='dark'] .field small,
html[data-theme='dark'] .site-footer p,
html[data-theme='dark'] .post-author-time,
html[data-theme='dark'] .thread-list-meta,
html[data-theme='dark'] .thread-replies-link,
html[data-theme='dark'] .auth-links,
html[data-theme='dark'] .notification-inline-message {
	color: rgba(234, 230, 223, 0.82);
}

html[data-theme='dark'] .privacy-notice h2,
html[data-theme='dark'] .privacy-notice p {
	color: rgba(234, 230, 223, 0.95);
}

html[data-theme='dark'] .site-nav,
html[data-theme='dark'] .profile-detail-item dd,
html[data-theme='dark'] .birthday-item small {
	color: rgba(234, 230, 223, 0.85);
}

html[data-theme='dark'] .field input,
html[data-theme='dark'] .field select,
html[data-theme='dark'] .field textarea,
html[data-theme='dark'] .simple-editor-button,
html[data-theme='dark'] .simple-editor-color-select,
html[data-theme='dark'] .simple-editor-font-select,
html[data-theme='dark'] .simple-editor-highlight-select {
	background: rgba(31, 24, 23, 0.95);
	border-color: rgba(234, 230, 223, 0.28);
	color: rgba(234, 230, 223, 0.95);
}

html[data-theme='dark'] .simple-editor-toolbar__selects {
	border-color: rgba(234, 230, 223, 0.18);
}

html[data-theme='dark'] .button--ghost {
	border-color: rgba(234, 230, 223, 0.35);
	background: rgba(234, 230, 223, 0.08);
}

.hero__copy {
	padding: 2rem;
	min-height: 340px;
	display: flex;
	flex-direction: column;
	justify-content: center;
	background: linear-gradient(135deg, rgba(11, 31, 58, 0.96), rgba(15, 61, 46, 0.9));
	color: #fff;
	overflow: hidden;
	position: relative;
}

.hero__copy::after {
	content: '';
	position: absolute;
	inset: auto -6rem -7rem auto;
	width: 18rem;
	height: 18rem;
	background: radial-gradient(circle, rgba(212, 175, 55, 0.35), transparent 70%);
	pointer-events: none;
}

.hero__copy h1,
.panel h1,
.panel h2,
.post-card h3,
.node-card h3 {
	font-family: Georgia, "Times New Roman", serif;
}

.hero__copy h1 {
	margin: 0 0 0.8rem;
	font-size: clamp(2.6rem, 4vw, 4.4rem);
	line-height: 0.95;
}

.hero__copy .hero__lead {
	max-width: 58ch;
	font-size: 1.06rem;
	line-height: 1.7;
	color: #fff !important;
}

html[data-theme='dark'] .hero__copy .hero__lead {
	color: #fff !important;
}

.hero__art {
	overflow: hidden;
	min-height: 340px;
}

.hero__art img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.hero__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.8rem;
	margin-top: 1.4rem;
}

.panel-grid {
	width: min(1180px, calc(100% - 2rem));
	margin: 0 auto;
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 1rem;
}

.panel {
	padding: 1.4rem;
}

.panel--empty {
	grid-column: 1 / -1;
	text-align: center;
}

.panel--form,
.panel--node {
	max-width: none;
}

.panel__header,
.node-card__head,
.post-card__header,
.meta-row {
	display: flex;
	justify-content: space-between;
	gap: 1rem;
	align-items: flex-start;
}

.panel__intro,
.node-card p,
.post-card__body,
.field small,
.site-footer p {
	color: rgba(17, 17, 17, 0.72);
	line-height: 1.6;
}

.privacy-notice {
	margin: 0.8rem 0 1rem;
	padding: 0.9rem 1rem;
	border: 1px solid rgba(15, 61, 46, 0.2);
	border-radius: 16px;
	background: rgba(15, 61, 46, 0.07);
}

.privacy-notice h2 {
	margin: 0 0 0.35rem;
	font-size: 1rem;
	font-family: Georgia, "Times New Roman", serif;
	color: rgba(11, 31, 58, 0.95);
}

.privacy-notice p {
	margin: 0.35rem 0 0;
	color: rgba(17, 17, 17, 0.78);
	line-height: 1.55;
}

.pending-validation-banner {
	max-width: none;
	border: 1px solid rgba(180, 34, 34, 0.32);
	background: linear-gradient(
		135deg,
		rgba(180, 34, 34, 0.15),
		rgba(180, 34, 34, 0.07)
	);
	box-shadow: 0 16px 34px rgba(120, 18, 18, 0.16);
}

.pending-validation-banner h2 {
	margin-top: 0;
	margin-bottom: 0.6rem;
	color: rgba(120, 18, 18, 0.98);
	font-size: clamp(1.45rem, 2.2vw, 2rem);
}

.pending-validation-banner p {
	margin: 0.55rem 0 0;
	color: rgba(55, 19, 19, 0.92);
	font-size: 1rem;
	line-height: 1.55;
}

.eyebrow {
	text-transform: uppercase;
	letter-spacing: 0.18em;
	font-size: 0.74rem;
	color: var(--primary);
	margin: 0 0 0.35rem;
	font-weight: 700;
}

.pill {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	padding: 0.35rem 0.7rem;
	border-radius: 999px;
	background: rgba(212, 175, 55, 0.14);
	color: var(--secondary);
	font-size: 0.8rem;
	font-weight: 700;
}

.pill--dark {
	background: rgba(11, 31, 58, 0.14);
	color: var(--tertiary);
}

.thread-tag-badge {
	display: inline-flex;
	align-items: center;
	padding: 0.18rem 0.55rem;
	border-radius: 999px;
	font-size: 0.72rem;
	font-weight: 700;
	line-height: 1;
	margin-right: 0.45rem;
	vertical-align: middle;
}

.pre-edit-snapshot {
	margin-top: 0.75rem;
	padding-top: 0.75rem;
	border-top: 1px dashed rgba(0, 0, 0, 0.18);
}

.pre-edit-snapshot summary {
	cursor: pointer;
	font-weight: 700;
	margin-bottom: 0.55rem;
}

.edit-history-diff {
	white-space: pre-wrap;
	word-break: break-word;
	font-family: Consolas, 'Courier New', monospace;
	font-size: 0.82rem;
	line-height: 1.35;
	padding: 0.75rem;
	border-radius: 0.5rem;
	background: rgba(0, 0, 0, 0.06);
	border: 1px solid rgba(0, 0, 0, 0.12);
}

.button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 2.7rem;
	padding: 0.65rem 1rem;
	border-radius: 999px;
	border: 1px solid transparent;
	font-weight: 700;
	transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.button:hover {
	transform: translateY(-1px);
}

.button--primary {
	background: var(--primary);
	color: var(--dark);
	box-shadow: 0 12px 24px rgba(212, 175, 55, 0.28);
}

.button--ghost {
	border-color: rgba(255, 255, 255, 0.25);
	color: var(--light);
	background: rgba(255, 255, 255, 0.06);
}

.button--danger {
	background: rgba(180, 34, 34, 0.92);
	color: #fff;
	box-shadow: 0 12px 24px rgba(180, 34, 34, 0.24);
}

.button--danger-outline {
	border-color: rgba(180, 34, 34, 0.72);
	background: rgba(255, 255, 255, 0.78);
	color: rgba(140, 24, 24, 0.95);
}


.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 2rem;
	padding: 0.28rem 0.68rem;
	border-radius: 999px;
	border: 1px solid transparent;
	font-size: 0.78rem;
	font-weight: 700;
	line-height: 1;
	text-decoration: none;
}

.btn-outline-danger {
	color: #b4232b;
	background: transparent;
	border-color: #b4232b;
}

.btn-outline-danger:hover,
.btn-outline-danger:focus-visible {
	color: #ffffff;
	background: #b4232b;
}

.btn-outline-info {
	color: #0c6170;
	background: transparent;
	border-color: #0c6170;
}

.btn-outline-info:hover,
.btn-outline-info:focus-visible {
	color: #ffffff;
	background: #0c6170;
}

.btn-danger {
	color: #ffffff;
	background: #b4232b;
	border-color: #b4232b;
}

.btn-danger:hover,
.btn-danger:focus-visible {
	background: #8f1c22;
	border-color: #8f1c22;
}

.btn-sm,
.btn.report-btn {
	min-height: 1.8rem;
	padding: 0.22rem 0.58rem;
	font-size: 0.72rem;
}

.button--report-small {
	min-height: 2rem;
	padding: 0.35rem 0.72rem;
	font-size: 0.78rem;
	background: rgba(120, 18, 18, 0.94);
	color: #fff;
	box-shadow: 0 8px 16px rgba(120, 18, 18, 0.2);
}

.button--compact-action {
	width: min(25%, 16rem);
	min-width: 11rem;
	justify-self: start;
}

.form-shell > .button.button--primary:not(.button--notification):not(.button--danger) {
	width: min(25%, 16rem);
	min-width: 11rem;
	justify-self: start;
}

.notification-inline-message {
	width: min(1180px, calc(100% - 2rem));
	margin: -0.4rem auto 0.8rem;
	display: flex;
	flex-wrap: nowrap;
	justify-content: flex-end;
	align-items: center;
	gap: 0.75rem;
	font-size: 0.83rem;
	color: rgba(17, 17, 17, 0.72);
}

.notification-inline-text {
	font-size: inherit;
	color: inherit;
	text-decoration: none;
}

.node-list,
.post-list {
	display: grid;
	gap: 0.85rem;
}

.node-card,
.post-card {
	padding: 1rem 1.1rem;
}

.node-card__children {
	margin-top: 0.85rem;
	padding-left: 1rem;
	border-left: 2px solid rgba(212, 175, 55, 0.22);
	display: grid;
	gap: 0.75rem;
}

.post-card__header h3 {
	margin: 0;
}

.post-card__header span {
	color: rgba(17, 17, 17, 0.55);
	font-size: 0.9rem;
}

.thread-list-meta {
	margin: 0;
	color: rgba(17, 17, 17, 0.7);
	font-size: 0.92rem;
}

.thread-list-meta a {
	font-weight: 700;
}

.thread-replies-link {
	display: inline-block;
	margin-top: 0.25rem;
	font-size: 0.82rem;
	color: rgba(17, 17, 17, 0.62);
	text-decoration: underline;
}

.thread-replies-link:hover,
.thread-replies-link:focus-visible {
	color: var(--secondary);
}

.post-author-meta {
	display: flex;
	align-items: center;
	gap: 0.65rem;
}

.post-avatar {
	width: 2.5rem;
	height: 2.5rem;
	border-radius: 10px;
	object-fit: cover;
	border: 1px solid rgba(17, 17, 17, 0.18);
}

.post-author-link {
	display: block;
	font-weight: 700;
	line-height: 1.2;
}

.ooc-group-badge-row {
	display: flex;
	flex-wrap: wrap;
	gap: 0.25rem;
	margin-top: 0.15rem;
}

.ooc-group-badge {
	display: inline-flex;
	align-items: center;
	min-height: 1rem;
	padding: 0.08rem 0.42rem;
	border-radius: 999px;
	border: 1px solid rgba(17, 17, 17, 0.14);
	font-size: 0.66rem;
	font-weight: 800;
	line-height: 1;
	text-transform: uppercase;
}

.profile-name-heading {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem;
}

.profile-name-heading__badges {
	margin-top: 0;
}

.post-author-time {
	font-size: 0.86rem;
	color: rgba(17, 17, 17, 0.6);
}

.mention-link {
	font-weight: 800;
	text-decoration: underline;
	text-decoration-thickness: 0.08em;
	text-underline-offset: 0.16em;
}

.mention-suggestions {
	display: grid;
	gap: 0.15rem;
	margin-top: -0.35rem;
	padding: 0.35rem;
	border: 1px solid rgba(17, 17, 17, 0.18);
	border-radius: 10px;
	background: var(--light);
	box-shadow: 0 0.7rem 1.6rem rgba(17, 17, 17, 0.16);
	z-index: 5;
}

.mention-suggestions[hidden] {
	display: none;
}

.mention-suggestions__item {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.8rem;
	width: 100%;
	padding: 0.45rem 0.55rem;
	border: 0;
	border-radius: 8px;
	background: transparent;
	color: var(--dark);
	font: inherit;
	text-align: left;
	cursor: pointer;
}

.mention-suggestions__item:hover,
.mention-suggestions__item:focus-visible {
	background: rgba(17, 17, 17, 0.08);
}

.mention-suggestions__item span {
	font-size: 0.78rem;
	color: rgba(17, 17, 17, 0.62);
}

.form-error-banner {
	margin: 0;
	padding: 0.8rem 1rem;
	border-radius: 14px;
	background: rgba(190, 35, 35, 0.1);
	border: 1px solid rgba(190, 35, 35, 0.22);
	color: rgba(110, 12, 12, 0.95);
}

.form-error-banner p {
	margin: 0;
	font-weight: 700;
}

.form-error-list {
	margin: 0.6rem 0 0;
	padding-left: 1.2rem;
	display: grid;
	gap: 0.35rem;
}

.field .errorlist {
	margin: 0;
	padding-left: 1.2rem;
	color: rgba(130, 18, 18, 0.98);
	font-weight: 600;
	font-size: 0.9rem;
}

.field .errorlist li {
	margin: 0;
}

.shoutbox-panel {
	width: min(1180px, calc(100% - 2rem));
	margin: 0 auto 1rem;
}

.shoutbox-form {
	margin-top: 1rem;
	margin-bottom: 1rem;
}

.shoutbox-form__actions {
	display: grid;
	gap: 0.85rem;
}

.shoutbox-form__character {
	margin: 0;
}

.compact-action-row {
	display: grid;
	gap: 0.85rem;
}

.compact-action-row__select {
	margin: 0;
}

.compact-action-row--buttons {
	grid-template-columns: 1fr;
}

.compact-action-row--buttons > .button {
	justify-self: start;
}

.shoutbox-list {
	max-height: 34rem;
	overflow: auto;
	padding-right: 0.2rem;
}

.shoutbox-card__body {
	margin-bottom: 0.55rem;
}

.reaction-row {
	display: flex;
	flex-wrap: wrap;
	gap: 0.45rem;
	margin-top: 0.75rem;
	align-items: center;
}

.reaction-row form {
	margin: 0;
}

.reaction-row__left {
	display: flex;
	flex-wrap: wrap;
	gap: 0.45rem;
	align-items: center;
}

.reaction-row--shout {
	justify-content: space-between;
}

.shoutbox-card__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.35rem;
	align-items: center;
	justify-content: flex-end;
	margin-left: auto;
}

.shoutbox-card__actions form {
	display: inline-flex;
}

.thread-action-row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.55rem;
	margin-top: 0.75rem;
}

.thread-action-row form {
	margin: 0;
}

.thread-action-row .button--report-small {
	margin-left: auto;
}

.pagination {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	margin-top: 1rem;
	padding-top: 0.8rem;
	border-top: 1px solid rgba(17, 17, 17, 0.1);
}

.pagination span {
	font-weight: 700;
	color: rgba(17, 17, 17, 0.72);
}

.reaction-chip {
	border: 1px solid rgba(17, 17, 17, 0.2);
	background: rgba(255, 255, 255, 0.92);
	color: rgba(17, 17, 17, 0.85);
	border-radius: 999px;
	padding: 0.28rem 0.62rem;
	cursor: pointer;
	font-size: 0.95rem;
	font-weight: 700;
	display: inline-flex;
	align-items: center;
	gap: 0.3rem;
}

.reaction-chip:hover,
.reaction-chip:focus-visible {
	transform: translateY(-1px);
}

.reaction-chip--active {
	box-shadow: 0 0 0 2px rgba(17, 17, 17, 0.14) inset;
}

.reaction-chip[data-reaction="like"] {
	border-color: #68a4ff;
	background: rgba(104, 164, 255, 0.2);
	color: #0b3b8f;
}

.reaction-chip[data-reaction="love"] {
	border-color: #ff6b7d;
	background: rgba(255, 107, 125, 0.2);
	color: #9e1128;
}

.reaction-chip[data-reaction="laugh"] {
	border-color: #e0c12c;
	background: rgba(255, 225, 102, 0.34);
	color: #7b6600;
}

.reaction-chip[data-reaction="wow"] {
	border-color: #ff9c42;
	background: rgba(255, 156, 66, 0.24);
	color: #8a4b00;
}

.reaction-chip[data-reaction="sad"] {
	border-color: #3f495c;
	background: rgba(63, 73, 92, 0.26);
	color: #1b2029;
}

.reaction-chip[data-reaction="yay"] {
	border-color: #2e7d32;
	background: rgba(46, 125, 50, 0.28);
	color: #17441c;
}

.report-btn {
	margin-left: 0;
}

.birthday-list-wrap {
	margin-top: 1rem;
	padding-top: 0.9rem;
	border-top: 1px solid rgba(17, 17, 17, 0.1);
}

.birthday-list-wrap h3 {
	margin: 0 0 0.5rem;
	font-family: Georgia, "Times New Roman", serif;
}

.birthday-list {
	margin: 0;
	padding: 0;
	list-style: none;
	display: grid;
	gap: 0.35rem;
}

.birthday-item {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 0.8rem;
	font-weight: 700;
}

.birthday-item small {
	color: rgba(17, 17, 17, 0.72);
	font-size: 0.82rem;
}

.birthday-item--character {
	font-size: 0.9rem;
	font-weight: 600;
	padding-left: 0.9rem;
	opacity: 0.9;
}

.birthday-item--character small {
	font-size: 0.76rem;
}

.auth-panel {
	max-width: 540px;
	margin: 1.2rem auto;
}

.auth-links {
	margin-top: 0.9rem;
	color: rgba(17, 17, 17, 0.7);
}

.confirm-toast {
	position: fixed;
	right: 1rem;
	bottom: 1rem;
	z-index: 1200;
	max-width: min(28rem, calc(100% - 2rem));
	padding: 0.75rem 0.95rem;
	border-radius: 14px;
	background: rgba(180, 34, 34, 0.96);
	color: #fff;
	border: 1px solid rgba(255, 255, 255, 0.2);
	box-shadow: 0 14px 32px rgba(17, 17, 17, 0.22);
	font-size: 0.86rem;
	font-weight: 700;
	opacity: 0;
	transform: translateY(8px);
	pointer-events: none;
	transition: opacity 180ms ease, transform 180ms ease;
}

.notification-trigger {
	border: 0;
	background: transparent;
	padding: 0;
	font: inherit;
	font-size: inherit;
	white-space: nowrap;
	text-decoration: underline;
	color: inherit;
	cursor: pointer;
}

.notification-trigger__count {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 1.35rem;
	height: 1.35rem;
	margin-left: 0.35rem;
	padding: 0 0.35rem;
	border-radius: 999px;
	background: #c62828;
	color: #fff;
	font-size: 0.78rem;
	font-weight: 800;
	line-height: 1;
	text-decoration: none;
}

.form-check.form-switch {
	display: inline-flex;
	align-items: center;
	margin: 0;
}

.form-check-input {
	appearance: none;
	-webkit-appearance: none;
	width: 2.5rem;
	height: 1.35rem;
	margin: 0;
	background-color: rgba(17, 17, 17, 0.24);
	border: 1px solid rgba(17, 17, 17, 0.26);
	border-radius: 2rem;
	position: relative;
	cursor: pointer;
	transition: background-color 180ms ease, border-color 180ms ease;
}

.form-check-input::after {
	content: '';
	position: absolute;
	top: 0.11rem;
	left: 0.13rem;
	width: 1rem;
	height: 1rem;
	border-radius: 50%;
	background: #fff;
	box-shadow: 0 1px 4px rgba(17, 17, 17, 0.3);
	transition: transform 180ms ease;
}

.form-check-input:checked {
	background: rgba(58, 74, 58, 0.75);
	border-color: rgba(58, 74, 58, 0.95);
}

.form-check-input:checked::after {
	transform: translateX(1.12rem);
}

html[data-theme='dark'] .form-check-input {
	background: rgba(31, 24, 23, 0.88);
	border-color: rgba(234, 230, 223, 0.45);
}

html[data-theme='dark'] .form-check-input:checked {
	background: rgba(160, 106, 74, 0.62);
	border-color: rgba(160, 106, 74, 0.86);
}

.notification-dock {
	position: fixed;
	top: 1rem;
	right: 1rem;
	z-index: 1250;
	width: min(26rem, calc(100% - 2rem));
	max-height: calc(100vh - 2rem);
	display: grid;
	gap: 0.6rem;
	padding: 0.8rem;
	border-radius: 16px;
	border: 1px solid rgba(17, 17, 17, 0.16);
	background: rgba(255, 255, 255, 0.95);
	box-shadow: 0 16px 34px rgba(17, 17, 17, 0.2);
	overflow: hidden;
	opacity: 0;
	transform: translateY(-8px);
	pointer-events: none;
	visibility: hidden;
	transition: opacity 180ms ease, transform 180ms ease, visibility 180ms ease;
}

.notification-dock--open {
	opacity: 1;
	transform: translateY(0);
	pointer-events: auto;
	visibility: visible;
}

.notification-dock__header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 0.6rem;
}

.notification-close {
	border: 0;
	background: transparent;
	font: inherit;
	font-size: 0.86rem;
	font-weight: 700;
	cursor: pointer;
	padding: 0;
	margin-right: 0.2rem;
}

.notification-dock__header h2 {
	margin: 0;
	font-size: 1.02rem;
}

.notification-dock__list {
	display: grid;
	gap: 0.55rem;
	max-height: calc(100vh - 7rem);
	overflow: auto;
	padding-right: 0.2rem;
}

.notification-card {
	padding: 0.65rem;
	border-radius: 12px;
	border: 1px solid rgba(17, 17, 17, 0.12);
	background: rgba(248, 245, 238, 0.85);
	display: grid;
	gap: 0.5rem;
}

.notification-card--kept {
	border-color: rgba(15, 61, 46, 0.36);
	background: rgba(15, 61, 46, 0.08);
}

.notification-card a,
.notification-card__message {
	font-size: 0.9rem;
	line-height: 1.35;
	color: inherit;
}

.notification-card a {
	text-decoration: underline;
}

.notification-card__time {
	font-size: 0.76rem;
	color: rgba(17, 17, 17, 0.62);
}

.notification-card__actions {
	display: flex;
	gap: 0.4rem;
	flex-wrap: wrap;
}

.character-preview-card {
	padding: 0;
	overflow: hidden;
}

.character-card-grid {
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.character-preview-card__link {
	display: grid;
	grid-template-columns: minmax(64px, 86px) minmax(0, 1fr);
	gap: 1rem;
	align-items: center;
	padding: 1rem;
}

.character-preview-card__body {
	display: grid;
	gap: 0.45rem;
}

.character-preview-card__timestamp {
	font-size: 0.78rem;
	color: rgba(17, 17, 17, 0.62);
}

.character-file__header {
	display: grid;
	grid-template-columns: minmax(160px, 260px) minmax(0, 1fr);
	gap: 1.25rem;
	align-items: start;
	padding-bottom: 1rem;
	border-bottom: 1px solid rgba(17, 17, 17, 0.12);
}

.character-file__portrait {
	width: 100%;
	aspect-ratio: 3 / 4;
	object-fit: cover;
	border-radius: 8px;
	border: 1px solid rgba(17, 17, 17, 0.16);
	background: rgba(255, 255, 255, 0.6);
}

.character-file__summary {
	display: grid;
	gap: 0.75rem;
	padding-top: 1.25rem;
}

.character-file__title-row {
	display: flex;
	align-items: center;
	gap: 0.85rem;
	flex-wrap: wrap;
}

.character-file__title-row h1 {
	margin: 0;
}

.character-file__owner-line {
	margin: 0;
	font-size: 1rem;
	line-height: 1.4;
}

.character-file__edit-button {
	width: fit-content;
	margin-top: 1rem;
}

.profile-tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 0.35rem;
	margin: 1rem 0;
	border-bottom: 1px solid rgba(17, 17, 17, 0.14);
}

.profile-tab {
	padding: 0.65rem 1rem;
	border: 1px solid rgba(17, 17, 17, 0.14);
	border-bottom: 0;
	border-radius: 8px 8px 0 0;
	background: rgba(255, 255, 255, 0.52);
	font-weight: 700;
}

.profile-tab--active {
	background: rgba(15, 61, 46, 0.12);
	color: var(--secondary);
}

.character-file__section {
	display: grid;
	gap: 1rem;
}

.character-file__form {
	margin-top: 1rem;
}

.family-tree {
	display: grid;
	gap: 1rem;
}

.family-tree__branch {
	padding-left: 1rem;
	border-left: 3px solid rgba(15, 61, 46, 0.22);
}

.family-tree__branch ul {
	display: grid;
	gap: 0.55rem;
	padding-left: 1rem;
}

.family-tree__branch li {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	align-items: center;
}

.family-tree__member-copy {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	align-items: baseline;
	min-width: min(100%, 18rem);
}

.family-tree__actions {
	display: inline-flex;
	gap: 0.35rem;
	align-items: center;
}

.family-tree__form-actions {
	align-items: center;
}

.family-tree__report-button {
	margin-left: auto;
}

.family-tree__report-row {
	display: flex;
	justify-content: flex-end;
}

.thread-note-list {
	display: grid;
	gap: 0.85rem;
}

.thread-note-row {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(260px, 0.8fr);
	gap: 1rem;
	align-items: start;
	padding: 0.9rem;
	border: 1px solid rgba(17, 17, 17, 0.12);
	border-radius: 8px;
	background: rgba(255, 255, 255, 0.5);
}

.thread-note-row__form {
	display: grid;
	gap: 0.55rem;
}

.inline-form {
	display: inline;
}

html[data-theme='dark'] .profile-tab,
html[data-theme='dark'] .thread-note-row,
html[data-theme='dark'] .character-file__portrait {
	background: rgba(234, 230, 223, 0.08);
	border-color: rgba(234, 230, 223, 0.22);
}

.button--notification {
	min-height: 1.9rem;
	padding: 0.32rem 0.62rem;
	font-size: 0.76rem;
	background: rgba(11, 31, 58, 0.94);
	color: #fff;
}

.confirm-toast--visible {
	opacity: 1;
	transform: translateY(0);
}

.profile-avatar-large,
.character-avatar {
	width: 6rem;
	height: 6rem;
	border-radius: 14px;
	object-fit: cover;
	border: 1px solid rgba(17, 17, 17, 0.18);
	margin-bottom: 0.75rem;
}

.profile-choice-preview {
	display: flex;
	align-items: center;
	gap: 0.9rem;
	padding: 0.75rem 0.9rem;
	border-radius: 16px;
	border: 1px solid rgba(17, 17, 17, 0.12);
	background: rgba(255, 255, 255, 0.7);
}

.profile-choice-preview p {
	margin: 0;
	color: rgba(17, 17, 17, 0.78);
	line-height: 1.45;
}

.profile-choice-preview img {
	margin: 0;
	flex-shrink: 0;
}

.group-badge {
	display: inline-flex;
	align-items: center;
	padding: 0.25rem 0.7rem;
	border-radius: 999px;
	border: 1px solid rgba(17, 17, 17, 0.18);
	font-size: 0.8rem;
	font-weight: 700;
	line-height: 1.2;
	white-space: nowrap;
}

.group-badge-row {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	flex-wrap: wrap;
}

.assignment-mode-badge {
	display: inline-flex;
	align-items: center;
	padding: 0.2rem 0.55rem;
	border-radius: 999px;
	border: 1px solid rgba(17, 17, 17, 0.22);
	font-size: 0.72rem;
	font-weight: 700;
	line-height: 1.2;
	color: #fff;
}

.assignment-mode-badge--open {
	background: #1f6d42;
}

.assignment-mode-badge--closed {
	background: #7a1f1f;
}

.profile-detail-list {
	margin: 0;
	display: grid;
	gap: 0.75rem;
}

.profile-detail-item {
	padding: 0.65rem 0.8rem;
	border-radius: 12px;
	border: 1px solid rgba(17, 17, 17, 0.1);
	background: rgba(255, 255, 255, 0.65);
}

.profile-detail-item dt {
	font-weight: 700;
	margin: 0 0 0.2rem;
}

.profile-detail-item dd {
	margin: 0;
	color: rgba(17, 17, 17, 0.75);
	line-height: 1.5;
}

@media (max-width: 560px) {
	.profile-choice-preview {
		flex-direction: column;
		align-items: flex-start;
	}
}

.form-shell {
	display: grid;
	gap: 1rem;
}

.field {
	display: grid;
	gap: 0.45rem;
	font-weight: 700;
}

.family-relationship-only[hidden] {
	display: none;
}

.field-row-3 {
	display: grid;
	grid-template-columns: 1fr;
	gap: 1rem;
}

@media (min-width: 768px) {
	.field-row-3 {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

.field input,
.field select,
.field textarea {
	width: 100%;
	border: 1px solid rgba(17, 17, 17, 0.18);
	border-radius: 18px;
	padding: 0.85rem 1rem;
	font: inherit;
	background: rgba(255, 255, 255, 0.9);
}

.field select.select--compact-action {
	width: min(25%, 16rem);
	min-width: 11rem;
}

@media (max-width: 1100px) {
	.button--compact-action,
	.form-shell > .button.button--primary:not(.button--notification):not(.button--danger),
	.field select.select--compact-action {
		width: min(40%, 18rem);
		min-width: 10rem;
	}
}

@media (max-width: 820px) {
	.button--compact-action,
	.form-shell > .button.button--primary:not(.button--notification):not(.button--danger),
	.field select.select--compact-action {
		width: min(60%, 22rem);
		min-width: 0;
	}
}

@media (min-width: 768px) {
	.shoutbox-form__actions {
		grid-template-columns: minmax(0, 16rem) auto;
		align-items: end;
		column-gap: 0.9rem;
	}

	.shoutbox-form__actions .button--compact-action,
	.shoutbox-form__actions > .button.button--primary {
		margin-bottom: 0.2rem;
	}

	.compact-action-row {
		grid-template-columns: minmax(0, 16rem) auto;
		align-items: end;
		column-gap: 0.9rem;
	}

	.compact-action-row--buttons {
		grid-template-columns: auto auto;
		align-items: center;
	}

	.compact-action-row .button--compact-action,
	.compact-action-row > .button.button--primary {
		margin-bottom: 0.2rem;
	}
}

@media (max-width: 560px) {
	.button--compact-action,
	.form-shell > .button.button--primary:not(.button--notification):not(.button--danger),
	.field select.select--compact-action {
		width: 100%;
	}
}

.field textarea {
	resize: vertical;
}

.simple-editor-toolbar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.45rem;
	margin-bottom: 0.5rem;
}

.simple-editor-toolbar__selects {
	display: flex;
	gap: 0.45rem;
	width: 100%;
}

.simple-editor-button,
.simple-editor-color-select,
.simple-editor-font-select,
.simple-editor-highlight-select {
	border: 1px solid rgba(17, 17, 17, 0.2);
	background: rgba(255, 255, 255, 0.92);
	border-radius: 12px;
	padding: 0.35rem 0.55rem;
	font: inherit;
	font-weight: 700;
	color: rgba(17, 17, 17, 0.88);
}

.simple-editor-button {
	min-width: 2.25rem;
	cursor: pointer;
}

.simple-editor-toolbar__selects select {
	min-width: 0;
	flex: 1 1 0;
}

@media (max-width: 560px) {
	.simple-editor-toolbar__selects {
		flex-direction: column;
	}
}

.thread-form-head-row {
	display: grid;
	gap: 0.85rem;
}

@media (min-width: 768px) {
	.thread-form-head-row {
		grid-template-columns: minmax(0, 12rem) minmax(0, 1fr);
		align-items: end;
	}
}

.post-card__body .editor-code-block {
	margin: 0.75rem 0;
	padding: 0.7rem 0.8rem;
	background: rgba(17, 17, 17, 0.08);
	border: 1px solid rgba(17, 17, 17, 0.18);
	border-radius: 10px;
	overflow-x: auto;
}

.post-card__body .editor-code-block code {
	font-family: Consolas, 'Courier New', monospace;
	font-size: 0.88rem;
	line-height: 1.45;
	white-space: pre;
}

.post-card__body .text-font-default {
	font-family: inherit;
}

.post-card__body .text-font-typewriter {
	font-family: Consolas, 'Courier New', monospace;
}

.post-card__body .text-font-fancy {
	font-family: 'Palatino Linotype', 'Book Antiqua', Palatino, serif;
	font-style: italic;
}

.post-card__body .text-highlight-red {
	background: rgba(198, 40, 40, 0.24);
	padding: 0.04rem 0.2rem;
	border-radius: 4px;
}

.post-card__body .text-highlight-blue {
	background: rgba(30, 136, 229, 0.24);
	padding: 0.04rem 0.2rem;
	border-radius: 4px;
}

.post-card__body .text-highlight-green {
	background: rgba(46, 125, 50, 0.24);
	padding: 0.04rem 0.2rem;
	border-radius: 4px;
}

.post-card__body .text-highlight-gold {
	background: rgba(191, 137, 0, 0.24);
	padding: 0.04rem 0.2rem;
	border-radius: 4px;
}

.post-card__body .text-highlight-black {
	background: rgba(17, 17, 17, 0.26);
	color: #f5f5f5;
	padding: 0.04rem 0.2rem;
	border-radius: 4px;
}

.post-card__body .text-highlight-white {
	background: rgba(255, 255, 255, 0.75);
	padding: 0.04rem 0.2rem;
	border-radius: 4px;
}

.post-card__body .spoiler-block {
	margin: 0.65rem 0;
	padding: 0.45rem 0.65rem;
	border: 1px dashed rgba(17, 17, 17, 0.25);
	border-radius: 12px;
	background: rgba(255, 255, 255, 0.65);
}

.post-card__body .spoiler-block summary {
	cursor: pointer;
	font-weight: 700;
	user-select: none;
}

.post-card__body .spoiler-block[open] summary {
	margin-bottom: 0.45rem;
}

.post-card__body .text-color-red {
	color: #b22222;
}

.post-card__body .text-color-blue {
	color: #1f4e9c;
}

.post-card__body .text-color-green {
	color: #196f3d;
}

.post-card__body .text-color-gold {
	color: #b8860b;
}

.post-card__body .text-color-black {
	color: #111111;
}

.post-card__body .text-color-white {
	color: #ffffff;
	text-shadow: 0 0 2px rgba(17, 17, 17, 0.7);
}

.message-stack {
	width: min(1180px, calc(100% - 2rem));
	margin: 0 auto 1rem;
	display: grid;
	gap: 0.5rem;
}

.message {
	padding: 0.9rem 1rem;
	border-radius: 18px;
	background: rgba(15, 61, 46, 0.12);
	border: 1px solid rgba(15, 61, 46, 0.18);
	display: flex;
	align-items: center;
	gap: 0.6rem;
	opacity: 1;
	transform: translateY(0);
	transition: opacity 180ms ease, transform 180ms ease;
}

.message__text {
	flex: 1;
}

.message__close {
	border: 0;
	background: transparent;
	font: inherit;
	font-weight: 700;
	line-height: 1;
	cursor: pointer;
	padding: 0;
	margin-left: auto;
}

.message.is-dismissing {
	opacity: 0;
	transform: translateY(-4px);
}

.site-footer {
	padding: 1rem 1.25rem 1.3rem;
	border: 1px solid rgba(17, 17, 17, 0.12);
	border-radius: 28px 28px 0 0;
	background: var(--primary);
	color: var(--dark);
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 1rem;
	align-items: center;
}

.site-footer__online {
	display: grid;
	gap: 0.45rem;
	align-content: start;
}

.site-footer__links {
	display: flex;
	flex-direction: column;
	gap: 0.65rem;
	align-items: flex-start;
	font-size: 0.78rem;
}

.site-footer__links a {
	color: currentColor;
	text-decoration: underline;
	text-underline-offset: 0.16em;
}

.online-list {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	justify-content: flex-start;
	align-items: center;
}

@media (max-width: 820px) {
	.notification-dock {
		position: fixed;
		top: 0.75rem;
		right: 0.75rem;
		width: min(1180px, calc(100% - 2rem));
		margin: 0;
		max-height: none;
	}

	.notification-dock__list {
		max-height: 20rem;
	}

	.panel-grid {
		grid-template-columns: 1fr;
	}

	.hero {
		grid-template-columns: 1fr;
	}

	.site-header,
	.panel__header,
	.node-card__head,
	.post-card__header,
	.meta-row,
	.site-footer {
		align-items: flex-start;
		flex-direction: column;
	}
}

.breadcrumbs {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.4rem;
	margin-bottom: 0.8rem;
	font-size: 0.9rem;
	opacity: 0.9;
}

.breadcrumbs a {
	color: var(--secondary);
	text-decoration: underline;
}

.breadcrumbs a:hover,
.breadcrumbs a:focus-visible {
	color: var(--tertiary);
}
