html, body {
	height: 100%;
	margin: 0;
	padding: 0;
	overflow: hidden;
	font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

:root {
	--stift-panel-height: 132px;
	--handlings-top-gap: 135px;
	--uppdrag-max-height: 76vh;

	--panel-glass: rgba(236, 236, 238, 0.34);
	--panel-shadow: 0 6px 20px rgba(0, 0, 0, 0.22);

	--gold-border: #b89a57;
	--gold-bg-top: rgba(255,248,232,0.96);
	--gold-bg-bottom: rgba(236,224,191,0.92);
	--gold-bg-top-hover: rgba(255,250,239,0.98);
	--gold-bg-bottom-hover: rgba(232,217,176,0.95);
	--gold-text: #2b2418;

	--z-map: 1;
	--z-leaflet: 800;
	--z-map-buttons: 901;
	--z-uppdrag: 904;
	--z-news-button: 905;
	--z-vision-button: 907;
	--z-map-search: 906;
	--z-mobile-backdrop: 920;
	--z-handlingsfalt: 940;
	--z-stift-panel: 941;
	--z-logo: 950;

	--z-diocese-modal: 959;
	--z-stift-info-modal: 960;
	--z-menu-modal: 961;
	--z-news-modal: 962;
	--z-vicar-modal: 963;
	--z-church-meeting-modal: 964;
	--z-vision-modal: 965;
	--z-confirm-modal: 970;
	--z-help-modal: 971;
	--z-map-modes-modal: 972;
	--z-invitation-modal: 980;
	--z-admin-modal: 981;
	--z-article-modal: 990;
	--z-fly-token: 992;
	--z-ripple: 998;
	--z-fake-cursor: 999;
	--z-toast: 2000;
}

/* =========================================================
   Pekare och egna scrollbars
   - fake-cursor-enabled döljer systempekaren.
   - JS lägger .custom-scrollbar direkt efter scrollelementet.
========================================================= */

body.fake-cursor-enabled,
body.fake-cursor-enabled * {
	cursor: none !important;
}


body.fake-cursor-enabled select,
body.fake-cursor-enabled input,
body.fake-cursor-enabled textarea,
body.fake-cursor-enabled button,
body.fake-cursor-enabled label,
body.fake-cursor-enabled option,
body.fake-cursor-enabled input::-webkit-calendar-picker-indicator,
body.fake-cursor-enabled input::-webkit-inner-spin-button,
body.fake-cursor-enabled input::-webkit-clear-button {
	cursor: none !important;
}

body.fake-cursor-enabled #handlingsfalt::-webkit-scrollbar,
body.fake-cursor-enabled #uppdrag_panel::-webkit-scrollbar,
body.fake-cursor-enabled #stift_panel::-webkit-scrollbar,
body.fake-cursor-enabled .uppdrag-list::-webkit-scrollbar,
body.fake-cursor-enabled .korstag-handlingsfalt::-webkit-scrollbar,
body.fake-cursor-enabled #handlingsfalt::-webkit-scrollbar-thumb,
body.fake-cursor-enabled #uppdrag_panel::-webkit-scrollbar-thumb,
body.fake-cursor-enabled #stift_panel::-webkit-scrollbar-thumb,
body.fake-cursor-enabled .uppdrag-list::-webkit-scrollbar-thumb,
body.fake-cursor-enabled .korstag-handlingsfalt::-webkit-scrollbar-thumb,
body.fake-cursor-enabled #handlingsfalt::-webkit-scrollbar-track,
body.fake-cursor-enabled #uppdrag_panel::-webkit-scrollbar-track,
body.fake-cursor-enabled #stift_panel::-webkit-scrollbar-track,
body.fake-cursor-enabled .uppdrag-list::-webkit-scrollbar-track,
body.fake-cursor-enabled .korstag-handlingsfalt::-webkit-scrollbar-track {
	cursor: none !important;
}

#handlingsfalt,
.uppdrag-list,
.diocese-modal-body,
.news-modal-body,
.vision-modal-body,
.news-article-modal-card,
.vicar-modal-body,
.church-meeting-modal-body,
.invitation-modal-body,
#admin_modal .help-modal-card,
#admin_modal_body,
.custom-dropdown-menu,
.admin-image-picker-card,
#account_modal_body {
	position: relative;
	scrollbar-width: none;
	-ms-overflow-style: none;
	-webkit-overflow-scrolling: touch;
	overscroll-behavior: contain;
}

#handlingsfalt::-webkit-scrollbar,
.uppdrag-list::-webkit-scrollbar,
.diocese-modal-body::-webkit-scrollbar,
.news-modal-body::-webkit-scrollbar,
.vision-modal-body::-webkit-scrollbar,
.news-article-modal-card::-webkit-scrollbar,
.vicar-modal-body::-webkit-scrollbar,
.church-meeting-modal-body::-webkit-scrollbar,
.invitation-modal-body::-webkit-scrollbar,
#admin_modal .help-modal-card::-webkit-scrollbar,
#admin_modal_body::-webkit-scrollbar,
.custom-dropdown-menu::-webkit-scrollbar,
.admin-image-picker-card::-webkit-scrollbar,
#account_modal_body::-webkit-scrollbar,
#uppdrag_panel::-webkit-scrollbar {
	width: 0;
	height: 0;
	display: none;
}

.custom-scrollbar {
	position: absolute;
	width: 6px;
	border-radius: 999px;
	background: rgba(255,255,255,0.06);
	z-index: 986;
	pointer-events: auto;
	opacity: 0;
	transition:
		opacity 0.18s ease,
		background-color 0.18s ease;
}

.custom-scrollbar-thumb {
	position: absolute;
	left: 0;
	width: 100%;
	border-radius: 999px;
	background: rgba(90,90,96,0.38);
	cursor: none !important;
	transition:
		background-color 0.15s ease,
		box-shadow 0.15s ease,
		opacity 0.15s ease;
}

.custom-scrollbar-thumb:hover,
.custom-scrollbar.is-hovered .custom-scrollbar-thumb {
	background: rgba(146, 124, 83, 0.72);
	box-shadow:
		0 0 0 1px rgba(184, 154, 87, 0.42),
		0 0 14px rgba(184, 154, 87, 0.30),
		0 0 24px rgba(184, 154, 87, 0.12);
}

#handlingsfalt:hover + .custom-scrollbar,
#handlingsfalt:focus-within + .custom-scrollbar,
#handlingsfalt.is-scroll-active + .custom-scrollbar,
.uppdrag-list:hover + .custom-scrollbar,
.uppdrag-list:focus-within + .custom-scrollbar,
.uppdrag-list.is-scroll-active + .custom-scrollbar,
.custom-scrollbar:hover,
.custom-scrollbar.is-hovered,
.vision-modal-body:hover + .custom-scrollbar,
.vision-modal-body:focus-within + .custom-scrollbar,
.vision-modal-body.is-scroll-active + .custom-scrollbar {
	opacity: 1;
}

body.fake-cursor-enabled .custom-scrollbar,
body.fake-cursor-enabled .custom-scrollbar-thumb {
	cursor: none !important;
}

#handlingsfalt + .custom-scrollbar,
.custom-scrollbar[data-side="left"] {
	left: 4px;
	right: auto;
}

body:not(.fake-cursor-enabled),
body:not(.fake-cursor-enabled) * {
	cursor: auto;
}

body:not(.fake-cursor-enabled) #fake-cursor {
	display: none !important;
}

#fake-cursor {
	position: fixed;
	left: 0;
	top: 0;
	width: 48px;
	height: 48px;
	pointer-events: none;
	z-index: var(--z-fake-cursor);
	overflow: visible;
	transition: opacity 0.08s ease;
}

#fake-cursor-img {
	position: absolute;
	width: 48px;
	height: 48px;
	object-fit: contain;
	left: -6px;
	top: -48px;
	transform-origin: 6px 48px;
	will-change: transform;
	user-select: none;
	-webkit-user-drag: none;
	pointer-events: none;
}

/* =========================================================
   Map / Leaflet
========================================================= */

#map {
	position: absolute;
	inset: 0;
	z-index: 1;
	cursor: move;
}

#map * {
	cursor: move;
}

.leaflet-control,
.leaflet-control-zoom,
.leaflet-right,
.leaflet-top {
	z-index: 800 !important;
}

.leaflet-tooltip-pane,
.leaflet-tooltip {
	z-index: 1200 !important;
}

.leaflet-control-attribution {
	display: none !important;
}

.click-ripple {
	position: fixed;
	left: 0;
	top: 0;
	width: 12px;
	height: 12px;
	margin-left: -6px;
	margin-top: -6px;
	border: 2px solid rgba(255, 215, 120, 0.8);
	border-radius: 50%;
	pointer-events: none;
	z-index: var(--z-ripple);
	animation: click-ripple 0.45s ease-out forwards;
}

@keyframes click-ripple {
	from {
		transform: scale(0.4);
		opacity: 0.9;
	}
	to {
		transform: scale(3.2);
		opacity: 0;
	}
}

/* =========================================================
   Shared hidden when logged out
========================================================= */

body.logged-out #stift_panel,
body.logged-out #uppdrag_panel {
	display: none !important;
}

/* =========================================================
   Logo
========================================================= */

#logo_panel {
	position: absolute;
	top: 10px;
	left: 10px;
	z-index: 950;
	pointer-events: none;
}

#logo_panel img {
	display: block;
	width: 300px;
	max-width: 28vw;
	height: auto;
	padding-left: 10px;
}

/* =========================================================
   Handlingsfält
========================================================= */

#handlingsfalt {
	position: absolute;
	left: 0;
	top: var(--handlings-top-gap);
	bottom: var(--stift-panel-height);
	width: 330px;
	padding: 14px;
	box-sizing: border-box;
	overflow-y: auto;
	z-index: 940;
	background: var(--panel-glass);
	backdrop-filter: blur(4px);
	box-shadow: 2px 0 14px rgba(0, 0, 0, 0.10);
	border-top: 1px solid rgba(255,255,255,0.45);
	border-right: 1px solid rgba(120,120,126,0.32);
	border-bottom: 1px solid rgba(120,120,126,0.22);
	border-top-right-radius: 18px;
	direction: rtl;
}

body.logged-out #handlingsfalt {
	bottom: auto;
	height: auto;
	max-height: none;
	overflow: visible;
	border-bottom-right-radius: 18px;
}

body.logged-in #handlingsfalt {
	border-bottom-right-radius: 0;
}

.korstag-handlingsfalt > * {
	direction: ltr;
}

.korstag-handlingsfalt::-webkit-scrollbar {
	width: 10px;
}

.korstag-handlingsfalt::-webkit-scrollbar-track {
	background: rgba(255,255,255,0.08);
}

.korstag-handlingsfalt::-webkit-scrollbar-thumb {
	background: rgba(90,90,96,0.38);
	border-radius: 999px;
}

.korstag-handlingsfalt::-webkit-scrollbar-thumb:hover {
	background: rgba(90,90,96,0.54);
}

/* =========================================================
   Login
========================================================= */

#login_form input {
	height: 28px;
	border-radius: 10px;
	background: rgba(255,255,255,0.2);
	margin: 5px 0;
}

#login_form button {
	width: 100%;
	margin: 10px 0;
}

/* =========================================================
   Kartknappar
========================================================= */

.korstag-kartknappar {
	position: absolute;
	right: 12px;
	bottom: 12px;
	display: flex;
	gap: 8px;
	z-index: 901;
}

.korstag-kartknappar button {
	width: 42px;
	height: 42px;
	border-radius: 10px;
	border: 1px solid #888;
	background: rgba(255, 255, 255, 0.94);
	font-size: 18px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
}

.korstag-kartknappar button.active-mode {
	background: rgba(80, 80, 80, 0.96) !important;
	color: #fff;
	border-color: #3a3a3a !important;
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

/* =========================================================
   Stiftspanel
========================================================= */

#stift_panel {
	position: fixed;
	left: 0;
	bottom: 0;
	width: 430px;
	height: var(--stift-panel-height);
	min-height: var(--stift-panel-height);
	max-height: var(--stift-panel-height);
	border-radius: 0 18px 0 0;
	padding: 14px 16px 12px;
	box-sizing: border-box;
	overflow: hidden;
	z-index: 941;
	box-shadow: 0 -4px 18px rgba(0, 0, 0, 0.22);
	color: #fff;
}

.stift-panel-title-row {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 10px;
}

.stift-panel-title-wrap {
	min-width: 0;
	flex: 1 1 auto;
}

.stift-panel-title {
	font-size: 1.15rem;
	font-weight: 700;
	margin-bottom: 2px;
	line-height: 1.2;
	display: flex;
	align-items: baseline;
	gap: 6px;
	min-width: 0;
}

.stift-panel-subtitle {
	font-size: 0.72em;
	font-weight: 500;
	opacity: 0.88;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	min-width: 0;
	max-width: 100%;
	display: inline-block;
	vertical-align: baseline;
}

.stift-panel-stats {
	font-size: 0.96rem;
	line-height: 1.35;
	opacity: 0.96;
	margin-top: 2px;
}

.stift-panel-actions {
	margin-top: 10px;
	display: flex;
	gap: 8px;
	flex-wrap: nowrap;
	align-items: center;
}

/* =========================================================
   Uppdragspanel
========================================================= */

#uppdrag_panel {
	position: fixed;
	right: 0;
	top: 50%;
	transform: translateY(-50%);
	width: 58px;
	min-height: 116px;
	max-height: var(--uppdrag-max-height);
	padding: 10px 0 10px 10px;
	box-sizing: border-box;
	overflow: hidden;
	border-radius: 18px 0 0 18px;
	background: var(--panel-glass);
	backdrop-filter: blur(4px);
	box-shadow: var(--panel-shadow);
	z-index: 904;
	transition: width 0.22s ease, top 0.12s ease;
	display: flex;
	flex-direction: column;
	justify-content: center;
}

#uppdrag_panel.expanded {
	width: 330px;
}

#uppdrag_panel_inner {
	min-width: 304px;
	display: flex;
	flex-direction: column;
}

.uppdrag-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 8px;
}

.uppdrag-title {
	font-size: 1rem;
	font-weight: 700;
}

.uppdrag-summary {
	margin-top: 10px;
	font-size: 0.92rem;
	line-height: 1.4;
	display: inline-flex;
	gap: 10px;
}

.uppdrag-list {
	margin-top: 10px;
	padding-right: 14px;
	display: flex;
	flex-direction: column;
	gap: 8px;
	overflow-y: auto;
	max-height: calc(var(--uppdrag-max-height) - 130px);
}

.uppdrag-footer {
	margin-top: 10px;
	padding-right: 22px;
	display: flex;
	gap: 8px;
	align-items: center;
	justify-content: flex-end;
}

#uppdrag-toggle-btn {
	margin-right: auto;
	min-width: 34px;
	width: 34px;
	height: 34px;
	padding: 0 !important;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-weight: 700;
}

/* =========================================================
   Cards / sections
========================================================= */

.parish-card {
	margin-top: 10px;
	padding: 12px;
	border-radius: 12px;
	border: 1px solid rgba(255, 255, 255, 0.35);
	background: rgba(35, 35, 35, 0.32);
	color: #fff;
}

.parish-card.own-parish {
	border: 2px solid #222;
}

.parish-card h2 {
	margin: 0 0 6px;
	font-size: 1.1rem;
}

.parish-meta {
	line-height: 1.45;
	font-size: 0.95rem;
}

.stift-line {
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.visitation-block {
	margin-top: 8px;
}

.rorelse {
	border: 1px solid;
	border-radius: 10px;
	padding: 0 5px;
	background: rgba(255,255,255,0.1);
}

.action-group {
	margin-top: 10px;
	padding: 10px;
	border-radius: 10px;
	border: 1px solid rgba(255, 255, 255, 0.22);
	background: rgba(35, 35, 35, 0.24);
	color: #fff;
}

.action-group h4 {
	margin: 0 0 8px;
	font-size: 0.95rem;
}

.action-list {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.action-item {
	display: flex;
	align-items: center;
	gap: 6px;
}

.action-item > button:not(.help-btn),
.action-item > select {
	flex: 1 1 auto;
}

/* =========================================================
   Invitations / orders
========================================================= */

.invitation-list {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.invitation-item {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 8px;
	background: rgba(255, 255, 255, 0.14);
	border-radius: 8px;
	padding: 8px;
}

.invitation-title {
	line-height: 1.25;
	font-size: 0.92rem;
	width: calc(100% - 110px);
}

.invitation-actions {
	display: flex;
	align-items: center;
	gap: 6px;
	flex-shrink: 0;
	position: static;
	right: auto;
}

.pending-item {
	position: relative;
	background: rgba(255, 255, 255, 0.98);
	color: #111;
	border: 1px solid #d4d4d4;
	border-radius: 9px;
	padding: 7px 28px 6px 9px;
	min-height: 40px;
}

.pending-item strong {
	display: block;
	font-size: 0.92rem;
	line-height: 1.12;
}

.pending-item .meta {
	font-size: 0.82rem;
	color: #555;
	margin-top: 2px;
	line-height: 1.1;
}

.pending-item .remove-order-btn {
	position: absolute;
	top: 4px;
	right: 5px;
	border: none;
	background: transparent;
	color: #922;
	font-size: 15px;
	line-height: 1;
	padding: 2px 4px;
}

/* Osparade uppdrag */

#uppdrag_panel.has-unsaved-orders {
	border-left: 2px solid rgba(198, 164, 92, 0.95);
	box-shadow:
		var(--panel-shadow),
		0 0 0 2px rgba(198, 164, 92, 0.22),
		0 0 26px rgba(198, 164, 92, 0.28);
}

#uppdrag_panel.has-unsaved-orders:not(.expanded)::before {
	content: "!";
	position: absolute;
	top: 8px;
	left: 8px;
	width: 20px;
	height: 20px;
	border-radius: 999px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #b66a16;
	color: #fff8e6;
	font-size: 13px;
	font-weight: 800;
	box-shadow: 0 2px 8px rgba(0,0,0,0.28);
}

.uppdrag-title {
	display: flex;
	align-items: center;
	gap: 8px;
}

.uppdrag-unsaved-badge {
	display: inline-flex;
	align-items: center;
	border-radius: 999px;
	padding: 3px 7px;
	font-size: 0.72rem;
	line-height: 1;
	font-weight: 800;
	color: #fff7df;
	background: rgba(178, 94, 20, 0.94);
	border: 1px solid rgba(255,255,255,0.38);
	box-shadow: 0 1px 5px rgba(0,0,0,0.22);
}

.uppdrag-unsaved-notice {
	margin-top: 9px;
	padding: 8px 10px;
	border-radius: 10px;
	background: rgba(255, 243, 205, 0.94);
	color: #3a2b12;
	border: 1px solid rgba(178, 122, 30, 0.45);
	font-size: 0.86rem;
	line-height: 1.32;
	box-shadow: 0 2px 8px rgba(0,0,0,0.16);
}

.pending-item.is-unsaved {
	border-color: rgba(190, 120, 24, 0.72);
	box-shadow:
		0 0 0 1px rgba(190, 120, 24, 0.20),
		0 2px 10px rgba(0,0,0,0.12);
}

#save-orders-btn.needs-save {
	background: linear-gradient(to bottom, #fff1bf, #d09331);
	border-color: rgba(142, 82, 14, 0.9);
	color: #221609;
	font-weight: 800;
	animation: mitran-save-pulse 1.7s ease-in-out infinite;
}

@keyframes mitran-save-pulse {
	0%, 100% {
		box-shadow:
			0 0 0 0 rgba(208, 147, 49, 0.36),
			0 2px 8px rgba(0,0,0,0.18);
	}

	50% {
		box-shadow:
			0 0 0 5px rgba(208, 147, 49, 0.10),
			0 4px 14px rgba(0,0,0,0.22);
	}
}

/* =========================================================
   Pills / muted
========================================================= */

.stat-pill {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	border-radius: 999px;
	padding: 4px 8px;
	border: 1px solid rgba(255,255,255,0.18);
	font-size: 0.88rem;
	line-height: 1;
	white-space: nowrap;
	color: #f3ead2;
	background: rgba(255,255,255,0.08);
	box-shadow:
		inset 0 1px 0 rgba(255,255,255,0.05),
		0 1px 2px rgba(0,0,0,0.22);
}

.stat-pill-group {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-top: 8px;
}

.stat-pill::before {
	content: "";
	width: 18px;
	height: 18px;
	flex: 0 0 18px;
	background-repeat: no-repeat;
	background-position: center;
	background-size: contain;
}

.stat-pill--folk::before {
  background-image: url('/img/ikoner/folk.png');
}

.stat-pill--from::before {
  background-image: url('/img/ikoner/from.png');
}

.stat-pill--lit::before {
  background-image: url('/img/ikoner/lit.png');
}

.stat-pill--stabilitet::before {
  background-image: url('/img/ikoner/stab.png');
}

.stat-pill--forsamlingar::before {
  background-image: url('/img/ikoner/forsamling.png');
}

.stat-pill--praster::before {
  background-image: url('/img/ikoner/pr.png');
}

.stat-pill--kyrkor::before {
  background-image: url('/img/ikoner/ky.png');
}

.stat-pill--tillhoriga::before {
  background-image: url('/img/ikoner/me.png');
}
/* Använd prästikonen, men med plustecken som genereras efteråt */
.adjunkt-pill::before {
  background-image: url('/img/ikoner/pr.png');
}

.stat-pill--folk::before,
.stat-pill--from::before,
.stat-pill--lit::before,
.stat-pill--stabilitet::before,
.stat-pill--kyrkor::before,
.stat-pill--praster::before,
.stat-pill--tillhoriga::before,
.stat-pill--forsamlingar::before,
.stat-pill--adjunkter::before {
  filter: drop-shadow(0 0 2px rgba(255,255,255,0.08));
}

.stat-pill--folk {
  background-color: rgba(78, 124, 78, 0.26);
  border-color: rgba(124, 176, 124, 0.34);
}

.stat-pill--from {
  background-color: rgba(132, 62, 62, 0.26);
  border-color: rgba(182, 96, 96, 0.34);
}

.stat-pill--lit {
  background-color: rgba(148, 122, 52, 0.26);
  border-color: rgba(205, 172, 78, 0.34);
}

.stat-pill--stabilitet {
  background-color: rgba(66, 92, 132, 0.26);
  border-color: rgba(100, 132, 186, 0.34);
}

.stat-pill--kyrkor {
  background-color: rgba(82, 108, 86, 0.26);
  border-color: rgba(118, 150, 122, 0.34);
}

.stat-pill--praster {
  background-color: rgba(88, 98, 114, 0.26);
  border-color: rgba(130, 142, 164, 0.34);
}

.stat-pill--tillhoriga,
.stat-pill--medlemmar {
  background-color: rgba(136, 98, 62, 0.26);
  border-color: rgba(181, 132, 84, 0.34);
}

.stat-pill--forsamlingar {
  background-color: rgba(110, 96, 78, 0.20);
  border-color: rgba(154, 136, 110, 0.34);
}

.stat-pill--adjunkter {
  background-color: rgba(120, 110, 84, 0.26);
  border-color: rgba(178, 160, 118, 0.34);
}

.adjunkt-pill.prominent {
	font-weight: 700;
	background: rgba(255,255,255,0.24);
	border: 1px solid rgba(255,255,255,0.5);
	box-shadow: inset 0 1px 0 rgba(255,255,255,0.25);
}

.adjunkt-pill.prominent.flash-plus {
	box-shadow: 0 0 0 3px rgba(100,255,140,0.75), 0 0 18px rgba(100,255,140,0.6);
	background: rgba(120,255,150,0.32);
	transform: scale(1.1);
}

.adjunkt-pill.prominent.flash-minus {
	box-shadow: 0 0 0 3px rgba(255,120,120,0.75), 0 0 18px rgba(255,120,120,0.6);
	background: rgba(255,120,120,0.28);
	transform: scale(1.1);
}

.muted {
	color: rgba(255, 255, 255, 0.85);
	font-size: 0.86rem;
}

.uppdrag-empty {
	color: #666;
}

/* =========================================================
   Toasts
========================================================= */

#toast_container {
	position: fixed;
	top: 14px;
	right: 14px;
	z-index: var(--z-toast);
	display: flex;
	flex-direction: column;
	gap: 8px;
	pointer-events: none;
}

.toast {
	min-width: 240px;
	max-width: 360px;
	padding: 10px 12px;
	border-radius: 10px;
	color: #fff;
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.24);
	opacity: 0;
	transform: translateY(-8px);
	transition: opacity 0.25s ease, transform 0.25s ease;
}

.toast.show {
	opacity: 1;
	transform: translateY(0);
}

.toast.success {
	background: rgba(70, 150, 20, 0.95);
}
.toast.info {
	background: rgba(45, 91, 177, 0.95);
}

.toast.error {
	background: rgba(170, 45, 45, 0.96);
}

.toast.warn {
	background: rgba(186, 120, 24, 0.96);
}

.toast.fade-out {
	opacity: 0;
	transform: translateY(-6px);
}

/* =========================================================
   Buttons / inputs
========================================================= */

button, button *, .stat-pill, a {
	cursor: pointer !important;
}

button[aria-disabled="true"],
.is-soft-locked {
	opacity: .55;
	cursor: not-allowed;
	filter: grayscale(.2);
}

button[aria-disabled="true"]:hover,
.is-soft-locked:hover {
	transform: none;
}

button,
select,
textarea {
	transition:
		background-color 0.15s ease,
		border-color 0.15s ease,
		transform 0.06s ease,
		box-shadow 0.15s ease,
		opacity 0.15s ease;
}

button:not(.help-btn):not(.news-sort-btn):not(.news-diocese-link):not(.news-parish-link):not(.map-search-result),
select {
	border-radius: 9px;
	border: 1px solid var(--gold-border);
	background: linear-gradient(to bottom, var(--gold-bg-top), var(--gold-bg-bottom));
	color: var(--gold-text);
	padding: 7px 10px;
	font: inherit;
	line-height: 1.2;
	box-shadow:
		inset 0 1px 0 rgba(255,255,255,0.7),
		0 1px 2px rgba(0,0,0,0.08);
}

button:not(.help-btn):not(.news-sort-btn):not(.news-diocese-link):not(.news-parish-link):hover,
select:hover {
	border-color: #9f7f38;
	background: linear-gradient(to bottom, var(--gold-bg-top-hover), var(--gold-bg-bottom-hover));
}

button:not(.help-btn):not(.news-sort-btn):not(.news-diocese-link):not(.news-parish-link):active {
	transform: translateY(1px);
}

button:disabled,
select:disabled {
	opacity: 0.45;
	filter: grayscale(0.15);
}

textarea {
	border-radius: 10px;
	border: 1px solid #bbb;
	background: #fff;
	color: #222;
	font: inherit;
	padding: 8px 10px;
	box-sizing: border-box;
}

/* =========================================================
   Help / links / menu
========================================================= */

.help-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 20px;
	height: 20px;
	min-width: 20px;
	padding: 0;
	margin-left: 2px;
	border-radius: 999px;
	border: 1px solid rgba(255, 255, 255, 0.38);
	background: rgba(255, 255, 255, 0.14);
	color: rgba(255, 255, 255, 0.92);
	font-size: 11px;
	font-weight: 700;
	line-height: 1;
	box-shadow: none;
	vertical-align: middle;
}

.help-btn:hover {
	background: rgba(255, 255, 255, 0.24);
	border-color: rgba(255, 255, 255, 0.52);
}

.help-btn:focus {
	outline: none;
	box-shadow: 0 0 0 2px rgba(255,255,255,0.22);
}

.stift-link {
	color: inherit;
	text-decoration: underline;
	text-underline-offset: 2px;
}

.menu-btn {
	width: 80px;
	height: 34px;
	min-width: 34px;
	padding: 0 !important;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 16px;
}

/* =========================================================
   Modals
========================================================= */

#diocese_modal,
#help_modal,
#vicar_modal,
#church_meeting_modal,
#confirm_modal,
#news_modal,
#vision_modal,
#stift_info_modal,
#menu_modal {
	position: fixed;
	inset: 0;
	display: none !important;
	pointer-events: none !important;
	visibility: hidden;
}

#diocese_modal.open,
#help_modal.open,
#vicar_modal.open,
#church_meeting_modal.open,
#confirm_modal.open,
#news_modal.open,
#vision_modal.open,
#stift_info_modal.open,
#menu_modal.open {
	display: block !important;
	pointer-events: auto !important;
	visibility: visible;
}

#diocese_modal { z-index: var(--z-diocese-modal); }
#stift_info_modal { z-index: var(--z-stift-info-modal); }
#menu_modal { z-index: var(--z-menu-modal); }
#news_modal { z-index: var(--z-news-modal); }
#vision_modal { z-index: var(--z-vision-modal); }
#vicar_modal { z-index: var(--z-vicar-modal); }
#church_meeting_modal { z-index: var(--z-church-meeting-modal); }
#confirm_modal { z-index: var(--z-confirm-modal); }
#help_modal { z-index: var(--z-help-modal); }

.diocese-modal-backdrop,
.help-modal-backdrop,
.vicar-modal-backdrop,
.church-meeting-modal-backdrop,
.news-modal-backdrop,
.vision-modal-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.45);
	pointer-events: auto;
}

.diocese-modal-card,
.help-modal-card,
.vicar-modal-card,
.church-meeting-modal-card,
.news-modal-card {
	position: absolute;
	left: 50%;
	background: rgba(248, 248, 250, 0.97);
	border-radius: 18px;
	box-shadow: 0 12px 32px rgba(0, 0, 0, 0.28);
	overflow: hidden;
}

.diocese-modal-card,
.help-modal-card,
.vicar-modal-card,
.church-meeting-modal-card {
	top: 50%;
	transform: translate(-50%, -50%);
}

.news-modal-card {
	top: 10%;
	bottom: 10%;
	transform: translateX(-50%);
	width: min(900px, calc(100vw - 40px));
	max-height: calc(100vh - 60px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
	background: rgba(249, 247, 240, 0.98);
}

.diocese-modal-card {
	width: min(760px, calc(100vw - 40px));
	max-height: calc(100vh - 60px);
}

.help-modal-card,
.vicar-modal-card,
.church-meeting-modal-card {
	width: min(520px, calc(100vw - 40px));
}

.diocese-modal-header,
.help-modal-header,
.vicar-modal-header,
.church-meeting-modal-header,
.news-modal-header {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 16px 18px;
	border-bottom: 1px solid #d6d6d6;
}

.news-modal-header {
	border-bottom: 1px solid #d6c9a9;
	justify-content: space-between;
}

.diocese-modal-header h2,
.help-modal-header h2,
.vicar-modal-header h2,
.church-meeting-modal-header h2,
.news-modal-header h2 {
	margin: 0;
	font-size: 1.15rem;
}

.diocese-modal-header button,
.help-modal-header button,
.vicar-modal-header button,
.church-meeting-modal-header button,
.news-modal-header button {
	border: 1px solid #999;
	background: #fff;
	border-radius: 8px;
	padding: 6px 10px;
	font: inherit;
}

.diocese-modal-body,
.news-modal-body {
	padding: 16px 18px 18px;
	overflow-y: auto;
}

.diocese-modal-body {
	max-height: calc(100vh - 140px);
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 12px;
}

.help-modal-body,
.vicar-modal-body,
.church-meeting-modal-body {
	padding: 18px;
	line-height: 1.5;
	color: #333;
}

.news-modal-body {
	max-height: calc(100vh - 140px);
	font-family: Georgia, serif;
	font-size: 1.05rem;
	line-height: 1.55;
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
	padding-bottom: 18px;
    scroll-padding-bottom: 48px;
}

.close-btn {
	position: absolute;
	right: 10px;
}
/* =========================================================
	Invitation modal
========================================================= */
#invitation_modal {
	display: none;
	position: fixed;
	inset: 0;
	z-index: var(--z-invitation-modal);
}

#invitation_modal.open {
	display: block;
}

.invitation-modal-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(24, 18, 10, .46);
	backdrop-filter: blur(2px);
}

.invitation-modal-card {
	position: absolute;
	left: 50%;
	top: 50%;
	transform: translate(-50%, -50%);
	width: min(620px, calc(100vw - 28px));
	max-height: min(86vh, 760px);
	overflow: auto;
	background: #fffaf0;
	border: 1px solid rgba(90, 70, 35, .35);
	border-radius: 22px;
	padding: 18px;
	box-shadow: 0 28px 80px rgba(0,0,0,.32);
	color: #2c2418;
}

.invitation-modal-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 12px;
	margin-bottom: 12px;
}

.invitation-modal-body {
	white-space: pre-wrap;
	font-family: Georgia, serif;
	font-size: 1.02rem;
	line-height: 1.55;
}

.invitation-modal-actions {
	display: flex;
	justify-content: flex-end;
	margin-top: 16px;
}

/* =========================================================
   Diocese / vicar / meeting modal content
========================================================= */

.diocese-action-card {
	background: #fff;
	border: 1px solid #d8d8d8;
	border-radius: 12px;
	padding: 12px;
	overflow: visible;
}

.diocese-action-card h3 {
	margin: 0 0 8px;
	font-size: 1rem;
}

.diocese-inline-help {
	margin: 0 0 10px;
	font-size: 0.9rem;
	line-height: 1.4;
	color: #555;
}

.diocese-action-card p {
	margin: 0 0 10px;
	font-size: 0.92rem;
	line-height: 1.35;
	color: #444;
}

.diocese-action-card select {
	width: 100%;
	margin-top: 8px;
}

.diocese-action-card-actions {
	display: inline-block;
	direction: rtl;
	align-items: center;
}

.diocese-action-card .custom-dropdown {
	width: 97%;
	display: inline-block;
}

.diocese-action-card .field {
	width: 80%;
	display: inline-block;
}

#rename-diocese-input {
	width: 100%;
	height: 27px;
	border-radius: 10px;
}

.vicar-choice-list {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.vicar-choice-item {
	display: grid;
	grid-template-columns: 1fr auto;
	gap: 8px;
	align-items: center;
	padding: 10px;
	border: 1px solid #ddd;
	border-radius: 10px;
	background: #fff;
}

.vicar-choice-item.candidate-taken {
	opacity: 0.6;
}

.vicar-choice-text span {
	color: #555;
	font-size: 0.92rem;
}

.church-meeting-form {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.church-meeting-form label {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.church-meeting-actions {
	display: flex;
	justify-content: flex-end;
	gap: 8px;
}

/* =========================================================
   KT Nyheter knapp 
========================================================= */

.news-button {
	position: fixed;
	left: 446px;
	bottom: 12px;
	z-index: var(--z-news-button);
	display: block;
	width: 100px;
	height: 100px;
	padding: 0 !important;
	border-radius: 20px !important;
	border: 1px solid var(--gold-border);
	background: linear-gradient(to bottom, var(--gold-bg-top), var(--gold-bg-bottom));
	color: var(--gold-text);
	box-shadow:
		inset 0 1px 0 rgba(255,255,255,0.7),
		0 2px 6px rgba(0,0,0,0.12);
}

.news-button-icon {
	position: relative;
	transform: translateY(-50%) translateX(-50%);
	width: 100px;
	height: 100px;
	top: 50%;
	left: 50%;
	background-repeat: no-repeat;
	background-size: 100px 100px;
	background-image: url('/img/ikoner/KT.png');
}

/* Extra placering av stängknappen i nyhetsmodalen. */
#close-news-modal-btn {
	top: 15px;
}

/* =========================================================
   Nyheter tabs
========================================================= */

.news-tabs {
	display: flex;
	flex: 1 1 auto;
	min-width: 0;
	max-width: 100%;
	gap: 8px;
	align-items: center;
	justify-content: flex-start;
	margin: 0 46px 0 12px;

	overflow-x: auto;
	overflow-y: hidden;
	-webkit-overflow-scrolling: touch;
	overscroll-behavior-x: contain;
	scrollbar-width: none;
	touch-action: pan-x;
}

.news-tabs::-webkit-scrollbar {
	display: none;
	width: 0;
	height: 0;
}

.news-tab-btn {
	flex: 0 0 auto;
	white-space: nowrap;
	border-radius: 10px 10px 0 0;
	padding: 7px 10px;
}

.news-tab-btn.active {
	background: rgba(255,255,255,0.92) !important;
	border-bottom-color: transparent !important;
}

/* =========================================================
   issue layout
========================================================= */

.news-issue {
	margin-bottom: 26px;
}

.news-issue-masthead {
	margin: 18px 0 14px;
	padding: 12px 10px;
	text-align: center;
	border-top: 3px double rgba(70, 50, 25, .45);
	border-bottom: 3px double rgba(70, 50, 25, .45);
	background: rgba(255, 250, 239, .72);
}

.news-issue-kicker {
	font-family: Georgia, serif;
	text-transform: uppercase;
	letter-spacing: .18em;
	font-size: .72rem;
	opacity: .72;
}

.news-issue-masthead h2 {
	margin: 2px 0 0;
	font-family: Georgia, serif;
	font-size: 1.55rem;
}

/* =========================================================
   Nyhetskort
========================================================= */

.news-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
	gap: 12px;
}

.news-card {
	min-height: 132px;
	border-radius: 14px;
	background: rgba(255, 253, 246, .94);
	border: 1px solid rgba(90, 70, 35, .18);
	box-shadow: 0 8px 22px rgba(0,0,0,.08);
	cursor: pointer;
	transition: transform .12s ease, box-shadow .12s ease;
	color: #2b2418;
	overflow: hidden;
	padding: 0;
}
.news-card-content {
	padding: 0.95rem 1rem 1.05rem;
}
.news-card-image {
	width: 100%;
	height: 118px;
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
	border-bottom: 1px solid rgba(120, 90, 40, 0.18);
	position: relative;
}

.news-card.featured .news-card-image {
	height: 170px;
}

.news-card-image::after {
	content: "";
	position: absolute;
	inset: 0;
	background:
		linear-gradient(
			to bottom,
			rgba(255, 255, 255, 0.02),
			rgba(0, 0, 0, 0.16)
		);
	pointer-events: none;
}

.news-card-image.has-real-image {
	background: none;
}

.news-card-image.has-real-image img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.news-card:hover {
	transform: translateY(-2px);
	box-shadow: 0 12px 28px rgba(0,0,0,.14);
}

.news-card.featured {
	grid-column: span 2;
	min-height: 190px;
}

.news-card-kicker {
	font-size: .72rem;
	text-transform: uppercase;
	letter-spacing: .08em;
	opacity: .65;
	margin-bottom: 6px;
}

.news-card h3 {
	font-family: Georgia, serif;
	font-size: 1.08rem;
	line-height: 1.1;
	margin: 0 0 8px;
}

.news-card.featured h3 {
	font-size: 1.45rem;
}

.news-card-preview {
	margin: 0;
	font-size: .88rem;
	line-height: 1.35;
	max-height: 4.1em;
	overflow: hidden;
	color: rgba(42, 32, 20, .82);
}

/* =========================================================
   enskilda nyheter popup
========================================================= */

.news-article-modal {
	display: none;
	position: fixed;
	inset: 0;
	z-index: var(--z-article-modal);
}

.news-article-modal.open {
	display: block;
}

.news-article-modal-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(24, 18, 10, .38);
	backdrop-filter: blur(2px);
}

.news-article-modal-card {
	position: absolute;
	left: 50%;
	top: 50%;
	transform: translate(-50%, -50%);
	width: min(620px, calc(100vw - 32px));
    max-height: calc(100dvh - 32px);
	overflow: auto;
	background: #fffaf0;
	border: 1px solid rgba(90, 70, 35, .38);
	border-radius: 20px;
	padding: 18px 20px 22px;
    padding-bottom: max(32px, env(safe-area-inset-bottom));
	box-shadow: 0 26px 75px rgba(0,0,0,.32);
	color: #2c2418;
}

.news-article-modal-close {
	position: absolute;
	top: 10px;
	right: 12px;
	border: 0;
	background: transparent;
	font-size: 1.35rem;
	cursor: pointer;
	z-index: 2;
}

.news-article-modal-meta {
	font-size: .78rem;
	text-transform: uppercase;
	letter-spacing: .08em;
	opacity: .62;
	margin-bottom: 8px;
}

.news-article-modal-card h2 {
	font-family: Georgia, serif;
	font-size: 1.7rem;
	line-height: 1.1;
	margin: 0 32px 12px 0;
}

.news-article-modal-body {
	font-family: Georgia, serif;
	font-size: 1.04rem;
	line-height: 1.58;
	white-space: pre-wrap;
}

.news-article-modal-image {
	height: 300px;
	border-radius: 14px;
	margin: 0 0 14px;
	border: 1px solid rgba(90, 70, 35, .2);
	background-size: cover !important;
	background-position: center;
}
.news-article-modal-image.has-real-image {
	height: 300px;
	padding: 0;
	background: none;
	overflow: hidden;
}

.news-article-modal-image.has-real-image img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.news-img-meeting {
	background:
		linear-gradient(135deg, rgba(78,55,31,.55), rgba(245,224,165,.45)),
		radial-gradient(circle at 30% 45%, rgba(255,250,220,.75), transparent 20%),
		linear-gradient(90deg, rgba(70,50,30,.35), rgba(130,90,45,.25));
}

.news-img-map {
	background:
		linear-gradient(135deg, rgba(70,92,74,.45), rgba(236,220,170,.52)),
		radial-gradient(circle at 25% 45%, rgba(80,120,80,.55), transparent 20%),
		radial-gradient(circle at 70% 35%, rgba(140,100,55,.45), transparent 18%);
}

.news-img-pilgrim {
	background:
		linear-gradient(135deg, rgba(82,75,55,.5), rgba(245,235,190,.5)),
		linear-gradient(25deg, transparent 45%, rgba(80,55,35,.45) 46%, transparent 49%);
}

.news-img-media {
	background:
		linear-gradient(135deg, rgba(45,55,75,.55), rgba(240,225,180,.45)),
		repeating-linear-gradient(0deg, rgba(255,255,255,.18) 0 2px, transparent 2px 7px);
}

.news-img-church {
	background:
		linear-gradient(135deg, rgba(90,70,45,.55), rgba(250,235,190,.55)),
		radial-gradient(circle at 50% 20%, rgba(255,255,230,.8), transparent 16%);
}

.news-img-clergy {
	background:
		linear-gradient(135deg, rgba(60,63,68,.58), rgba(240,226,190,.45)),
		radial-gradient(circle at 50% 35%, rgba(255,255,245,.75), transparent 17%);
}

.news-img-letter {
	background:
		linear-gradient(135deg, rgba(126,96,54,.52), rgba(255,242,200,.5)),
		repeating-linear-gradient(135deg, rgba(255,255,255,.28) 0 3px, transparent 3px 11px);
}


/* ===============================================
   nyhetsbilder
================================================*/

.news-img-default {
	background:
		linear-gradient(135deg, rgba(120,95,55,.25), rgba(255,245,210,.8)),
		radial-gradient(circle at 30% 40%, rgba(80,60,35,.25), transparent 45%);
}

/* Nya specialbilder */
.news-img-bishop-seat-moved {
	background-image: url('/img/nyheter/biskopssatesflytt.png');
}

.news-img-diocese-report {
	background-image: url('/img/nyheter/stiftsrapport.png');
}

.news-img-friendship {
	background-image: url('/img/nyheter/vanstiftsprojekt.png');
}

.news-img-vicar {
	background-image: url('/img/nyheter/kyrkoherde.png');
}

.news-img-sacristy-1 {
	background-image: url('/img/nyheter/sakristia_1.png');
}

.news-img-sacristy-2 {
	background-image: url('/img/nyheter/sakristia_2.png');
}

.news-img-adjunct-shortage {
	background-image: url('/img/nyheter/adjunktbrist.png');
}

.news-img-chapter {
	background-image: url('/img/nyheter/domkapitel.png');
}

.news-img-rename {
	background-image: url('/img/nyheter/namnbyte.png');
}

.news-img-church-completed {
	background-image: url('/img/nyheter/kyrkaklar.png');
}

.news-img-visitation {
	background-image: url('/img/nyheter/visitation.png');
}

/* Befintliga/återanvända nyhetsbilder */
.news-img-media-1 {
	background-image: url('/img/nyheter/media_1.png');
}

.news-img-media-2 {
	background-image: url('/img/nyheter/samhallsframtradande_2.png');
}

.news-img-public-engagement-1 {
	background-image: url('/img/nyheter/samhallsframtradande_1.png');
}

.news-img-public-engagement-2 {
	background-image: url('/img/nyheter/samhallsframtradande_2.png');
}

.news-img-letter {
	background-image: url('/img/nyheter/biskopsbrev_1.png');
}


.news-img-church {
	background-image: url('/img/nyheter/kyrka_1.png');
}

.news-img-church-building-1 {
	background-image: url('/img/nyheter/kyrkbygge_1.png');
}

.news-img-church-building-2 {
	background-image: url('/img/nyheter/kyrkbygge_2.png');
}

.news-img-revival {
	background-image: url('/img/nyheter/vackelse_1.png');
}

.news-img-church-fire-1 {
	background-image: url('/img/nyheter/brand_1.png');
}

.news-img-church-fire-2 {
	background-image: url('/img/nyheter/brand_2.png');
}

.news-img-church-fire-3 {
	background-image: url('/img/nyheter/brand_3.png');
}

.news-img-pilgrim {
	background-image: url('/img/nyheter/pilgrimsvandring_1.png');
}

.news-img-disaster {
	background-image: url('/img/nyheter/olycka_1.png');
}

.news-img-baby-boom-1 {
	background-image: url('/img/nyheter/barn_1.png');
}

.news-img-baby-boom-2 {
	background-image: url('/img/nyheter/barn_1.png');
}

.news-img-wedding-1 {
	background-image: url('/img/nyheter/brollop_1.png');
}

.news-img-wedding-2 {
	background-image: url('/img/nyheter/brollop_2.png');
}

.news-img-scandal {
	background-image: url('/img/nyheter/skandal.png');
}

.news-img-gathering {
	background-image: url('/img/nyheter/stor_samling_1.png');
}

.news-img-meeting {
	background-image: url('/img/nyheter/kyrkomote_1.png');
}

.news-img-map {
	background-image: url('/img/nyheter/stiftsbyte_1.png');
}

.news-img-ordination-1 {
	background-image: url('/img/nyheter/prastvigning_1.png');
}
.news-img-ordination-2 {
	background-image: url('/img/nyheter/prastvigning_2.png');
}
.news-img-ordination-3 {
	background-image: url('/img/nyheter/prastvigning_3.png');
}
.news-img-ordination-4 {
	background-image: url('/img/nyheter/prastvigning_4.png');
}
.news-img-ordination-5 {
	background-image: url('/img/nyheter/prastvigning_5.png');
}
.news-img-ordination-6 {
	background-image: url('/img/nyheter/prastvigning_6.png');
}

.news-img-retirement {
	background-image: url('/img/nyheter/tackbord.png');
}

.news-img-conference {
	background-image: url('/img/nyheter/stiftskonferens.png');
}

.news-img-stiftsbyte {
	background-image: url('/img/nyheter/stiftsbyte_1.png');
}

.news-img-kartgranser {
	background-image: url('/img/nyheter/kartgranser.png');
}

.news-img-meeting-failed-1 {
	background-image: url('/img/nyheter/kyrkomote_failed_1.png');
}

.news-img-meeting-failed-2 {
	background-image: url('/img/nyheter/kyrkomote_failed_2.png');
}
.news-img-church-1 {
	background-image: url('/img/nyheter/kyrka_1.png');
}

.news-img-church-2 {
	background-image: url('/img/nyheter/kyrka_2.png');
}

.news-img-church-3 {
	background-image: url('/img/nyheter/kyrka_3.png');
}

/* =========================================================
   Stiftssidor – stiftstabell
========================================================= */

.news-diocese-table-wrap {
	max-width: 100%;
	overflow: visible;
	border: 1px solid rgba(90, 70, 35, 0.18);
	border-radius: 10px;
	background: rgba(255, 253, 246, 0.74);
}

.news-diocese-table {
	width: 100%;
	border-collapse: separate;
	border-spacing: 0;
	table-layout: fixed;
	font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	font-size: 0.76rem;
	line-height: 1.15;
	color: #2b2418;
}

/* Smala kolumner, ungefär som församlingslistan */
.news-diocese-table .col-diocese { width: 150px; }
.news-diocese-table .col-bishop { width: 135px; }
.news-diocese-table .col-small { width: 42px; }
.news-diocese-table .col-members { width: 66px; }
.news-diocese-table .col-axis { width: 30px; }

.news-diocese-table th,
.news-diocese-table td {
	padding: 4px 5px;
	border-bottom: 1px solid rgba(120, 92, 45, 0.14);
	vertical-align: middle;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	background-clip: padding-box;
}

/* Sticky rubrikrad som täcker hela överkanten */
.news-diocese-table thead {
	position: sticky;
	top: -1px;
	z-index: 20;
	background: rgba(243, 231, 200, 1);
	box-shadow: 0 2px 0 rgba(120, 92, 45, 0.22);
}

.news-diocese-table thead::before {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	top: -12px;
	height: 12px;
	background: rgba(243, 231, 200, 1);
	pointer-events: none;
}

.news-diocese-table th {
	position: relative;
	z-index: 21;
	background: rgba(243, 231, 200, 1);
	font-weight: 750;
	text-align: right;
}

.news-diocese-table .th-diocese,
.news-diocese-table .th-bishop {
	text-align: left;
}

.news-diocese-table td.num {
	text-align: right;
	font-variant-numeric: tabular-nums;
}

.news-diocese-table .diocese-cell,
.news-diocese-table .bishop-cell {
	text-align: left;
}

.news-diocese-row {
	background:
		linear-gradient(
			90deg,
			var(--stift-tint),
			rgba(255,255,255,0.02) 58%
		);
}

.news-diocese-row:nth-child(even) td {
	background: rgba(255,255,255,0.22);
}

.news-diocese-row:hover td {
	background: rgba(255,255,255,0.56);
}

.news-diocese-link {
	color: #2b2418 !important;
	text-decoration: underline;
	text-underline-offset: 2px;
	font-weight: 600;
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	max-width: 100%;
	background: transparent !important;
	border: none !important;
	box-shadow: none !important;
	padding: 0 !important;
	font: inherit;
	cursor: pointer;
	text-align: left;
}

.news-diocese-link .diocese-color-dot {
	flex: 0 0 auto;
}

.diocese-color-dot {
	width: 0.65rem;
	height: 0.65rem;
	border-radius: 999px;
	background: var(--stift-color);
	border: 1px solid var(--stift-border);
	box-shadow: 0 1px 3px rgba(0,0,0,0.20);
}

.news-diocese-table tfoot td {
	border-top: 2px solid rgba(0,0,0,0.22);
	background: rgba(255,255,255,0.78);
	font-weight: 700;
}


/* =========================================================
   stiftsbilagan
========================================================= */



.news-sort-btn,
.news-diocese-link,
.news-parish-link {
	background: transparent !important;
	border: none !important;
	box-shadow: none !important;
	padding: 0 !important;
	font: inherit;
	cursor: pointer;
	text-align: left;
}

.news-sort-btn {
	background: transparent !important;
	border: none !important;
	box-shadow: none !important;
	padding: 0 !important;
	font: inherit;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	gap: 2px;
	width: 100%;
	min-width: 0;
	color: inherit !important;
	font-weight: 750;
}
.news-sort-btn.is-right {
	justify-content: flex-end;
	text-align: right;
}

.news-sort-btn.is-left {
	justify-content: flex-start;
	text-align: left;
}
.news-sort-arrow {
	display: inline-block;
	width: 0.75em;
	min-width: 0.75em;
	text-align: center;
	font-size: 0.72em;
	line-height: 1;
	opacity: 0.88;
}

.news-sort-label {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	font-size: 0.82em;
	font-weight: 750;
	margin-right: 2px;
}

.news-sort-btn.is-right .news-sort-arrow {
	order: 0;
}

.news-sort-btn.is-right .news-sort-label,
.news-sort-btn.is-right .news-th-icon {
	order: 1;
}

.news-diocese-link,
.news-parish-link {
	color: #2b2418 !important;
	text-decoration: underline;
	font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
}

.news-parish-table-note {
	font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	font-size: 0.82rem;
	line-height: 1.3;
	color: rgba(43, 36, 24, 0.74);
	margin: 0 0 8px;
}

.news-parish-table-wrap {
	max-width: 100%;
	max-height: calc(100vh - 250px);
	overflow: auto;
	border: 1px solid rgba(90, 70, 35, 0.18);
	border-radius: 10px;
	background: rgba(255, 253, 246, 0.74);
}

.news-parish-table {
	width: 100%;
	border-collapse: separate;
	border-spacing: 0;
	table-layout: fixed;
	font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	font-size: 0.76rem;
	line-height: 1.18;
	color: #2b2418;
}

/* Tätare kolumner. Observer-vyn får en extra stiftskolumn. */
.news-parish-table .col-lkf { width: 45px; }
.news-parish-table .col-stift { width: 92px; }
.news-parish-table .col-name { width: 190px; }
.news-parish-table .col-members { width: 74px; }
.news-parish-table .col-share { width: 54px; }
.news-parish-table .col-priests { width: 52px; }
.news-parish-table .col-churches { width: 48px; }
.news-parish-table .col-axis { width: 38px; }

.news-parish-table th,
.news-parish-table td {
	padding: 3px 4px;
	border-bottom: 1px solid rgba(120, 92, 45, 0.14);
	vertical-align: middle;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	background-clip: padding-box;
}

/*
	Sticky rubriker:
	Eftersom .news-parish-table-wrap är det faktiska scrollelementet
	ligger rubrikerna kvar när man scrollar nedåt i listan.
*/
.news-parish-table th {
	position: sticky;
	top: 0;
	z-index: 5;
	background: rgba(243, 231, 200, 0.99);
	box-shadow: 0 2px 0 rgba(120, 92, 45, 0.18);
	font-weight: 750;
}

.news-parish-table td.num {
	text-align: right;
	font-variant-numeric: tabular-nums;
}

.news-parish-table .name-cell,
.news-parish-table .stift-cell {
	text-align: left;
}

.news-parish-row:nth-child(even) td {
	background: rgba(255,255,255,0.24);
}

.news-parish-row:hover td {
	background: rgba(255,255,255,0.56);
}

.news-parish-link {
	max-width: 100%;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	color: #2b2418 !important;
}

.news-parish-delta {
	font-size: 0.84em;
	font-weight: 750;
}

.news-parish-delta.delta-plus {
	color: #1e6f34;
}

.news-parish-delta.delta-minus {
	color: #8a2525;
}

@media (max-width: 760px) {
	.news-card.featured {
		grid-column: span 1;
	}

	.news-card.featured h3 {
		font-size: 1.08rem;
	}

	.news-article-modal-card {
		width: calc(100vw - 24px);
		max-height: 86vh;
	}
}

/* ====================================================
	vision
==========================================================*/

.vision-button {
	position: fixed;
	right: 80px;
	top: 14px;
	z-index: var(--z-vision-button);

	width: 78px;
	height: 78px;
	padding: 7px !important;

	border-radius: 999px !important;
	border: 1px solid rgba(255, 225, 145, 0.92) !important;

	background:
		radial-gradient(circle at 38% 26%, rgba(255,255,255,0.95), rgba(255,241,184,0.72) 22%, transparent 42%),
		radial-gradient(circle at 50% 58%, rgba(255,226,118,0.72), rgba(176,124,38,0.34) 58%, rgba(105,74,27,0.28) 100%),
		linear-gradient(to bottom, rgba(255,235,158,0.98), rgba(198,148,55,0.92)) !important;

	box-shadow:
		inset 0 1px 0 rgba(255,255,255,0.92),
		inset 0 -2px 4px rgba(92,61,18,0.28),
		0 4px 11px rgba(0,0,0,0.26),
		0 0 16px rgba(255,218,105,0.42),
		0 0 28px rgba(255,196,68,0.20);

	display: none;
	align-items: center;
	justify-content: center;

	color: transparent;
	backdrop-filter: blur(3px);
	transition:
		transform 0.16s ease,
		filter 0.16s ease,
		box-shadow 0.16s ease;
}

.vision-button:hover {
	transform: translateY(-2px) scale(1.045);
	filter: brightness(1.07) saturate(1.08);
	box-shadow:
		inset 0 1px 0 rgba(255,255,255,0.96),
		inset 0 -2px 4px rgba(92,61,18,0.26),
		0 7px 18px rgba(0,0,0,0.32),
		0 0 22px rgba(255,225,128,0.58),
		0 0 38px rgba(255,196,68,0.32);
}

.vision-button:active {
	transform: translateY(0) scale(0.97);
	box-shadow:
		inset 0 3px 7px rgba(92,61,18,0.32),
		0 3px 8px rgba(0,0,0,0.24),
		0 0 14px rgba(255,210,95,0.36);
}

.vision-button-cloud {
	display: block;
	width: 64px;
	height: 64px;
	flex: 0 0 64px;

	font-size: 0;
	line-height: 0;
	color: transparent;
	text-shadow: none;

	background-image: url('/img/ikoner/visioner.png?v=3');
	background-repeat: no-repeat;
	background-position: center;
	background-size: contain;

	filter:
		drop-shadow(0 2px 4px rgba(75,48,12,0.36))
		drop-shadow(0 0 7px rgba(255,248,214,0.48));
}

.vision-modal-card {
	position: absolute;
	top: 7%;
	bottom: 7%;
	left: 50%;
	transform: translateX(-50%);
	width: min(1040px, calc(100vw - 34px));
	background:
		radial-gradient(circle at top center, rgba(255,255,255,0.18), transparent 42%),
		linear-gradient(to bottom, rgba(244,242,236,0.98), rgba(226,222,212,0.97));
	border-radius: 22px;
	box-shadow:
		0 18px 48px rgba(0,0,0,0.34),
		0 0 32px rgba(255,248,220,0.12);
	overflow: hidden;
	display: flex;
	flex-direction: column;
	border: 1px solid rgba(255,255,255,0.4);
}

.vision-modal-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 18px 20px;
	border-bottom: 1px solid rgba(176,162,126,0.42);
	color: #2b2418;
	background: linear-gradient(to bottom, rgba(255,255,255,0.24), rgba(255,255,255,0.06));
}

.vision-modal-header h2 {
	margin: 0;
	font-size: 1.3rem;
	letter-spacing: 0.02em;
}

.vision-modal-body {
	padding: 16px 18px 18px;
	overflow-y: auto;
	flex: 1 1 auto;
	min-height: 0;
	color: #2b2418;
}

.vision-summary {
	border-radius: 14px;
	padding: 12px 14px;
	margin-bottom: 16px;
	font-weight: 700;
	border: 1px solid rgba(0,0,0,0.12);
}

.vision-summary.is-ok {
	background: rgba(105, 160, 95, 0.18);
}

.vision-summary.is-blocked {
	background: rgba(190, 85, 70, 0.18);
}

.vision-modal-body h3 {
	margin: 18px 0 8px;
	font-size: 1rem;
}

.vision-summary-block {
	border-radius: 18px;
	padding: 14px 16px;
	margin-bottom: 18px;
	background:
		radial-gradient(circle at top center, rgba(255,255,255,0.26), transparent 56%),
		linear-gradient(to bottom, rgba(228,221,202,0.68), rgba(195,186,164,0.46));
	border: 1px solid rgba(160,144,105,0.36);
	color: #2f281c;
	box-shadow:
		inset 0 1px 0 rgba(255,255,255,0.42),
		0 8px 22px rgba(0,0,0,0.08);
}

.vision-summary-block.is-ok {
	background:
		radial-gradient(circle at top center, rgba(235,255,235,0.30), transparent 56%),
		linear-gradient(to bottom, rgba(205,226,198,0.68), rgba(178,204,172,0.46));
}

.vision-summary-block.is-blocked {
	background:
		radial-gradient(circle at top center, rgba(255,235,225,0.32), transparent 56%),
		linear-gradient(to bottom, rgba(226,198,188,0.70), rgba(205,171,162,0.48));
}

.vision-summary-intro,
.vision-summary-rule,
.vision-summary-progress {
	line-height: 1.45;
}

.vision-summary-rule,
.vision-summary-progress {
	margin-top: 8px;
}

.vision-list {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.vision-card.is-neutral {
	background:
		radial-gradient(circle at top center, rgba(255,255,255,0.20), transparent 60%),
		linear-gradient(to bottom, rgba(168,170,178,0.26), rgba(120,125,136,0.16));
	border-color: rgba(106,110,120,0.28);
	color: #2d2b28;
}

.vision-card.is-contested,
.vision-card.is-led-by-other {
	background:
		radial-gradient(circle at top center, rgba(255,250,212,0.28), transparent 60%),
		linear-gradient(to bottom, rgba(221,201,123,0.34), rgba(176,150,66,0.22));
	border-color: rgba(173,144,58,0.40);
	color: #3a3014;
}

.vision-card.is-fulfilled,
.vision-card.is-led-by-self {
	background:
		radial-gradient(circle at top center, rgba(225,255,226,0.28), transparent 60%),
		linear-gradient(to bottom, rgba(133,181,126,0.34), rgba(84,132,82,0.22));
	border-color: rgba(76,128,72,0.44);
	color: #17301a;
}

.vision-card-toggle {
	list-style: none;
	width: 100%;
	display: flex;
	align-items: center;
	gap: 10px;
	border: 0 !important;
	background: transparent !important;
	color: inherit !important;
	padding: 13px 14px !important;
	text-align: left;
	box-shadow: none !important;
	cursor: pointer;
}

.vision-card-toggle::-webkit-details-marker {
	display: none;
}

.vision-card-icon {
	width: 24px;
	height: 24px;
	border-radius: 999px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: rgba(255,255,255,0.56);
	font-weight: 800;
}


.vision-warning {
	font-style: italic;
	opacity: 0.86;
}


/* =========================================================
   Fly token
========================================================= */

.fly-token {
	position: fixed;
	width: 14px;
	height: 14px;
	border-radius: 50%;
	background: radial-gradient(circle at 35% 35%, #fff7da 0%, #d8b96e 70%, #9f7f38 100%);
	box-shadow: 0 0 10px rgba(184, 154, 87, 0.45);
	pointer-events: none;
	z-index: var(--z-fly-token);
}

/* =========================================================
   Custom dropdown
========================================================= */

.custom-dropdown {
	position: relative;
	width: 100%;
	margin-top: 8px;
}

.custom-dropdown-trigger {
	width: 100%;
	display: flex !important;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	text-align: left;
}

.custom-dropdown-label {
	min-width: 0;
	flex: 1 1 auto;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.custom-dropdown-label.is-placeholder {
	color: #7a6b4c;
	opacity: 0.9;
}

.custom-dropdown-arrow {
	flex: 0 0 auto;
	font-size: 0.9rem;
	line-height: 1;
}

.custom-dropdown-menu {
	position: absolute;
	left: 0;
	right: 0;
	top: calc(100% + 4px);
	display: none;
	max-height: 220px;
	overflow-y: auto;
	z-index: 980;
	background: rgba(248, 248, 250, 0.98);
	border: 1px solid #cdb57a;
	border-radius: 10px;
	box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
	padding: 4px;
}

.custom-dropdown.open .custom-dropdown-menu {
	display: block;
}

.custom-dropdown.open .custom-dropdown-arrow {
	transform: rotate(180deg);
}

.custom-dropdown-option {
	display: block;
	width: 100%;
	border: 0;
	background: transparent;
	color: #2b2418;
	text-align: left;
	padding: 8px 10px;
	border-radius: 8px;
	font: inherit;
	line-height: 1.25;
	cursor: pointer;
}

.custom-dropdown-option:hover,
.custom-dropdown-option:focus {
	background: rgba(184, 154, 87, 0.16);
	outline: none;
}

.custom-dropdown-option.is-selected {
	background: rgba(184, 154, 87, 0.24);
	font-weight: 600;
}

/* =========================================================
   Mobil - gömt
========================================================= */

#mobile_panel_backdrop,
#mobile_handlingsfalt_toggle,
#mobile_stift_toggle,
#mobile_login_toggle,
.mobile-panel-close {
	display: none;
}

/* =========================================================
   Mobil
========================================================= */

#mobile_map_modes_toggle,
#mobile_map_modes_overlay {
	display: none;
}

@media (max-width: 900px) {
	#stift_panel {
		width: min(360px, calc(100vw - 20px));
	}
	.korstag-handlingsfalt {
		width: min(360px, calc(100vw - 20px));
	}
	.diocese-modal-body {
		grid-template-columns: 1fr;
	}
	.news-modal-header {
		flex-wrap: wrap;
		justify-content: flex-start;
		padding: 12px 12px 0;
		gap: 8px;
	}
	.news-modal-header h2 {
		font-size: 1rem;
	}
	.news-tabs {
		order: 3;
		flex: 0 0 100%;
		width: 100%;
		max-width: 100%;
		margin: 2px 0 0;
		padding: 0 34px 0 0;
		justify-content: flex-start;
		overflow-x: auto;
		overflow-y: hidden;
	}
	/* ---- Backdrop ---- */
	#mobile_panel_backdrop {
		display: block;
		position: fixed;
		inset: 0;
		background: rgba(0,0,0,0.28);
		opacity: 0;
		pointer-events: none;
		transition: opacity 0.2s ease;
		z-index: 920;
	}
	.news-tab-btn {
		padding: 6px 9px;
		font-size: 0.86rem;
	}

	body.mobile-any-panel-open #mobile_panel_backdrop {
		opacity: 1;
		pointer-events: auto;
	}

	/* ---- Toggle buttons ---- */

	body.logged-in #mobile_handlingsfalt_toggle,
	body.logged-in #mobile_stift_toggle,
	body.logged-out #mobile_login_toggle {
		display: flex;
	}

	.mobile-panel-toggle {
		position: fixed;
		background: rgba(32, 40, 58, 0.92);
		color: #fff;
		border: none;
		box-shadow: 0 6px 18px rgba(0,0,0,0.25);
		cursor: pointer;
		z-index: 915;
	}

	#mobile_handlingsfalt_toggle {
		left: 0;
		top: 50%;
		transform: translateY(-50%);
		width: 34px;
		height: 170px;
		border-radius: 0 16px 16px 0;
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
		gap: 8px;
	}

	#mobile_handlingsfalt_toggle .mobile-toggle-label {
		writing-mode: vertical-rl;
		transform: rotate(180deg);
		font-size: 11px;
		line-height: 1;
		opacity: 0.95;
	}

	#mobile_handlingsfalt_toggle .mobile-toggle-arrow {
		font-size: 18px;
		line-height: 1;
	}

	#mobile_stift_toggle {
		left: 0;
		bottom: 0;
		width: 55px;
		height: 55px;
		border-radius: 0 25px 0 0;
		display: flex;
		flex-direction: column;
		align-items: flex-start;
		justify-content: flex-end;
		padding: 8px 8px 10px 10px;
		z-index: 705;
	}

	#mobile_stift_toggle .mobile-toggle-arrow {
		font-size: 15px;
		line-height: 1;
        margin: 0 0 0px 16px;
	}

	#mobile_stift_toggle .mobile-toggle-corner-label {
		font-size: 10px;
		line-height: 1;
        margin: 0 0 10px 0;
	}

	#mobile_login_show {
		left: 0px;
		top: 40%;
		transform: translateY(-50%);
		width: 30px;
		height: 118px;
		border-radius: 0 14px 14px 0;
		align-items: center;
		justify-content: center;
		z-index: 917;
	}
	#mobile_login_hide {
		left: 300px;
		top: var(--handlings-top-gap);
		width: 30px;
		height: 80px;
		border-radius: 0 14px 0 14px;
		align-items: center;
		justify-content: center;
		z-index: 945;
	}
	body.mobile-login-collapsed #mobile_login_hide, body:not(.mobile-login-collapsed) #mobile_login_show, body.logged-in #mobile_login_hide {
		display: none;
	}
	body:not(.logged-in):not(.mobile-login-collapsed) #mobile_login_hide, body.mobile-login-collapsed #mobile_login_show {
		display: flex;
	}
	#mobile_login_toggle .mobile-toggle-arrow {
		font-size: 18px;
		line-height: 1;
	}

	/* ---- Close buttons inside panels ---- */

	.mobile-panel-close {
		position: absolute;
		top: 10px;
		right: 10px;
		width: 34px;
		height: 34px;
		border: none;
		border-radius: 999px;
		background: rgba(0,0,0,0.18);
		color: #fff;
		align-items: center;
		justify-content: center;
		z-index: 2;
		cursor: pointer;
	}

	body.logged-in.mobile-handlingsfalt-open #handlingsfalt > .mobile-panel-close,
	body.logged-in.mobile-stift-open #stift_panel > .mobile-panel-close,
	body.logged-out #handlingsfalt > .mobile-panel-close {
		display: inline-flex;
	}

	/* ---- Utloggad - loginpanelen ---- */

	body.logged-out #mobile_handlingsfalt_toggle,
	body.logged-out #mobile_stift_toggle {
		display: none !important;
	}

	body.logged-out #handlingsfalt {
		position: fixed;
		left: 0;
		bottom: auto;
		max-height: calc(100vh - 24px);
		transform: translateX(0);
		transition: transform 0.22s ease;
	}

	body.logged-out.mobile-login-collapsed #handlingsfalt {
		transform: translateX(-102%);
	}

	/* ---- Inloggad: handlingsfält ---- */

	body.logged-in #handlingsfalt {
		position: fixed;
		left: 0;
		bottom: 0;
		width: min(86vw, 420px);
		max-width: 420px;
		transform: translateX(-102%);
		transition: transform 0.22s ease;
		overflow-y: auto;
/*		padding-top: 52px; /* Plats för X-knapp överst */
	}

	body.logged-in.mobile-handlingsfalt-open #handlingsfalt {
		transform: translateX(0);
	}

	body.logged-in.mobile-handlingsfalt-open #mobile_handlingsfalt_toggle {
		display: none !important;
	}

	/* ---- Inloggad: stiftpanel ---- */

	body.logged-in #stift_panel {
		position: fixed;
		left: 0;
		right: 0;
		bottom: 0;
		width: auto;
		height: auto;
		min-height: 0;
		max-height: 62vh;
		transform: translateY(102%);
		transition: transform 0.22s ease;
		overflow-y: auto;
		padding: 18px 16px 16px;
		border-radius: 18px 18px 0 0;
		z-index: 942;
	}

	body.mobile-stift-open #stift_panel {
		transform: translateY(0);
	}

	body.mobile-stift-open #news_button,
	body.mobile-stift-open #kartknappar {
		opacity: 0;
		pointer-events: none;
	}

	/* ---- Uppdragspanel mobil ---- */

	#uppdrag_panel {
		top: auto;
		bottom: 120px;
		right: 0;
		transform: none;
		max-height: 62vh;
		min-height: 76px;
		z-index: 930;
	}

	#uppdrag_panel.expanded {
		width: min(88vw, 340px);
	}

	#uppdrag_panel_inner {
		min-width: 260px;
	}

	.uppdrag-list {
		max-height: calc(62vh - 130px);
	}
	
	#toggle-uppdrag-btn{
		margin-right:135px;
	}

	/* ---- En panel öppnas, övriga stängs ---- */

	body.mobile-uppdrag-open #handlingsfalt {
		transform: translateX(-102%);
	}

	body.mobile-uppdrag-open #stift_panel {
		transform: translateY(102%);
	}

	body.mobile-stift-open #mobile_handlingsfalt_toggle {
		opacity: 0;
		pointer-events: none;
	}

	/* stiftknappen ska hamna under handlingsfältet om handlingsfältet är öppet */
	body.mobile-handlingsfalt-open #mobile_stift_toggle {
		z-index: 931;
	}

	/* ---- KT knapp position i mobilläge ---- */
	.news-button {
		left: 70px;
		right: auto;
		bottom: -45px;
		top: auto;
		z-index: 660;
	}

	body.mobile-stift-open #news_button {
		opacity: 0;
		pointer-events: none;
	}
/* =========================================================
   Mobil: kartlägesknapp + overlay
========================================================= */

	/* Dölj vanliga kartknappar på mobil */
	#kartknappar {
		display: none !important;
	}

	/* En enda knapp nere till höger */
	#mobile_map_modes_toggle {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		position: fixed;
		right: 12px;
		bottom: 12px;
		width: 52px;
		height: 52px;
		border-radius: 14px;
		border: none;
		background: rgba(32, 40, 58, 0.92);
		color: #fff;
		box-shadow: 0 6px 18px rgba(0,0,0,0.25);
		cursor: pointer;
		z-index: 710;
		font-size: 22px;
		line-height: 1;
	}

	/* Om stiftspanelen är framme kan även denna döljas */
	body.mobile-stift-open #mobile_map_modes_toggle {
		opacity: 0;
		pointer-events: none;
	}

	#mobile_map_modes_overlay {
		position: fixed;
		inset: 0;
		z-index: var(--z-map-modes-modal);
	}

	body.mobile-map-modes-open #mobile_map_modes_overlay {
		display: block;
	}

	.mobile-map-modes-backdrop {
		position: absolute;
		inset: 0;
		background: rgba(0,0,0,0.38);
		backdrop-filter: blur(2px);
	}

	.mobile-map-modes-card {
		position: absolute;
		left: 50%;
		top: 50%;
		transform: translate(-50%, -50%);
		width: min(320px, calc(100vw - 28px));
		background: rgba(248,248,250,0.98);
		border-radius: 18px;
		box-shadow: 0 12px 32px rgba(0,0,0,0.28);
		padding: 14px;
	}

	.mobile-map-modes-header {
		display: flex;
		align-items: center;
		justify-content: space-between;
		gap: 10px;
		margin-bottom: 12px;
	}

	.mobile-map-modes-header h3 {
		margin: 0;
		font-size: 1.05rem;
		color: #222;
	}

	#mobile_map_modes_close {
		border: 1px solid #999;
		background: #fff;
		border-radius: 8px;
		padding: 6px 10px;
		font: inherit;
	}

	.mobile-map-modes-grid {
		display: grid;
		grid-template-columns: 1fr 1fr;
		gap: 10px;
	}

	.mobile-map-mode-btn {
		min-height: 48px;
		border-radius: 12px;
		font-size: 0.95rem;
		font-weight: 600;
	}

	.mobile-map-mode-btn.active-mode {
		background: rgba(80, 80, 80, 0.96) !important;
		color: #fff;
		border-color: #3a3a3a !important;
	}
}


/* Knappar ikoner */
#kartknappar button div, .mobile-map-modes-grid button div{
	position: relative;
    transform: translateY(-50%) translateX(-50%);
    width: 30px;
    height: 30px;
    top: 50%;
    left: 50%;
    background-repeat: no-repeat;
    background-size: 30px 30px;
}
#st-btn div, .st-btn div { background-image:url('/img/ikoner/mi.png'); }
#sc-btn div, .sc-btn div { background-image:url('/img/ikoner/av.png'); }
#pr-btn div, .pr-btn div { background-image:url('/img/ikoner/pr.png'); }
#kb-btn div, .kb-btn div { background-image:url('/img/ikoner/ky.png'); }
#me-btn div, .me-btn div { background-image:url('/img/ikoner/me.png'); }
#ti-btn div, .ti-btn div { background-image:url('/img/ikoner/an.png'); }


/* admin */
#admin_modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: var(--z-admin-modal);
}

#admin_modal.open {
    display: block;
}

#admin_modal .help-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(24, 18, 10, .42);
    backdrop-filter: blur(2px);
}

#admin_modal .help-modal-card {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: min(980px, calc(100vw - 32px));
    max-height: min(88vh, 860px);
    overflow: auto;
    background: rgba(255, 250, 239, .97);
    border: 1px solid rgba(139, 119, 80, .65);
    border-radius: 22px;
    padding: 18px;
    box-shadow: 0 24px 70px rgba(0,0,0,.28);
    color: #2c2418;
}
#admin_modal form label{
	display: inline-block;
}

.admin-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 14px;
	margin-top: 14px;
}

.admin-card {
	background: rgba(255, 253, 246, 0.96);
	border: 1px solid rgba(139, 119, 80, 0.35);
	border-radius: 16px;
	padding: 14px;
	box-shadow: 0 8px 22px rgba(0,0,0,0.08);
}

.admin-card-wide {
	grid-column: 1 / -1;
}

.admin-card h3 {
	margin: 0 0 10px;
	font-size: 1.05rem;
	color: #2b2418;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	cursor: pointer;
	user-select: none;
}

.admin-card h3::after {
	content: "−";
	flex: 0 0 auto;
	width: 1.6rem;
	height: 1.6rem;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 999px;
	border: 1px solid rgba(139, 119, 80, 0.30);
	background: rgba(198, 164, 92, 0.10);
	font-size: 1.1rem;
	line-height: 1;
}

.admin-card h3:focus-visible {
	outline: 2px solid rgba(138, 106, 46, 0.65);
	outline-offset: 4px;
	border-radius: 6px;
}

.admin-card.is-collapsed {
	padding-top: 11px;
	padding-bottom: 11px;
}

.admin-card.is-collapsed > h3 {
	margin-bottom: 0;
}

.admin-card.is-collapsed > h3::after {
	content: "+";
}

.admin-card.is-collapsed > :not(h3) {
	display: none !important;
}

table.admin-table{
    width: stretch;
	border-spacing: 0px;
}
table.admin-table td {
    border: 1px solid gray;
}


.admin-form {
	display: grid;
	gap: 10px;
}

.admin-form label {
	display: grid;
	gap: 4px;
	font-weight: 700;
	color: #2b2418;
}

.admin-form input,
.admin-form textarea,
.admin-form select {
	width: 100%;
	box-sizing: border-box;
	border-radius: 10px;
	border: 1px solid rgba(139, 119, 80, 0.45);
	background: #fffdf7;
	color: #2b2418;
	padding: 8px 10px;
	font: inherit;
}

.admin-form textarea {
	resize: vertical;
	min-height: 130px;
}

.admin-subcollapse {
	border: 1px solid rgba(139, 119, 80, 0.28);
	border-radius: 12px;
	background: rgba(255,255,255,0.32);
	overflow: hidden;
}

.admin-subcollapse > summary {
	list-style: none;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	padding: 9px 11px;
	font-weight: 750;
	color: #2b2418;
	cursor: pointer;
	user-select: none;
}

.admin-subcollapse > summary::-webkit-details-marker {
	display: none;
}

.admin-subcollapse > summary::after {
	content: "+";
	font-size: 1rem;
	font-weight: 800;
}

.admin-subcollapse[open] > summary::after {
	content: "−";
}

.admin-subcollapse[open] > summary {
	border-bottom: 1px solid rgba(139, 119, 80, 0.22);
}

.admin-subcollapse-body {
	padding: 11px;
}

.admin-reminder-recipient-list {
	max-height: 330px;
	overflow-y: auto;
}

.admin-form-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 10px;
}

.admin-muted {
	margin-top: -4px;
	color: #665b4c;
	font-size: 0.9rem;
}

.admin-toggle-row {
	display: grid !important;
	grid-template-columns: auto 1fr;
	gap: 10px;
	align-items: start;
	padding: 11px 12px;
	border: 1px solid rgba(139, 119, 80, 0.28);
	border-radius: 12px;
	background: rgba(198, 164, 92, 0.10);
	cursor: pointer;
}

.admin-toggle-row input[type="checkbox"] {
	width: 18px;
	height: 18px;
	margin-top: 2px;
	accent-color: #8a6a2e;
}

.admin-toggle-text {
	display: grid;
	gap: 3px;
	font-weight: 400;
}

.admin-toggle-text strong {
	font-size: 0.95rem;
	color: #2b2418;
}

.admin-toggle-text small {
	color: #665b4c;
	line-height: 1.35;
	font-weight: 400;
}

.admin-toggle-row-subtle {
	background: rgba(255, 255, 255, 0.48);
}

/* Scrollbararna för admin fångas av den gemensamma custom-scrollbar-logiken ovan. */
#admin_modal .custom-dropdown-menu {
	z-index: 2005;
}

.admin-datetime-row {
	display: flex;
	gap: 8px;
}

.admin-datetime-row input {
	width: 130px;
}

/* Bildminiatyrer för admin-dropdown */

.admin-image-option {
	display: flex;
	align-items: center;
	gap: 10px;
	min-width: 0;
}

.admin-image-option img {
	width: 54px;
	height: 34px;
	object-fit: cover;
	border-radius: 7px;
	border: 1px solid rgba(120, 100, 60, 0.35);
	background: #eee;
	flex: 0 0 auto;
}

.admin-image-option span {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.custom-dropdown-trigger .admin-image-option img {
	width: 42px;
	height: 26px;
}

.admin-image-option-empty {
	color: #7a6b4c;
}

/* Dölj/visa-knappar – lite mörkare/gråare än vanliga knappar */

#mobile_handlingsfalt_toggle,
#mobile_stift_toggle,
#mobile_login_toggle,
.uppdrag-corner-toggle,
.mobile-panel-close,
#mobile_map_modes_toggle {
	background: linear-gradient(
		to bottom,
		rgba(220,220,222,0.96),
		rgba(176,176,180,0.94)
	) !important;

	color: #2b2418 !important;
	border: 1px solid rgba(120,120,126,0.55) !important;

	box-shadow:
		inset 0 1px 0 rgba(255,255,255,0.55),
		0 2px 6px rgba(0,0,0,0.18);
}

/* Hover */
#mobile_handlingsfalt_toggle:hover,
#mobile_stift_toggle:hover,
#mobile_login_toggle:hover,
.uppdrag-corner-toggle:hover,
.mobile-panel-close:hover,
#mobile_map_modes_toggle:hover {
	background: linear-gradient(
		to bottom,
		rgba(232,232,234,0.98),
		rgba(188,188,192,0.96)
	) !important;
}

/* Aktivt klick */
#mobile_handlingsfalt_toggle:active,
#mobile_stift_toggle:active,
#mobile_login_toggle:active,
.uppdrag-corner-toggle:active,
.mobile-panel-close:active,
#mobile_map_modes_toggle:active {
	background: linear-gradient(
		to bottom,
		rgba(170,170,174,0.96),
		rgba(150,150,154,0.94)
	) !important;
}

/* Öppna tidningen - animation */

#news_modal.news-opening .news-modal-backdrop {
	animation: kt-backdrop-in 2s ease both;
}

#news_modal.news-opening .news-modal-card {
	transform-origin: 50% 0%;
	animation: kt-paper-open 1s cubic-bezier(.18,.9,.24,1.08) both;
}

#news_modal.news-opening .news-modal-header,
#news_modal.news-opening .news-modal-body {
	animation: kt-content-fade 0.5s ease 0.22s both;
}

@keyframes kt-backdrop-in {
	from {
		opacity: 0;
		backdrop-filter: blur(0);
	}
	to {
		opacity: 1;
		backdrop-filter: blur(2px);
	}
}

@keyframes kt-paper-open {
	0% {
		opacity: 0;
		transform: translateX(-100%) translateY(100%) scale(0.10);
		filter: blur(5px);
	}
	100% {
		opacity: 1;
		transform: translateX(-50%) translateY(0) scale(1);
		filter: blur(0);
	}
}

@keyframes kt-content-fade {
	from {
		opacity: 0;
		transform: translateY(8px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}
/*
@media (prefers-reduced-motion: reduce) {
	#news_modal.news-opening .news-modal-backdrop,
	#news_modal.news-opening .news-modal-card,
	#news_modal.news-opening .news-modal-header,
	#news_modal.news-opening .news-modal-body {
		animation: none !important;
	}
}
*/

/* =========================================================
   Stiftsbilaga – svag stiftsbakgrund utan panelkant
========================================================= */

.news-feed--stift {
    background:
        linear-gradient(
            180deg,
            var(--stift-tint),
            rgba(255,255,255,0.50)
        );
    border: 0;
    border-radius: 0;
    padding: 12px;
}

.news-feed--stift .news-issue {
    background: transparent;
}

.news-feed--stift .news-card {
    background: rgba(255,255,255,0.76);
    border-left: 4px solid color-mix(in srgb, var(--stift-color) 45%, transparent);
}

/* =========================================================
   Stiftssidor – stiftstabell
========================================================= */

.news-diocese-row {
    background:
        linear-gradient(
            90deg,
            var(--stift-tint),
            rgba(255,255,255,0.02) 58%
        );
}

.news-diocese-link {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
}

.diocese-color-dot {
    width: 0.75rem;
    height: 0.75rem;
    border-radius: 999px;
    background: var(--stift-color);
    border: 1px solid var(--stift-border);
    box-shadow: 0 1px 3px rgba(0,0,0,0.20);
    flex: 0 0 auto;
}

.news-diocese-table tfoot td {
    border-top: 2px solid rgba(0,0,0,0.22);
    background: rgba(255,255,255,0.72);
    font-weight: 700;
}

/* =========================================================
   Stiftssidor – detaljvy
========================================================= */

.news-diocese-detail-view {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.news-diocese-detail-toolbar {
    display: flex;
    justify-content: flex-start;
    margin-bottom: 2px;
}

.news-diocese-info-card {
    background: rgba(255,255,255,0.82);
    border: 1px solid rgba(0,0,0,0.10);
    border-radius: 14px;
    padding: 16px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.10);
}

.news-diocese-info-card--themed {
    background:
        linear-gradient(
            135deg,
            color-mix(in srgb, var(--stift-tint) 100%, rgba(255,255,255,0.70)),
            rgba(255,255,255,0.86)
        );
    border-top: 7px solid var(--stift-border);
    box-shadow:
        0 6px 18px rgba(0,0,0,0.10),
        inset 0 0 0 1px color-mix(in srgb, var(--stift-color) 22%, transparent);
}

.news-diocese-info-card .news-card-kicker {
    color: var(--stift-border);
    font-weight: 700;
}

.news-diocese-info-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 12px;
}

.news-diocese-info-heading h3 {
    margin: 0;
    line-height: 1.15;
}

.news-diocese-heading-pills {
    justify-content: flex-end;
    max-width: 420px;
    margin: 0;
}

.news-diocese-info-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(220px, 1fr));
    gap: 7px 18px;
    margin: 10px 0 0;
}

.news-diocese-info-grid p {
    margin: 0.2rem 0;
}

.diocese-empty-news {
    opacity: 0.75;
    margin: 0.5rem 0 0;
}

@media (max-width: 900px) {
    .news-diocese-info-grid {
        grid-template-columns: repeat(2, minmax(220px, 1fr));
    }
}

@media (max-width: 620px) {
    .news-diocese-info-heading {
        display: block;
    }

    .news-diocese-heading-pills {
        justify-content: flex-start;
        max-width: none;
        margin-top: 10px;
    }

    .news-diocese-info-grid {
        grid-template-columns: 1fr;
    }
}


/* Detaljvyn för valt stift använder det valda stiftets färg,
   inte spelarens eget stift. Tabellvyn neutral. */
.news-diocese-body--themed {
    background:
        linear-gradient(
            180deg,
            var(--stift-tint),
            rgba(255,255,255,0.50)
        );
}

.diocese-news-slot--themed .news-card {
    background: rgba(255,255,255,0.78);
    border-left: 4px solid color-mix(in srgb, var(--stift-color) 50%, transparent);
}

.diocese-news-slot--themed .news-card-kicker {
    color: var(--stift-border);
}

/* Församlingsöversikten */
.news-parish-table-note {
	font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	font-size: 0.78rem;
	line-height: 1.25;
	color: rgba(43, 36, 24, 0.72);
	margin: 0 0 6px;
}

/*
	- Ingen egen vertikal scroll här.
	- Modalens yttre scroll ska användas.
	- Sticky th fungerar då mot modalens scrollande body.
*/
.news-parish-table-wrap {
	max-width: 100%;
	overflow: visible;
	border: 1px solid rgba(90, 70, 35, 0.18);
	border-radius: 10px;
	background: rgba(255, 253, 246, 0.74);
}

.news-parish-table {
	width: 100%;
	border-collapse: separate;
	border-spacing: 0;
	table-layout: fixed;
	font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	font-size: 0.72rem;
	line-height: 1.12;
	color: #2b2418;
}


.news-parish-table thead {
	position: sticky;
	top: -20px;
	z-index: 20;
	background: rgba(243, 231, 200, 1);
	box-shadow: 0 2px 0 rgba(120, 92, 45, 0.22);
}
.news-parish-table thead::before {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	top: -20px;
	height: 20px;
	background: rgba(243, 231, 200, 1);
	pointer-events: none;
}

.news-parish-table .col-lkf { width: 40px; }
.news-parish-table .col-stift { width: 82px; }
.news-parish-table .col-name { width: clamp(150px, 22vw, 200px); }
.news-parish-table .col-members { width: 64px; }
.news-parish-table .col-share { width: 48px; }
.news-parish-table .col-priests { width: 34px; }
.news-parish-table .col-churches { width: 34px; }
.news-parish-table .col-axis { width: 25px; }

.news-parish-table th,
.news-parish-table td {
	padding: 3px 4px;
	border-bottom: 1px solid rgba(120, 92, 45, 0.14);
	text-align: left;
	vertical-align: middle;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	background-clip: padding-box;
}

/*
	Kolumnrubrikerna ligger kvar när modalens innehåll scrollas.
	Om de hamnar under flikrad eller modal-header: höj top-värdet något,
	t.ex. top: 42px.
*/
.news-parish-table th {
	position: relative;
	z-index: 21;
	background: rgba(243, 231, 200, 1);
	font-weight: 750;
	text-align: right;
}

.news-parish-table th.th-name,
.news-parish-table th.th-stift {
	text-align: left;
}

.news-parish-table td.num {
	text-align: right;
	font-variant-numeric: tabular-nums;
}

.news-parish-table .name-cell,
.news-parish-table .stift-cell {
	text-align: left;
}

.news-parish-row:nth-child(even) td {
	background: rgba(255,255,255,0.24);
}

.news-parish-row:hover td {
	background: rgba(255,255,255,0.56);
}

.news-parish-link {
	display: inline;
	max-width: 100%;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	color: #2b2418 !important;
	text-decoration: underline;
	text-underline-offset: 2px;
	font-weight: 600;
	background: transparent !important;
	border: none !important;
	box-shadow: none !important;
	padding: 0 !important;
	font: inherit;
	cursor: pointer;
	text-align: left;
}

.news-parish-link span:last-child {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.news-parish-delta {
	font-size: 0.86em;
	font-weight: 750;
}

/* Ikoner i tabellhuvudet */
.news-th-icon {
	display: inline-block;
	width: 17px;
	height: 17px;
	background-repeat: no-repeat;
	background-position: center;
	background-size: contain;
	vertical-align: middle;
	filter: drop-shadow(0 0 1px rgba(255,255,255,0.4));
}

.news-th-icon--folk {
	background-image: url('/img/ikoner/folk.png');
}

.news-th-icon--from {
	background-image: url('/img/ikoner/from.png');
}

.news-th-icon--lit {
	background-image: url('/img/ikoner/lit.png');
}

.news-th-icon--stabilitet {
	background-image: url('/img/ikoner/stab.png');
}

.news-th-icon--priests {
	background-image: url('/img/ikoner/pr.png');
}

.news-th-icon--churches {
	background-image: url('/img/ikoner/ky.png');
}

.news-th-icon--parishes {
	background-image: url('/img/ikoner/forsamling.png');
}

.news-th-icon--members {
	background-image: url('/img/ikoner/me.png');
}

.news-sort-btn .news-th-icon + .news-sort-arrow {
	margin-left: 1px;
}

.news-parish-delta {
	font-size: 0.82em;
	font-weight: 750;
}

.news-parish-delta.delta-plus {
	color: #1e6f34;
}

.news-parish-delta.delta-minus {
	color: #8a2525;
}

.news-parish-delta-compact {
	display: none;
	font-weight: 900;
	margin-left: 1px;
}

@media (max-width: 1050px) {
	.news-parish-delta-full {
		display: none;
	}

	.news-parish-delta-compact {
		display: inline;
	}
}

/* Mobil: dölj LKF helt och tryck ihop ännu mer */
@media (max-width: 760px) {
	.news-parish-table {
		font-size: 0.68rem;
	}

	.news-parish-table .col-lkf,
	.news-parish-table th.col-lkf-cell,
	.news-parish-table td.col-lkf-cell {
		display: none;
	}

	.news-parish-table .col-stift {
		width: 70px;
	}

	.news-parish-table .col-name {
		width: clamp(130px, 34vw, 170px);
	}

	.news-parish-table .col-members {
		width: 54px;
	}

	.news-parish-table .col-share {
		width: 42px;
	}

	.news-parish-table .col-priests,
	.news-parish-table .col-churches {
		width: 28px;
	}

	.news-parish-table .col-axis {
		width: 24px;
	}

	.news-parish-table th,
	.news-parish-table td {
		padding: 3px 3px;
	}

	.news-th-icon {
		width: 15px;
		height: 15px;
	}
}


/* Bildväljarvyn */

.admin-image-picker-modal {
	position: fixed;
	inset: 0;
	z-index: 988;
	background: rgba(0,0,0,0.42);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 22px;
}

.admin-image-picker-card {
	width: min(920px, calc(100vw - 40px));
	max-height: min(760px, calc(100vh - 40px));
	overflow-y: auto;
	border-radius: 18px;
	background: rgba(248,246,239,0.98);
	box-shadow: 0 18px 50px rgba(0,0,0,0.35);
	padding: 16px;
}

.admin-image-picker-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 14px;
}

.admin-image-picker-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(135px, 1fr));
	gap: 10px;
}

.admin-image-tile {
	display: flex !important;
	flex-direction: column;
	gap: 7px;
	align-items: stretch;
	text-align: left;
	padding: 8px !important;
	min-height: 118px;
}

.admin-image-tile img {
	width: 100%;
	aspect-ratio: 16 / 9;
	object-fit: cover;
	border-radius: 8px;
	background: #ddd;
}

.admin-image-tile span {
	font-size: 0.78rem;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.admin-image-tile.selected {
	outline: 3px solid rgba(184,154,87,0.72);
}

.admin-image-none {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 76px;
	border-radius: 8px;
	background: rgba(255,255,255,0.65);
	color: #6f6246;
}

.admin-selected-image-preview img {
	width: 78px;
	height: 46px;
	object-fit: cover;
	border-radius: 8px;
}
.admin-image-picker-card {
	scrollbar-width: none;
	-ms-overflow-style: none;
}

.admin-image-picker-card::-webkit-scrollbar {
	width: 0;
	height: 0;
	display: none;
}

/* =========================================================
   Observatörsläge: admin med stift_id = 0
========================================================= */

body.observer-mode #uppdrag_panel {
	display: none !important;
}

body.observer-mode #handlingsfalt {
	display: block !important;
}

body.observer-mode #stift_panel {
	display: block !important;
	background: rgba(35, 35, 35, 0.84);
	color: #fff;
}

body.observer-mode #mobile_uppdrag_toggle,
body.observer-mode #toggle-uppdrag-btn {
	display: none !important;
}

body.observer-mode .action-group,
body.observer-mode .invitation-list,
body.observer-mode #handlingsfalt-invitations-anchor {
	display: none !important;
}

body.observer-mode .observer-sidebar-stats {
	margin-top: 10px;
	padding: 10px;
	border-radius: 12px;
	border: 1px solid rgba(255,255,255,0.22);
	background: rgba(20,20,20,0.24);
	color: #fff;
}

body.observer-mode .observer-sidebar-stats h3 {
	margin: 0 0 8px;
	font-size: 0.95rem;
}

body.observer-mode .observer-stat-row {
	display: flex;
	justify-content: space-between;
	gap: 10px;
	padding: 4px 0;
	border-top: 1px solid rgba(255,255,255,0.10);
	font-size: 0.88rem;
}

body.observer-mode .observer-stat-row:first-of-type {
	border-top: none;
}

body.observer-mode .observer-stat-row strong {
	white-space: nowrap;
}

body.observer-mode .delta-plus {
	color: #b8f0b8;
	font-weight: 700;
}

body.observer-mode .delta-minus {
	color: #ffb6a8;
	font-weight: 700;
}

body.observer-mode .observer-stat-note {
	margin-top: 8px;
	font-size: 0.78rem;
	opacity: 0.82;
	line-height: 1.35;
}

body.observer-mode .observer-stats {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	align-items: center;
}

body.observer-mode .observer-stats-note {
	font-size: 0.82rem;
	opacity: 0.86;
}

@media (max-width: 900px) {
	body.observer-mode #mobile_handlingsfalt_toggle,
	body.observer-mode #mobile_stift_toggle {
		display: flex !important;
	}

	body.observer-mode.mobile-handlingsfalt-open #handlingsfalt {
		transform: translateX(0);
	}

	body.observer-mode.mobile-stift-open #stift_panel {
		transform: translateY(0);
	}
}

#account_modal {
	position: fixed;
	inset: 0;
	display: none !important;
	pointer-events: none !important;
	visibility: hidden;
	z-index: var(--z-menu-modal);
}

#account_modal.open {
	display: block !important;
	pointer-events: auto !important;
	visibility: visible;
}

.account-modal-stack {
	display: grid;
	gap: 16px;
}

.account-modal-section {
	border: 1px solid rgba(139, 119, 80, 0.28);
	border-radius: 14px;
	padding: 14px;
	background: rgba(255, 253, 246, 0.82);
}

.account-modal-section h3 {
	margin: 0 0 8px;
	color: #2b2418;
	font-size: 1rem;
}

.account-muted {
	margin: 0 0 12px;
	color: #665b4c;
	font-size: 0.92rem;
	line-height: 1.45;
}

.account-form {
	display: grid;
	gap: 10px;
}

.account-form label,
label.account-form {
	display: grid;
	gap: 5px;
	font-weight: 650;
	color: #2b2418;
}

.account-form input {
	width: 100%;
	box-sizing: border-box;
	border-radius: 10px;
	border: 1px solid rgba(139, 119, 80, 0.45);
	background: #fffdf7;
	color: #2b2418;
	padding: 8px 10px;
	font: inherit;
}

.account-danger-zone {
	border-color: rgba(160, 60, 50, 0.38);
	background: rgba(255, 245, 242, 0.9);
}

.account-danger-btn {
	border-color: rgba(160, 60, 50, 0.7) !important;
	background: linear-gradient(to bottom, #d96a6a, #a43a3a) !important;
	color: #fff !important;
}

body.observer-mode .parish-card.observer-parish {
	border: 1px solid rgba(255,255,255,0.42);
	box-shadow: 0 4px 14px rgba(0,0,0,0.18);
}

body.observer-mode .observer-sidebar-stats {
	margin-top: 10px;
	clear: both;
}

/* =========================================================
   Kart-sökning
   Sökfältet skapas i JS. ID-reglerna finns kvar för nuvarande HTML.
========================================================= */

.map-search,
#map_search {
	position: fixed !important;
	right: 12px !important;
	bottom: 66px !important;
	z-index: var(--z-map-search, 906) !important;
	width: 42px;
	height: 42px;
	pointer-events: auto !important;
	transition: width 0.18s ease;
}

.map-search.open,
#map_search.open {
	width: min(330px, calc(100vw - 24px));
}

.map-search-row,
#map_search .map-search-row {
	position: relative;
	width: 100%;
	height: 42px;
	display: flex;
	align-items: center;
	justify-content: flex-end;
}

.map-search-toggle,
#map_search_toggle.map-search-toggle {
	position: absolute !important;
	left: 0 !important;
	top: 0 !important;
	z-index: 5 !important;
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	visibility: visible !important;
	pointer-events: auto !important;
	width: 42px;
	height: 42px;
	padding: 0 0 2px 0;
	border-radius: 999px;
	border: 1px solid rgba(184, 154, 87, 0.70);
	background:
		linear-gradient(
			to bottom,
			var(--gold-bg-top, rgba(255,248,232,0.96)),
			var(--gold-bg-bottom, rgba(236,224,191,0.92))
		);
	backdrop-filter: blur(4px);
	color: var(--gold-text, #2b2418);
	font-size: 17px;
	line-height: 1;
	box-shadow:
		0 2px 8px rgba(0, 0, 0, 0.16),
		inset 0 1px 0 rgba(255, 255, 255, 0.55);
	opacity: 0.92 !important;
	transition:
		left 0.18s ease,
		opacity 0.14s ease,
		background-color 0.14s ease,
		box-shadow 0.14s ease,
		border-color 0.14s ease;
}

.map-search-toggle:hover,
.map-search-toggle:focus-visible,
#map_search_toggle.map-search-toggle:hover,
#map_search_toggle.map-search-toggle:focus-visible {
	background:
		linear-gradient(
			to bottom,
			var(--gold-bg-top-hover, rgba(255,250,239,0.98)),
			var(--gold-bg-bottom-hover, rgba(232,217,176,0.95))
		);
	border-color: rgba(184, 154, 87, 0.95);
	color: #21190d;
	box-shadow:
		0 3px 11px rgba(0, 0, 0, 0.20),
		0 0 0 3px rgba(184, 154, 87, 0.18),
		inset 0 1px 0 rgba(255, 255, 255, 0.62);
	opacity: 1 !important;
}

.map-search.open .map-search-toggle,
#map_search.open #map_search_toggle.map-search-toggle {
	left: 5px !important;
	top: 5px !important;
	z-index: 2;
	width: 32px;
	height: 32px;
	border: 1px solid rgba(184, 154, 87, 0.35);
	background: rgba(244, 230, 194, 0.72);
	color: rgba(43, 36, 24, 0.78);
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
	opacity: 0.72 !important;
}

.map-search.open .map-search-toggle:hover,
.map-search.open .map-search-toggle:focus-visible,
#map_search.open #map_search_toggle.map-search-toggle:hover,
#map_search.open #map_search_toggle.map-search-toggle:focus-visible {
	background: rgba(236, 216, 167, 0.88);
	color: #21190d;
	border-color: rgba(184, 154, 87, 0.70);
	box-shadow: none;
	opacity: 1 !important;
}

.map-search-input,
#map_search_input.map-search-input {
	width: 42px;
	height: 42px;
	border-radius: 999px;
	border: 1px solid rgba(184, 154, 87, 0.62);
	background:
		linear-gradient(
			to bottom,
			rgba(255, 249, 235, 0.96),
			rgba(239, 226, 193, 0.93)
		);
	backdrop-filter: blur(4px);
	color: var(--gold-text, #2b2418);
	font: inherit;
	font-size: 0.95rem;
	padding: 0 0 0 42px;
	box-shadow:
		0 2px 8px rgba(0, 0, 0, 0.16),
		inset 0 1px 0 rgba(255, 255, 255, 0.58);
	outline: none;
	opacity: 0;
	pointer-events: none;
	transition:
		width 0.18s ease,
		opacity 0.12s ease,
		background-color 0.14s ease,
		border-color 0.14s ease,
		box-shadow 0.14s ease;
}

.map-search.open .map-search-input,
#map_search.open #map_search_input.map-search-input {
	width: 100%;
	opacity: 1;
	pointer-events: auto;
	padding: 0 14px 0 42px;
	background:
		linear-gradient(
			to bottom,
			rgba(255, 250, 238, 0.98),
			rgba(238, 224, 188, 0.96)
		);
}

.map-search-input::placeholder,
#map_search_input.map-search-input::placeholder {
	color: rgba(43, 36, 24, 0.54);
}

.map-search-input:focus,
#map_search_input.map-search-input:focus {
	background:
		linear-gradient(
			to bottom,
			rgba(255, 252, 244, 0.99),
			rgba(240, 226, 190, 0.98)
		);
	border-color: rgba(184, 154, 87, 0.98);
	box-shadow:
		0 4px 15px rgba(0, 0, 0, 0.18),
		0 0 0 3px rgba(184, 154, 87, 0.22),
		inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

.map-search-results {
	display: none;
	position: absolute;
	right: 0;
	bottom: 52px;
	width: min(330px, calc(100vw - 24px));
	flex-direction: column;
	gap: 5px;
}

.map-search.open .map-search-results.has-results {
	display: flex;
}

.map-search-result {
	width: 100%;
	border: 1px solid rgba(184, 154, 87, 0.42);
	border-radius: 99px;
	background:
		linear-gradient(
			to bottom,
			rgba(255, 249, 235, 0.45),
			rgba(239, 226, 193, 0.55)
		);
	backdrop-filter: blur(4px);
	color: var(--gold-text, #2b2418);
	padding: 8px 9px 8px 11px;
	text-align: left;
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	gap: 8px;
	align-items: center;
	font: inherit;
	box-shadow:
		0 4px 12px rgba(0, 0, 0, 0.13),
		inset 0 1px 0 rgba(255, 255, 255, 0.45);
	transition:
		background-color 0.12s ease,
		border-color 0.12s ease,
		box-shadow 0.12s ease,
		transform 0.12s ease;
}

.map-search-result:hover {
}

.map-search-result.is-active {
	background:
		linear-gradient(
			to bottom,
			rgba(255, 252, 244, 0.98),
			rgba(237, 220, 180, 0.95)
		);
	border-color: rgba(218, 188, 116, 0.98);
	box-shadow:
		0 7px 18px rgba(0, 0, 0, 0.26),
		0 0 0 2px rgba(184, 154, 87, 0.42),
		inset 0 1px 0 rgba(255, 255, 255, 0.18);
	transform: translateX(-5px);
}

.map-search-result-main {
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.map-search-result-title {
	font-weight: 700;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	line-height: 1.18;
}

.map-search-result-meta {
	font-size: 0.79rem;
	color: rgba(43, 36, 24, 0.66);
	opacity: 1;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	line-height: 1.15;
}

.map-search-result.is-active .map-search-result-meta {
	color: rgba(255, 247, 229, 0.74);
}

.map-search-result-kind {
	border: 1px solid rgba(184, 154, 87, 0.42);
	background: rgba(255, 248, 232, 0.62);
	color: rgba(43, 36, 24, 0.78);
	border-radius: 999px;
	padding: 3px 7px;
	font-size: 0.72rem;
	line-height: 1;
	white-space: nowrap;
	opacity: 0.82;
}


body.fake-cursor-enabled .map-search,
body.fake-cursor-enabled .map-search * {
	cursor: none !important;
}

@media (max-width: 900px) {
	.map-search {
		right: 10px;
		bottom: 64px;
	}

	body.mobile-map-modes-open .map-search,
	body.mobile-uppdrag-open .map-search {
		display: none;
	}
}
/* =========================================================
   Mitran time/date inputs
========================================================= */

.mitran-time-input,
.mitran-date-input {
	font-variant-numeric: tabular-nums;
}

.mitran-timepicker-menu {
	position: fixed;
	z-index: 988;
	display: flex;
	flex-direction: column;
	gap: 3px;
	padding: 6px;
	box-sizing: border-box;
	overflow-y: auto;
	overscroll-behavior: contain;
	border: 1px solid rgba(184,154,87,0.58);
	border-radius: 13px;
	background: linear-gradient(to bottom, rgba(255,250,238,0.98), rgba(232,217,176,0.98));
	box-shadow: 0 16px 36px rgba(0,0,0,0.28);
	color: #2b2418;
	scrollbar-width: none;
	-ms-overflow-style: none;
}

.mitran-timepicker-menu::-webkit-scrollbar {
	width: 0;
	height: 0;
	display: none;
}

.mitran-timepicker-option {
	width: 100%;
	min-height: 30px;
	padding: 6px 9px;
	border: 1px solid transparent !important;
	border-radius: 9px;
	background: transparent !important;
	box-shadow: none !important;
	color: #2b2418 !important;
	font: inherit;
	font-variant-numeric: tabular-nums;
	text-align: left;
}

.mitran-timepicker-option:hover,
.mitran-timepicker-option.is-active {
	background: rgba(184,154,87,0.24) !important;
	border-color: rgba(184,154,87,0.46) !important;
}

body.fake-cursor-enabled .mitran-timepicker-menu,
body.fake-cursor-enabled .mitran-timepicker-menu *,
body.fake-cursor-enabled .mitran-time-input,
body.fake-cursor-enabled .mitran-date-input {
	cursor: none !important;
}
/* =========================================================
   Kartlänkar: församlingar och stift
========================================================= */

.parish-link,
.stift-link,
.news-parish-link {
	color: inherit;
	font-weight: 700;
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
	text-decoration-color: rgba(184, 154, 87, 0.78);
	border-radius: 5px;
	padding: 0 2px;
}

.parish-link:hover,
.parish-link:focus-visible,
.stift-link:hover,
.stift-link:focus-visible,
.news-parish-link:hover,
.news-parish-link:focus-visible {
	background: rgba(184, 154, 87, 0.18);
	text-decoration-color: currentColor;
	outline: none;
}

.news-card .parish-link,
.news-card .news-parish-link {
	position: relative;
	z-index: 2;
}

.news-article-modal-body .parish-link,
.news-article-modal-body .news-parish-link,
#news_article_body .parish-link,
#news_article_body .news-parish-link {
	color: #5a3d11;
}

.news-article-modal-body .parish-link:hover,
.news-article-modal-body .news-parish-link:hover,
#news_article_body .parish-link:hover,
#news_article_body .news-parish-link:hover {
	background: rgba(184, 154, 87, 0.20);
}




/* =========================================================
   Visioner – slutlig modal-layout
========================================================= */

.vision-intro-text {
	margin: 0 0 14px;
	font-size: 1rem;
	line-height: 1.55;
	color: #2d261b;
}

.vision-intro-text strong {
	font-weight: 800;
}

.vision-inline-icons {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin: 0 4px;
	vertical-align: middle;
}

.vision-inline-axis-icon,
.vision-inline-icons img {
	width: 21px;
	height: 21px;
	object-fit: contain;
	vertical-align: middle;
	filter:
		drop-shadow(0 0 2px rgba(255,255,255,0.28))
		drop-shadow(0 1px 1px rgba(0,0,0,0.18));
}

.vision-progress-box {
	border-radius: 16px;
	padding: 12px 14px;
	margin: 0 0 18px;
	color: #fff;
	border: 1px solid rgba(255,255,255,0.38);
	box-shadow:
		inset 0 1px 0 rgba(255,255,255,0.25),
		0 8px 18px rgba(0,0,0,0.16);
	text-shadow: 0 1px 2px rgba(0,0,0,0.35);
	line-height: 1.45;
}

.vision-section {
	margin-top: 20px;
}

.vision-section h3 {
	margin: 0 0 10px;
	font-size: 1.02rem;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: rgba(55, 44, 25, 0.84);
	text-shadow: 0 1px 0 rgba(255,255,255,0.38);
}

.vision-columns {
	display: grid;
	grid-template-columns: 1fr;
	gap: 18px;
}

@media (min-width: 980px) {
	.vision-columns {
		grid-template-columns: 1fr 1fr;
		align-items: start;
	}
}

.vision-column {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.vision-card {
	border-radius: 16px;
	border: 1px solid rgba(0,0,0,0.14);
	overflow: hidden;
	background:
		radial-gradient(circle at top center, rgba(255,255,255,0.22), transparent 60%),
		linear-gradient(to bottom, rgba(168,170,178,0.30), rgba(120,125,136,0.18));
	color: #2d2b28;
	box-shadow:
		inset 0 1px 0 rgba(255,255,255,0.30),
		0 3px 12px rgba(0,0,0,0.08);
	transition:
		transform 0.16s ease,
		box-shadow 0.16s ease,
		background 0.16s ease;
}

.vision-card:hover {
	transform: translateY(-1px);
	box-shadow:
		inset 0 1px 0 rgba(255,255,255,0.34),
		0 8px 18px rgba(0,0,0,0.14);
}

.vision-card.has-stift-color {
	color: #fff;
	text-shadow: 0 1px 2px rgba(0,0,0,0.38);
	border-color: rgba(255,255,255,0.28);
}

.vision-card.is-led-by-self {
	border-color: rgba(255, 221, 120, 0.95);
	box-shadow:
		inset 0 1px 0 rgba(255,255,255,0.36),
		0 0 0 2px rgba(255, 221, 120, 0.74),
		0 0 18px rgba(255, 224, 136, 0.46),
		0 8px 20px rgba(0,0,0,0.18);
}

.vision-card-toggle {
	list-style: none;
	width: 100%;
	display: flex;
	align-items: center;
	gap: 10px;
	border: 0 !important;
	background: transparent !important;
	color: inherit !important;
	padding: 13px 22px 13px 14px !important;
	text-align: left;
	box-shadow: none !important;
	cursor: pointer;
}

.vision-card-toggle::-webkit-details-marker {
	display: none;
}

.vision-card-heading {
	display: flex;
	flex-direction: column;
	gap: 3px;
	min-width: 0;
	flex: 1 1 auto;
}

.vision-card-title {
	font-weight: 800;
	font-size: 1rem;
	line-height: 1.22;
	min-width: 0;
}

.vision-card-subtitle {
	font-size: 0.86rem;
	line-height: 1.25;
	opacity: 0.92;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.vision-card-spacer {
	flex: 0 0 4px;
}

.vision-card-status {
	flex: 0 0 auto;
	width: 28px;
	height: 28px;
	margin-right: 10px;
	border-radius: 999px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-weight: 900;
	font-size: 1rem;
	background: rgba(255,255,255,0.42);
	box-shadow:
		inset 0 1px 0 rgba(255,255,255,0.44),
		0 1px 3px rgba(0,0,0,0.16);
	text-shadow: none;
	color: rgba(30,30,30,0.88);
}

.vision-card-details {
	padding: 0 16px 13px 14px;
	line-height: 1.45;
}

.vision-card-details p {
	margin: 7px 0;
}

.vision-permanent {
	font-style: italic;
	opacity: 0.86;
}

.vision-muted {
	opacity: 0.72;
}

.vision-error {
	color: #8b1f1f;
	font-weight: 700;
}

/* =========================================================
   Visioner – subtil bottenindikator och skölddekal
========================================================= */

.vision-card {
	position: relative;
	overflow: visible;
	margin-top: 16px;
}

.vision-card::after {
	content: "▼";
	text-align: center;
	position: absolute;
	left: 18px;
	right: 18px;
	bottom: 0;
	height: 16px;
	border-radius: 0 0 16px 16px;
	background: linear-gradient(to bottom, rgba(0,0,0,0), rgba(0,0,0,0.16));
	opacity: 0.42;
	pointer-events: none;
	transition: opacity 0.16s ease, height 0.16s ease;
}

.vision-card[open]::after {
	content: "▲";
	text-align: center;
	height: 10px;
	opacity: 0.24;
}

.vision-card-toggle {
	position: relative;
	padding: 16px 58px 20px 14px !important;
	min-height: 70px;
}

.vision-card-status,
.vision-card-expand-cue {
	display: none !important;
}

.vision-card-decal {
	position: absolute;
	top: -12px;
	right: 80px;
	z-index: 4;
	width: 40px;
	height: 36px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-weight: 900;
	font-size: 0.98rem;
	line-height: 1;
	color: #fff;
	clip-path: polygon(50% 0%, 86% 12%, 80% 68%, 50% 100%, 20% 68%, 14% 12%);
	border-radius: 8px;
	box-shadow:
		0 3px 8px rgba(0,0,0,0.24),
		inset 0 1px 0 rgba(255,255,255,0.28);
	text-shadow: 0 1px 1px rgba(0,0,0,0.34);
	opacity: 0.88;
}

.vision-card-decal.is-unfulfilled {
	background: linear-gradient(to bottom, rgba(164,55,52,0.92), rgba(112,31,31,0.90));
}

.vision-card-decal.is-fulfilled {
	background: linear-gradient(to bottom, rgba(70,154,83,0.95), rgba(34,104,54,0.92));
}

.vision-card-decal::after {
	content: "";
	position: absolute;
	inset: 3px 5px 8px;
	border-top: 1px solid rgba(255,255,255,0.36);
	border-left: 1px solid rgba(255,255,255,0.18);
	border-right: 1px solid rgba(0,0,0,0.12);
	clip-path: inherit;
	pointer-events: none;
}

.vision-card-details {
	padding-bottom: 20px;
}

.vision-target-parish {
	display: inline;
	font-weight: 800;
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
	border-radius: 999px;
	padding: 1px 4px;
	white-space: nowrap;
}

.vision-target-parish.is-owned {
	color: #124f24;
	background: rgba(104, 190, 116, 0.26);
	text-decoration-color: rgba(35, 125, 54, 0.72);
}

.vision-target-parish.is-missing {
	color: #8f2020;
	background: rgba(205, 74, 66, 0.18);
	text-decoration-color: rgba(160, 40, 36, 0.72);
}

.vision-card.has-stift-color .vision-target-parish.is-owned {
	color: #d9ffde;
	background: rgba(18, 90, 34, 0.35);
	text-decoration-color: rgba(217,255,222,0.75);
}

.vision-card.has-stift-color .vision-target-parish.is-missing {
	color: #ffe0dc;
	background: rgba(115, 24, 22, 0.34);
	text-decoration-color: rgba(255,224,220,0.75);
}

/* =========================================================
   Visioner – observatörsläge
========================================================= */

.vision-observer-box {
	background:
		radial-gradient(circle at top left, rgba(255,255,255,0.28), transparent 58%),
		linear-gradient(to bottom, rgba(102, 94, 78, 0.88), rgba(70, 64, 54, 0.86)) !important;
}

.vision-stift-groups {
	display: flex;
	flex-direction: column;
	gap: 18px;
}

.vision-stift-group {
	border: 1px solid color-mix(in srgb, var(--vision-group-color, #6f6f76) 46%, rgba(0,0,0,0.18));
	border-radius: 18px;
	padding: 12px;
	background:
		linear-gradient(to bottom, rgba(255,255,255,0.46), rgba(255,255,255,0.18)),
		color-mix(in srgb, var(--vision-group-color, #6f6f76) 18%, transparent);
	box-shadow:
		inset 0 1px 0 rgba(255,255,255,0.32),
		0 8px 20px rgba(0,0,0,0.08);
}

.vision-stift-group-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	margin: 0 0 4px;
	padding: 0 2px 4px;
	color: #2d261b;
}

.vision-stift-group-header strong {
	font-size: 1.02rem;
	line-height: 1.2;
}

.vision-stift-group-header span {
	flex: 0 0 auto;
	border-radius: 999px;
	padding: 4px 8px;
	font-size: 0.82rem;
	font-weight: 750;
	background: rgba(255,255,255,0.62);
	border: 1px solid rgba(0,0,0,0.10);
	color: rgba(45, 38, 27, 0.86);
}

/* =========================================================
   Visioner – observatör, utvalda visioner och scrollbar
========================================================= */

.vision-observer-box {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.vision-observer-note {
	display: block;
	font-size: 0.88rem;
	font-weight: 500;
	opacity: 0.88;
	margin-top: 2px;
}

.vision-card-selected {
	display: inline-flex;
	align-self: flex-start;
	width: fit-content;
	border-radius: 999px;
	padding: 2px 7px;
	margin-bottom: 3px;
	font-size: 0.72rem;
	font-weight: 800;
	letter-spacing: 0.01em;
	background: rgba(255,255,255,0.62);
	border: 1px solid rgba(0,0,0,0.10);
	color: rgba(42, 34, 22, 0.82);
}

#vision_modal .custom-scrollbar {
	z-index: calc(var(--z-vision-modal) + 2);
}

#vision_modal .vision-modal-body + .custom-scrollbar {
	right: 6px;
	left: auto;
	width: 7px;
	background: rgba(255,255,255,0.18);
}

#vision_modal .vision-modal-body + .custom-scrollbar .custom-scrollbar-thumb {
	background: rgba(114, 98, 66, 0.55);
}


/* =========================================================
   Visioner – endast vertikal custom-scrollbar
========================================================= */

#vision_modal .vision-modal-body {
	overflow-y: auto !important;
	overflow-x: hidden !important;
	scrollbar-width: none !important;
	-ms-overflow-style: none !important;
	padding-right: 24px;
}

/* Dölj alltid native scrollbar, både vertikal och horisontell */
#vision_modal .vision-modal-body::-webkit-scrollbar {
	width: 0 !important;
	height: 0 !important;
	display: none !important;
}

/* Hindra innehåll från att skapa horisontell scroll */
#vision_modal .vision-modal-body,
#vision_modal .vision-modal-body * {
	max-width: 100%;
	min-width: 0;
	box-sizing: border-box;
}

#vision_modal .vision-columns,
#vision_modal .vision-column,
#vision_modal .vision-stift-group,
#vision_modal .vision-card {
	min-width: 0;
	max-width: 100%;
}

#vision_modal .vision-card-title,
#vision_modal .vision-card-subtitle,
#vision_modal .vision-target-parishes,
#vision_modal .vision-stift-group-header {
	overflow-wrap: anywhere;
}

/* Använd den DOM-baserade custom-scrollbaren, inte browserns */
#vision_modal .vision-modal-body + .custom-scrollbar {
	display: block !important;
	left: auto !important;
	right: 7px !important;
	width: 7px !important;
	background: rgba(255,255,255,0.20);
	z-index: calc(var(--z-vision-modal) + 3);
	cursor: none !important;
}

/* Visa den tydligt när modalens innehåll används */
#vision_modal.open .vision-modal-body:hover + .custom-scrollbar,
#vision_modal.open .vision-modal-body:focus-within + .custom-scrollbar,
#vision_modal.open .vision-modal-body.is-scroll-active + .custom-scrollbar,
#vision_modal.open .vision-modal-body + .custom-scrollbar:hover,
#vision_modal.open .vision-modal-body + .custom-scrollbar.is-hovered {
	opacity: 1 !important;
}

#vision_modal .vision-modal-body + .custom-scrollbar .custom-scrollbar-thumb {
	background: rgba(114, 98, 66, 0.68);
	border-radius: 999px;
	cursor: none !important;
}

#vision_modal .vision-modal-body + .custom-scrollbar .custom-scrollbar-thumb:hover,
#vision_modal .vision-modal-body + .custom-scrollbar.is-hovered .custom-scrollbar-thumb {
	background: rgba(146, 124, 83, 0.86);
	box-shadow:
		0 0 0 1px rgba(184, 154, 87, 0.42),
		0 0 14px rgba(184, 154, 87, 0.30);
}
/* Vinst - vinnare */

.vision-victory-box {
	background:
		radial-gradient(circle at top left, rgba(255,255,255,0.32), transparent 55%),
		linear-gradient(to bottom, rgba(133, 98, 36, 0.96), rgba(82, 61, 29, 0.94)) !important;
	border: 1px solid rgba(255, 230, 162, 0.65);
	box-shadow:
		inset 0 1px 0 rgba(255,255,255,0.34),
		0 10px 26px rgba(0,0,0,0.18);
}

/* =========================================================
   Vinstsida
========================================================= */

#victory_modal {
	position: fixed;
	inset: 0;
	z-index: calc(var(--z-vision-modal) + 10);
	display: none;
	align-items: center;
	justify-content: center;
	padding: 24px;
}

#victory_modal.open {
	display: flex;
}

.victory-modal-backdrop {
	position: absolute;
	inset: 0;
	background:
		radial-gradient(circle at top, rgba(255, 230, 150, 0.24), transparent 42rem),
		rgba(20, 17, 11, 0.72);
	backdrop-filter: blur(5px);
}

.victory-modal-card {
	position: relative;
	width: min(860px, calc(100vw - 32px));
	max-height: min(780px, calc(100vh - 32px));
	display: flex;
	flex-direction: column;
	border-radius: 26px;
	overflow: hidden;
	background:
		linear-gradient(to bottom, rgba(255, 250, 232, 0.98), rgba(235, 222, 185, 0.96));
	border: 1px solid rgba(184, 154, 87, 0.62);
	box-shadow:
		0 26px 70px rgba(0,0,0,0.36),
		inset 0 1px 0 rgba(255,255,255,0.65);
	color: #2a2114;
}

.victory-modal-header {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 16px;
	padding: 22px 24px 16px;
	border-bottom: 1px solid rgba(112, 85, 40, 0.22);
	background:
		radial-gradient(circle at top left, rgba(255,255,255,0.5), transparent 60%),
		linear-gradient(to bottom, rgba(198, 164, 92, 0.24), rgba(255,255,255,0.04));
}

.victory-kicker {
	text-transform: uppercase;
	letter-spacing: 0.18em;
	font-size: 0.75rem;
	font-weight: 800;
	color: rgba(84, 62, 28, 0.72);
}

.victory-modal-header h2 {
	margin: 4px 0 0;
	font-family: Georgia, serif;
	font-size: clamp(1.8rem, 4vw, 3rem);
	line-height: 1.05;
}

.victory-modal-body {
	padding: 20px 24px;
	overflow-y: auto;
}

.victory-lead {
	margin: 0 0 18px;
	font-size: 1.05rem;
	line-height: 1.45;
}

.victory-winner-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
	gap: 14px;
}

.victory-winner-card {
	border-radius: 18px;
	padding: 16px;
	background: rgba(255,255,255,0.62);
	border: 1px solid rgba(120, 92, 42, 0.22);
	box-shadow: 0 10px 24px rgba(0,0,0,0.08);
}

.victory-winner-card h3 {
	margin: 0 0 6px;
	font-size: 1.25rem;
}

.victory-count {
	display: inline-flex;
	border-radius: 999px;
	padding: 4px 9px;
	margin-bottom: 12px;
	font-weight: 800;
	background: rgba(198, 164, 92, 0.22);
	border: 1px solid rgba(120, 92, 42, 0.18);
}

.victory-vision-list {
	margin: 8px 0 0;
	padding-left: 18px;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.victory-vision-list li strong {
	display: block;
}

.victory-vision-list li span {
	display: block;
	margin-top: 2px;
	font-size: 0.9rem;
	color: rgba(42, 33, 20, 0.76);
}

.victory-muted {
	color: rgba(42, 33, 20, 0.70);
}

.victory-modal-actions {
	display: flex;
	justify-content: flex-end;
	gap: 10px;
	padding: 14px 24px 20px;
	border-top: 1px solid rgba(112, 85, 40, 0.18);
}

/* Nyhet om vinst */
.news-card--victory {
	grid-column: 1 / -1;
	background:
		radial-gradient(circle at top left, rgba(255,255,255,0.6), transparent 55%),
		linear-gradient(to bottom, rgba(255, 247, 220, 0.98), rgba(226, 202, 145, 0.96));
	border-color: rgba(184, 154, 87, 0.55);
}

.news-card--victory h3 {
	font-family: Georgia, serif;
	font-size: clamp(1.55rem, 3vw, 2.25rem);
}

.news-card--victory .news-card-kicker {
	color: #7b5822;
	font-weight: 900;
}

.vision-victory-box {
	width: 100%;
	text-align: left;
	cursor: pointer !important;
}

.vision-victory-box:hover {
	filter: brightness(1.04);
	transform: translateY(-1px);
}

.vision-victory-open-hint {
	display: block;
	margin-top: 4px;
	font-size: 0.82rem;
	font-weight: 700;
	opacity: 0.82;
}

/* Låst vid avslutat läge */
.admin-finished-notice {
	grid-column: 1 / -1;
	margin: 0 0 14px;
	padding: 12px 14px;
	border-radius: 14px;
	background: rgba(70, 48, 24, 0.88);
	color: #fff3d2;
	border: 1px solid rgba(255, 220, 140, 0.42);
	box-shadow: 0 10px 24px rgba(0,0,0,0.14);
}

.admin-form.is-disabled,
.custom-dropdown.is-disabled {
	opacity: 0.55;
	pointer-events: none;
	filter: grayscale(0.35);
}

/* =========================================================
   Visioner – kortinfo: ellips infällt, full text utfällt
========================================================= */

#vision_modal .vision-card-heading {
	min-width: 0;
	max-width: 100%;
}

#vision_modal .vision-card:not([open]) .vision-card-subtitle {
	display: block;
	max-width: 100%;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	overflow-wrap: normal;
	word-break: normal;
}

#vision_modal .vision-card[open] .vision-card-subtitle {
	display: block;
	max-width: 100%;
	white-space: normal;
	overflow: visible;
	text-overflow: clip;
	overflow-wrap: anywhere;
	word-break: normal;
}

#vision_modal .vision-card[open] .vision-card-toggle {
	align-items: flex-start;
}
/* =========================================================
   TD / rapportbunt v4
   Tillägg längst ned för att inte skriva över eller ta bort
   någon befintlig stil i spelet.
========================================================= */

#news_modal.open {
	display: block !important;
}

#news_modal .news-modal-backdrop {
	background: rgba(20, 20, 18, 0.54) !important;
	backdrop-filter: none !important;
}

#news_modal .reporting-desk {
	position: absolute;
	inset: 18px 20px 20px;
	border: 0;
	border-radius: 12px;
	background: transparent;
	box-shadow: none;
	overflow: hidden;
	pointer-events: auto;
}

#news_modal .reporting-desk-close {
	position: absolute;
	top: 8px;
	right: 8px;
	z-index: 90;
	width: 38px;
	height: 38px;
	padding: 0;
	border-radius: 9px;
	border: 1px solid rgba(112, 91, 50, 0.45);
	background: rgba(255, 248, 224, 0.95);
	color: #4c402c;
	box-shadow: 0 2px 7px rgba(0,0,0,0.18);
	font-size: 18px;
	line-height: 36px;
}

#news_modal .reporting-desk-stage {
	position: absolute;
	inset: 104px 12px 12px;
	overflow: visible;
	font-family: Georgia, 'Times New Roman', serif;
}

#news_modal .report-paper {
	position: absolute;
	box-sizing: border-box;
	color: #28241e;
	border: 1px solid rgba(71, 61, 45, 0.34);
	background: #ebe6d7;
	box-shadow: 0 6px 18px rgba(0,0,0,0.22);
	cursor: pointer;
	transition: none !important;
	filter: none !important;
	transform-origin: 50% 14%;
}

#news_modal .report-paper--td {
	left: 2.0%;
	top: 4.4%;
	width: 92.0%;
	height: 91.0%;
	z-index: 13;
	background: #ddd5be;
	transform: rotate(-0.48deg);
}

#news_modal .report-paper--director {
	left: 3.15%;
	top: 5.25%;
	width: 92.0%;
	height: 90.7%;
	z-index: 12;
	background: #f0ede4;
	transform: rotate(0.42deg);
}

#news_modal .report-paper--dioceses {
	left: 4.3%;
	top: 6.1%;
	width: 92.0%;
	height: 90.4%;
	z-index: 11;
	background: #e9e5da;
	transform: rotate(-0.34deg);
}

#news_modal .report-paper--parishes {
	left: 5.45%;
	top: 6.95%;
	width: 92.0%;
	height: 90.1%;
	z-index: 10;
	background: #e6e1d4;
	transform: rotate(0.53deg);
}

#news_modal .report-paper.is-focused {
	left: 3.8% !important;
	top: 4.2% !important;
	width: 91.7% !important;
	height: 92.0% !important;
	z-index: 60 !important;
	box-shadow: 0 10px 28px rgba(0,0,0,0.30);
	transform: rotate(-0.10deg) !important;
}

/* Större post-it-lappar, fyra nästan kant i kant över buntens bredd. */
#news_modal .paper-postit {
	position: absolute;
	top: -96px;
	width: 23.2%;
	height: 136px;
	box-sizing: border-box;
	padding: 10px 11px 43px;
	z-index: 6;
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	border: 1px solid rgba(96,75,35,0.13);
	box-shadow: 0 3px 8px rgba(0,0,0,0.18);
	font-family: 'Segoe Print', 'Bradley Hand', 'Comic Sans MS', cursive;
	font-size: clamp(17px, 1.25vw, 23px);
	font-weight: 650;
	line-height: 1.02;
	color: #352d24;
	user-select: none;
}

#news_modal .paper-postit span {
	display: block;
	max-width: 100%;
}

#news_modal .paper-postit--yellow { background: #f3da74; }
#news_modal .paper-postit--pink { background: #eaa1ae; }
#news_modal .paper-postit--td { left: 0.9%; transform: rotate(-2.6deg) !important; }
#news_modal .paper-postit--director { left: 25.6%; transform: rotate(2.0deg) !important; }
#news_modal .paper-postit--dioceses { left: 50.3%; transform: rotate(-2.1deg) !important; }
#news_modal .paper-postit--parishes { left: 75.0%; transform: rotate(2.5deg) !important; }

#news_modal .report-paper-content {
	position: relative;
	height: 100%;
	box-sizing: border-box;
	padding: 30px 34px 34px;
	overflow-y: auto;
	overflow-x: hidden;
	overscroll-behavior: contain;
	scrollbar-width: none;
	background: transparent;
}

#news_modal .report-paper-content::-webkit-scrollbar {
	width: 0;
	height: 0;
	display: none;
}

#news_modal .report-paper-content--td {
	padding: 0;
	overflow: hidden;
}

#news_modal .report-paper-content--stats {
	height: calc(100% - 64px);
	padding: 12px 18px 18px;
	font-family: 'Courier New', monospace;
	font-size: 10px;
	line-height: 1.28;
}

#news_modal .report-paper-loading,
#news_modal .report-paper-placeholder {
	margin: 24px 0;
	font-style: italic;
	color: rgba(47,42,34,0.58);
}

#news_modal .paper-report-heading {
	height: 64px;
	box-sizing: border-box;
	padding: 15px 22px 10px;
	border-bottom: 2px solid rgba(54,49,40,.42);
	display: grid;
	gap: 2px;
	font-family: 'Courier New', monospace;
}

#news_modal .paper-report-heading span {
	font-size: 9px;
	text-transform: uppercase;
	letter-spacing: .16em;
}

#news_modal .paper-report-heading strong {
	font-size: 18px;
	letter-spacing: .035em;
}

/* Stiftsdirektörens papper */
#news_modal .report-paper--director .report-paper-content {
	padding: 38px 54px 48px;
	font-family: Georgia, serif;
	font-size: clamp(12px, .9vw, 15px);
	line-height: 1.46;
}

#news_modal .report-paper--director .director-report::before {
	content: 'STIFTSKANSLIET';
	display: block;
	font-size: clamp(22px, 1.7vw, 30px);
	font-weight: 700;
	letter-spacing: .07em;
	padding-bottom: 8px;
	margin-bottom: 10px;
	border-bottom: 2px solid rgba(45,40,32,.48);
}

#news_modal .report-paper--director .director-report h2 {
	font-size: 14px;
	font-weight: 600;
	margin: 0 0 19px;
}

#news_modal .report-paper--director .director-report-list {
	padding-left: 22px;
}

#news_modal .report-paper--director .director-report-item {
	margin: 0 0 13px;
}

/* TD – sammanhängande tidningslayout utan fasta tomma artikelrutor. */
#news_modal .td-newspaper,
#news_modal .td-newspaper-page {
	height: 100%;
}

#news_modal .td-newspaper-page {
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	padding: 16px 22px 11px;
	background: #ddd5be;
	overflow: hidden;
}

#news_modal .td-masthead {
	flex: 0 0 auto;
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
	align-items: center;
	gap: 20px;
	min-height: 84px;
	color: #2d2922;
}

#news_modal .td-masthead-side {
	font-family: Georgia, 'Times New Roman', serif;
	font-size: clamp(13px, 1.0vw, 19px);
	font-style: italic;
	font-weight: 600;
	line-height: 1.08;
	max-width: 300px;
}

#news_modal .td-masthead-side--left {
	text-align: left;
}

#news_modal .td-masthead-side--right {
	text-align: right;
	justify-self: end;
}

#news_modal .td-masthead-center {
	text-align: center;
	line-height: 1;
}

#news_modal .td-masthead-logo {
	font-family: Georgia, 'Times New Roman', serif;
	font-size: clamp(56px, 4.9vw, 88px);
	font-weight: 700;
	letter-spacing: -.055em;
}

#news_modal .td-masthead-subtitle {
	margin-top: 2px;
	font-size: clamp(8px, .58vw, 10px);
	letter-spacing: .22em;
	text-transform: uppercase;
	opacity: .62;
}

#news_modal .td-masthead-rule {
	flex: 0 0 auto;
	height: 4px;
	margin: 1px 0 8px;
	border-top: 1px solid rgba(46,39,28,.78);
	border-bottom: 1px solid rgba(46,39,28,.48);
}

#news_modal .td-lead-row {
	flex: 0 0 auto;
	padding-bottom: 9px;
	margin-bottom: 8px;
	border-bottom: 1px solid rgba(54,47,35,.36);
}

#news_modal .td-lead-story {
	display: grid !important;
	grid-template-columns: minmax(240px, 29%) minmax(0, 1fr);
	gap: 15px;
	align-items: start;
	padding: 0 !important;
	margin: 0 !important;
	border: 0 !important;
	border-radius: 0 !important;
	background: transparent !important;
	box-shadow: none !important;
}

#news_modal .td-lead-story-image {
	width: 100%;
	height: 176px;
	border: 1px solid rgba(54,47,35,.25);
	background-size: cover;
	background-position: center;
}

#news_modal .td-lead-story-image img,
#news_modal .td-column-item-image img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

#news_modal .td-lead-story .news-card-kicker,
#news_modal .td-column-item .news-card-kicker {
	font-size: 7px !important;
	text-transform: uppercase;
	letter-spacing: .11em;
	margin: 0 0 3px;
	opacity: .62;
}

#news_modal .td-lead-story h3 {
	font-family: Georgia, serif !important;
	font-size: clamp(25px, 2.2vw, 40px) !important;
	line-height: .99 !important;
	margin: 0 0 7px !important;
	letter-spacing: -.028em;
}

#news_modal .td-lead-story .news-card-preview {
	display: block !important;
	font-family: Georgia, serif !important;
	font-size: clamp(9px, .65vw, 12px) !important;
	line-height: 1.34 !important;
	margin: 0 !important;
	color: #3c352b !important;
	-webkit-line-clamp: unset !important;
	max-height: none !important;
}

#news_modal .td-columns-wrap {
	flex: 1 1 auto;
	min-height: 0;
	overflow: hidden;
}

#news_modal .td-columns {
	height: 100%;
	column-count: 3;
	column-gap: 18px;
	column-rule: 1px solid rgba(54,47,35,.24);
	column-fill: auto;
}

#news_modal .td-column-item {
	break-inside: avoid;
	display: inline-block !important;
	vertical-align: top;
	width: 100%;
	box-sizing: border-box;
	margin: 0 0 9px !important;
	padding: 0 0 8px !important;
	border: 0 !important;
	border-bottom: 1px solid rgba(54,47,35,.32) !important;
	border-radius: 0 !important;
	background: transparent !important;
	box-shadow: none !important;
	color: #29251f !important;
}

#news_modal .td-column-item-image {
	width: 100%;
	height: 84px;
	margin: 0 0 6px;
	border: 1px solid rgba(54,47,35,.22);
	background-size: cover;
	background-position: center;
}

#news_modal .td-column-item h3 {
	font-family: Georgia, serif !important;
	font-size: clamp(13px, .92vw, 17px) !important;
	line-height: 1.06 !important;
	margin: 0 0 4px !important;
	letter-spacing: -.015em;
}

#news_modal .td-column-item .news-card-preview {
	display: block !important;
	font-family: Georgia, serif !important;
	font-size: clamp(8px, .53vw, 9.5px) !important;
	line-height: 1.30 !important;
	margin: 0 !important;
	color: #3c352b !important;
	-webkit-line-clamp: unset !important;
	max-height: none !important;
}

#news_modal .td-page-footer {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding-top: 6px;
	border-top: 1px solid rgba(54,47,35,.28);
	font-size: 9px;
	letter-spacing: .06em;
	text-transform: uppercase;
	opacity: .70;
}

#news_modal .td-footer-copy {
	overflow: hidden;
	white-space: nowrap;
	text-overflow: ellipsis;
}

#news_modal .td-page-nav {
	display: flex;
	align-items: center;
	gap: 7px;
	white-space: nowrap;
}

#news_modal .td-page-control {
	width: 26px;
	height: 25px;
	padding: 0 !important;
	border: 1px solid rgba(70,58,38,.34) !important;
	border-radius: 7px !important;
	background: rgba(255,255,255,.12) !important;
	box-shadow: none !important;
	font: 19px/22px Georgia, serif !important;
	color: inherit !important;
}

#news_modal .td-page-control:disabled {
	opacity: .28;
}

/* Statistik: bara pappersinnehållet scrollar. Tabellens egen scroll tas bort. */
#news_modal .report-paper-content--stats .news-diocese-table-wrap,
#news_modal .report-paper-content--stats .news-parish-table-wrap {
	max-width: 100%;
	max-height: none !important;
	overflow: visible !important;
	border-radius: 0;
	background: transparent;
}

#news_modal .report-paper-content--stats table {
	width: 100%;
	min-width: 0;
	table-layout: fixed;
	font-size: 9.4px !important;
	background: transparent !important;
}

#news_modal .report-paper-content--stats th,
#news_modal .report-paper-content--stats td {
	padding: 4px 5px !important;
}

#news_modal .report-paper-content--stats .name-cell button,
#news_modal .report-paper-content--stats .diocese-cell button {
	display: block;
	width: 100%;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	text-align: left;
}

/* Utloggade får läsa TD, men inte interna rapporter eller statistik. */
body.logged-out #news_button {
	display: inline-flex !important;
}

body.logged-out #news_modal .report-paper--director,
body.logged-out #news_modal .report-paper--dioceses,
body.logged-out #news_modal .report-paper--parishes {
	display: none !important;
}

body.logged-out #news_modal .report-paper--td,
body.logged-out #news_modal .report-paper--td.is-focused {
	left: 3.8% !important;
	top: 4.2% !important;
	width: 92.4% !important;
	height: 92.0% !important;
	transform: rotate(-0.18deg) !important;
}

body.logged-out #news_modal .paper-postit--td {
	left: 2.2%;
	width: 26%;
}

@media (max-width: 760px) {
	#news_modal .reporting-desk {
		inset: 0;
		border-radius: 0;
		overflow-y: auto;
		background: rgba(28,28,26,.96);
	}

	#news_modal .reporting-desk-stage {
		position: relative;
		inset: auto;
		height: auto;
		padding: 84px 9px 26px;
		display: flex;
		flex-direction: column;
		gap: 92px;
	}

	#news_modal .report-paper,
	#news_modal .report-paper.is-focused,
	#news_modal .report-paper--td,
	#news_modal .report-paper--director,
	#news_modal .report-paper--dioceses,
	#news_modal .report-paper--parishes {
		position: relative;
		left: auto !important;
		right: auto !important;
		top: auto !important;
		bottom: auto !important;
		width: 100% !important;
		height: auto !important;
		min-height: 470px;
		z-index: auto !important;
		transform: none !important;
	}

	#news_modal .report-paper--td {
		min-height: 660px;
	}

	#news_modal .paper-postit {
		top: -76px;
		width: 34%;
		height: 108px;
		padding: 8px 5px 32px;
		font-size: 13px;
	}

	#news_modal .paper-postit--td { left: 1%; }
	#news_modal .paper-postit--director { left: 23%; }
	#news_modal .paper-postit--dioceses { left: 46%; }
	#news_modal .paper-postit--parishes { left: 68%; }

	#news_modal .report-paper-content {
		height: auto;
		max-height: 72vh;
	}

	#news_modal .report-paper-content--td {
		height: 660px;
		max-height: none;
	}

	#news_modal .td-newspaper-page {
		padding: 13px 9px 10px;
	}

	#news_modal .td-masthead {
		grid-template-columns: minmax(0,1fr) auto minmax(0,1fr);
		gap: 7px;
		min-height: 75px;
	}

	#news_modal .td-masthead-side {
		font-size: 10px;
		max-width: 110px;
	}

	#news_modal .td-masthead-logo {
		font-size: 50px;
	}

	#news_modal .td-masthead-subtitle {
		font-size: 6px;
	}

	#news_modal .td-lead-story {
		grid-template-columns: 1fr;
		gap: 8px;
	}

	#news_modal .td-lead-story-image {
		height: 145px;
	}

	#news_modal .td-lead-story h3 {
		font-size: 22px !important;
	}

	#news_modal .td-columns {
		column-count: 2;
		column-gap: 11px;
	}

	#news_modal .td-column-item h3 {
		font-size: 12px !important;
	}

	#news_modal .td-column-item .news-card-preview {
		font-size: 7.5px !important;
	}

	#news_modal .reporting-desk-close {
		position: fixed;
		top: 9px;
		right: 9px;
	}

	body.logged-out #news_modal .report-paper--td,
	body.logged-out #news_modal .report-paper--td.is-focused {
		width: 100% !important;
	}
}

/* Rapportarken använder sin egen pappershöjd, inte gamla modalens max-height. */
#news_modal .report-paper-content.news-modal-body {
	max-height: none !important;
	flex: none !important;
	min-height: 0;
}

/* =========================================================
   TD / rapportbunt v5 – bredare skärmar, tätare tidning
   Endast kompletterande overrides; befintlig CSS ovan lämnas kvar.
========================================================= */

/* Pappren får olika maxbredd och ligger lite mer omlott. */
@media (min-width: 1100px) {
	#news_modal .report-paper--td {
		left: 3.2%;
		top: 4.1%;
		width: 91.5%;
		height: 91.6%;
		transform: rotate(-0.52deg);
	}

	#news_modal .report-paper--director {
		left: auto;
		right: 2.0%;
		top: 6.4%;
		width: min(760px, 47vw);
		height: 88.8%;
		transform: rotate(0.72deg);
	}

	#news_modal .report-paper--dioceses {
		left: 10.5%;
		top: 7.0%;
		width: min(1120px, 72vw);
		height: 89.2%;
		transform: rotate(-0.55deg);
	}

	#news_modal .report-paper--parishes {
		left: 4.8%;
		top: 7.8%;
		width: min(1260px, 80vw);
		height: 89.0%;
		transform: rotate(0.66deg);
	}

	/* När ett dokument tas fram får det ändå inte breda ut sig över hela skärmen. */
	#news_modal .report-paper--td.is-focused {
		left: 3.8% !important;
		right: auto !important;
		width: 91.7% !important;
		height: 92.0% !important;
		transform: rotate(-0.10deg) !important;
	}

	#news_modal .report-paper--director.is-focused {
		left: 50% !important;
		right: auto !important;
		top: 5.1% !important;
		width: min(760px, 47vw) !important;
		height: 89.6% !important;
		transform: translateX(-50%) rotate(0.22deg) !important;
	}

	#news_modal .report-paper--dioceses.is-focused {
		left: 50% !important;
		right: auto !important;
		top: 4.8% !important;
		width: min(1120px, 72vw) !important;
		height: 90.8% !important;
		transform: translateX(-50%) rotate(-0.16deg) !important;
	}

	#news_modal .report-paper--parishes.is-focused {
		left: 50% !important;
		right: auto !important;
		top: 4.6% !important;
		width: min(1260px, 80vw) !important;
		height: 91.0% !important;
		transform: translateX(-50%) rotate(0.18deg) !important;
	}

	/* Post-it ska behålla ungefär kvadratisk form även på ultrabreda skärmar. */
	#news_modal .paper-postit {
		width: clamp(148px, 10.5vw, 188px);
		height: 142px;
		padding: 12px 11px 45px;
		font-size: clamp(18px, 1.08vw, 23px);
		line-height: 1.0;
	}

	#news_modal .paper-postit--td {
		left: 3.0%;
		transform: rotate(-3.1deg) !important;
	}

	#news_modal .paper-postit--director {
		left: 7.0%;
		transform: rotate(3.0deg) !important;
	}

	#news_modal .paper-postit--dioceses {
		left: 50%;
		transform: translateX(-50%) rotate(-2.8deg) !important;
	}

	#news_modal .paper-postit--parishes {
		left: auto;
		right: 4.0%;
		transform: rotate(3.2deg) !important;
	}
}

/* Stiftsdirektörens rapport: själva rubriken räcker. */
#news_modal .report-paper--director .director-report::before {
	content: none !important;
	display: none !important;
}

#news_modal .report-paper--director .director-report h2 {
	font-family: Georgia, 'Times New Roman', serif;
	font-size: clamp(18px, 1.35vw, 25px);
	font-weight: 700;
	line-height: 1.12;
	margin: 0 0 22px;
	padding-bottom: 9px;
	border-bottom: 1px solid rgba(45,40,32,.42);
}

#news_modal .report-paper--director .report-paper-content {
	padding: 34px 46px 42px;
}

/* Tätare TD: fler riktiga artiklar får plats innan nästa sida. */
@media (min-width: 1280px) {
	#news_modal .td-lead-story-image {
		height: 152px;
	}

	#news_modal .td-lead-story h3 {
		font-size: clamp(23px, 1.9vw, 36px) !important;
	}

	#news_modal .td-lead-story .news-card-preview {
		font-size: clamp(8.5px, .58vw, 10.5px) !important;
		line-height: 1.28 !important;
	}

	#news_modal .td-columns {
		column-count: 4;
		column-gap: 14px;
		column-rule: 1px solid rgba(54,47,35,.22);
	}

	#news_modal .td-column-item {
		margin-bottom: 6px !important;
		padding-bottom: 6px !important;
	}

	#news_modal .td-column-item-image {
		height: 68px;
		margin-bottom: 4px;
	}

	#news_modal .td-column-item h3,
	#news_modal .td-filler h3 {
		font-size: clamp(11.5px, .76vw, 15px) !important;
		line-height: 1.04 !important;
		margin-bottom: 3px !important;
	}

	#news_modal .td-column-item .news-card-preview,
	#news_modal .td-filler .news-card-preview {
		font-size: clamp(7px, .44vw, 8.5px) !important;
		line-height: 1.22 !important;
	}
}

/* Utfyllnadsartiklar syns som tryckt utfyllnad, men är medvetet icke-klickbara. */
#news_modal .td-filler {
	cursor: default !important;
	background: rgba(85, 82, 75, 0.08) !important;
	color: rgba(49, 47, 43, 0.60) !important;
	padding: 5px 6px 7px !important;
	border: 1px solid rgba(60,58,53,.13) !important;
	filter: grayscale(.35);
	opacity: .72;
}

#news_modal .td-filler .news-card-kicker,
#news_modal .td-filler h3,
#news_modal .td-filler .news-card-preview {
	color: inherit !important;
}

/* Utloggad: tidningen är publik, men ingen post-it behövs när den är enda dokumentet. */
body.logged-out #news_modal .paper-postit--td {
	display: none !important;
}

@media (min-width: 761px) {
	body.logged-out #news_button {
		left: 14px !important;
		right: auto !important;
		bottom: 12px !important;
	}
}

/* På mellanbreda skärmar håll statistikpappren rimligt smala. */
@media (min-width: 761px) and (max-width: 1099px) {
	#news_modal .report-paper--director.is-focused {
		left: 50% !important;
		width: min(720px, 78vw) !important;
		transform: translateX(-50%) rotate(.18deg) !important;
	}

	#news_modal .report-paper--dioceses.is-focused,
	#news_modal .report-paper--parishes.is-focused {
		left: 50% !important;
		width: min(920px, 88vw) !important;
		transform: translateX(-50%) rotate(-.10deg) !important;
	}

	#news_modal .paper-postit {
		width: clamp(132px, 18vw, 175px);
	}
}

/* =========================================================
   TD / rapportbunt v6 – stabil post-it-rad + samma bunt på mobil
   Kompletterande overrides ovanpå v5.
========================================================= */

/* Post-it-lapparna ligger i ett eget fast lager. De flyttar sig inte när papper byter fokus. */
#news_modal .paper-postit-strip {
	position: absolute;
	left: 50%;
	top: -98px;
	width: min(92%, 780px);
	height: 142px;
	transform: translateX(-50%);
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 8px;
	align-items: start;
	z-index: 82;
	pointer-events: none;
}

#news_modal .paper-postit-strip .paper-postit {
	position: relative !important;
	top: 0 !important;
	left: auto !important;
	right: auto !important;
	width: 100% !important;
	min-width: 0 !important;
	max-width: none !important;
	height: 136px;
	margin: 0;
	padding: 12px 8px 43px;
	pointer-events: auto;
	border-radius: 1px;
	font-size: clamp(16px, 1vw, 21px);
	line-height: 1.0;
	white-space: normal;
}

#news_modal .paper-postit-strip .paper-postit--td {
	transform: rotate(-2.7deg) !important;
}

#news_modal .paper-postit-strip .paper-postit--director {
	transform: rotate(2.1deg) !important;
}

#news_modal .paper-postit-strip .paper-postit--dioceses {
	transform: rotate(-2.0deg) !important;
}

#news_modal .paper-postit-strip .paper-postit--parishes {
	transform: rotate(2.5deg) !important;
}

#news_modal .paper-postit-strip .paper-postit.is-active {
	box-shadow:
		0 3px 8px rgba(0,0,0,.20),
		0 0 0 2px rgba(82,68,40,.15);
}

body.logged-out #news_modal .paper-postit-strip {
	display: none !important;
}

/* Mätkopia för responsiv sidindelning. Den tar ingen plats och är aldrig klickbar. */
#news_modal .report-paper-content--td {
	position: relative;
}

#news_modal .td-newspaper--measure {
	position: absolute !important;
	inset: 0;
	visibility: hidden !important;
	pointer-events: none !important;
	z-index: -1;
	overflow: hidden;
}

#news_modal .td-newspaper--visible {
	position: relative;
	z-index: 1;
}

/* Multikolumnerna får skapa extra osynliga kolumner vid mätning; JS flyttar då artiklarna till nästa sida. */
#news_modal .td-columns {
	width: 100%;
	min-width: 0;
	overflow: visible;
}

/* På mobil används samma överlappande pappersbunt som på datorn. */
@media (max-width: 760px) {
	#news_modal .reporting-desk {
		inset: 0;
		overflow: hidden;
		background: transparent;
	}

	#news_modal .reporting-desk-stage {
		position: absolute;
		inset: 94px 5px 7px;
		height: auto;
		padding: 0;
		display: block;
		overflow: visible;
	}

	#news_modal .paper-postit-strip {
		left: 50%;
		top: -78px;
		width: calc(100% - 4px);
		height: 94px;
		gap: 3px;
	}

	#news_modal .paper-postit-strip .paper-postit {
		height: 92px;
		padding: 8px 3px 29px;
		font-size: clamp(9.5px, 2.8vw, 12px);
		font-weight: 650;
		line-height: .98;
	}

	#news_modal .report-paper,
	#news_modal .report-paper--td,
	#news_modal .report-paper--director,
	#news_modal .report-paper--dioceses,
	#news_modal .report-paper--parishes {
		position: absolute !important;
		min-height: 0 !important;
		max-height: none !important;
		margin: 0 !important;
	}

	#news_modal .report-paper--td {
		left: 1.1% !important;
		top: 2.0% !important;
		width: 96.0% !important;
		height: 95.0% !important;
		z-index: 13;
		transform: rotate(-.38deg) !important;
	}

	#news_modal .report-paper--director {
		left: 2.0% !important;
		top: 2.8% !important;
		width: 95.5% !important;
		height: 94.6% !important;
		z-index: 12;
		transform: rotate(.42deg) !important;
	}

	#news_modal .report-paper--dioceses {
		left: 2.9% !important;
		top: 3.6% !important;
		width: 95.0% !important;
		height: 94.2% !important;
		z-index: 11;
		transform: rotate(-.34deg) !important;
	}

	#news_modal .report-paper--parishes {
		left: 3.8% !important;
		top: 4.4% !important;
		width: 94.5% !important;
		height: 93.8% !important;
		z-index: 10;
		transform: rotate(.48deg) !important;
	}

	#news_modal .report-paper.is-focused,
	#news_modal .report-paper--td.is-focused,
	#news_modal .report-paper--director.is-focused,
	#news_modal .report-paper--dioceses.is-focused,
	#news_modal .report-paper--parishes.is-focused {
		left: 1.6% !important;
		right: auto !important;
		top: 1.6% !important;
		width: 96.0% !important;
		height: 95.4% !important;
		z-index: 60 !important;
		transform: rotate(-.06deg) !important;
	}

	#news_modal .report-paper-content,
	#news_modal .report-paper-content.news-modal-body {
		height: 100% !important;
		max-height: none !important;
	}

	#news_modal .report-paper-content--td {
		height: 100% !important;
		max-height: none !important;
	}

	#news_modal .report-paper-content--stats {
		height: calc(100% - 64px) !important;
	}

	#news_modal .reporting-desk-close {
		position: fixed;
		top: 8px;
		right: 8px;
	}

	body.logged-out #news_modal .report-paper--td,
	body.logged-out #news_modal .report-paper--td.is-focused {
		left: 1.5% !important;
		top: 1.8% !important;
		width: 97% !important;
		height: 96% !important;
		transform: rotate(-.12deg) !important;
	}
}

/* =========================================================
   TD / rapportbunt v7 – post-it fast på papper + mobil tabellpanorering
   Endast kompletterande overrides ovanpå v6.
========================================================= */

/*
   Post-it-lappen är åter ett barn till sitt dokument. Därmed följer den
   dokumentets z-index: endast lappen på det främsta pappret ligger helt
   ovanpå, medan övriga lappar kan döljas av papper som ligger framför.
*/
#news_modal .report-paper > .paper-postit {
	position: absolute !important;
	top: -88px !important;
	width: clamp(138px, 10vw, 178px) !important;
	min-width: 0 !important;
	max-width: 178px !important;
	height: 126px !important;
	margin: 0 !important;
	padding: 11px 8px 40px !important;
	z-index: 6;
	display: flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	font-size: clamp(16px, 1.0vw, 21px) !important;
	font-weight: 650;
	line-height: 1.0 !important;
	white-space: normal;
	pointer-events: auto;
}

#news_modal .report-paper > .paper-postit.is-active {
	box-shadow:
		0 3px 8px rgba(0,0,0,.22),
		0 0 0 2px rgba(82,68,40,.13);
}

/* Placeringarna är fasta relativt respektive papper och ändras aldrig vid fokus. */
#news_modal .report-paper--td > .paper-postit {
	left: 26% !important;
	right: auto !important;
	transform: rotate(-2.7deg) !important;
}

#news_modal .report-paper--director > .paper-postit {
	left: 25% !important;
	right: auto !important;
	transform: rotate(2.2deg) !important;
}

#news_modal .report-paper--dioceses > .paper-postit {
	left: 52% !important;
	right: auto !important;
	transform: rotate(-2.1deg) !important;
}

#news_modal .report-paper--parishes > .paper-postit {
	left: 70% !important;
	right: auto !important;
	transform: rotate(2.6deg) !important;
}

/*
   Ett papper som tas fram byter endast staplingsordning och skugga.
   Position, storlek och rotation är samma före och efter klick.
*/
#news_modal .report-paper.is-focused {
	z-index: 60 !important;
}

@media (min-width: 1100px) {
	#news_modal .report-paper--td,
	#news_modal .report-paper--td.is-focused {
		left: 3.2% !important;
		right: auto !important;
		top: 4.1% !important;
		width: 91.5% !important;
		height: 91.6% !important;
		transform: rotate(-0.52deg) !important;
	}

	#news_modal .report-paper--director,
	#news_modal .report-paper--director.is-focused {
		left: 50% !important;
		right: auto !important;
		top: 6.4% !important;
		width: min(760px, 47vw) !important;
		height: 88.8% !important;
		transform: translateX(-50%) rotate(0.72deg) !important;
	}

	#news_modal .report-paper--dioceses,
	#news_modal .report-paper--dioceses.is-focused {
		left: 10.5% !important;
		right: auto !important;
		top: 7.0% !important;
		width: min(1120px, 72vw) !important;
		height: 89.2% !important;
		transform: rotate(-0.55deg) !important;
	}

	#news_modal .report-paper--parishes,
	#news_modal .report-paper--parishes.is-focused {
		left: 4.8% !important;
		right: auto !important;
		top: 7.8% !important;
		width: min(1260px, 80vw) !important;
		height: 89.0% !important;
		transform: rotate(0.66deg) !important;
	}

	/* Samlad rad över den gemensamma delen av pappersbunten. */
	#news_modal .report-paper--td > .paper-postit {
		left: 26% !important;
	}

	#news_modal .report-paper--director > .paper-postit {
		left: 25% !important;
	}

	#news_modal .report-paper--dioceses > .paper-postit {
		left: 52% !important;
	}

	#news_modal .report-paper--parishes > .paper-postit {
		left: 70% !important;
	}
}

@media (min-width: 761px) and (max-width: 1099px) {
	#news_modal .report-paper--td,
	#news_modal .report-paper--td.is-focused {
		left: 2.0% !important;
		right: auto !important;
		top: 4.4% !important;
		width: 92.0% !important;
		height: 91.0% !important;
		transform: rotate(-0.48deg) !important;
	}

	#news_modal .report-paper--director,
	#news_modal .report-paper--director.is-focused {
		left: 50% !important;
		right: auto !important;
		top: 5.25% !important;
		width: min(720px, 78vw) !important;
		height: 90.7% !important;
		transform: translateX(-50%) rotate(0.42deg) !important;
	}

	#news_modal .report-paper--dioceses,
	#news_modal .report-paper--dioceses.is-focused {
		left: 50% !important;
		right: auto !important;
		top: 6.1% !important;
		width: min(920px, 88vw) !important;
		height: 90.4% !important;
		transform: translateX(-50%) rotate(-0.34deg) !important;
	}

	#news_modal .report-paper--parishes,
	#news_modal .report-paper--parishes.is-focused {
		left: 50% !important;
		right: auto !important;
		top: 6.95% !important;
		width: min(960px, 90vw) !important;
		height: 90.1% !important;
		transform: translateX(-50%) rotate(0.53deg) !important;
	}

	#news_modal .report-paper > .paper-postit {
		top: -82px !important;
		width: clamp(124px, 18vw, 166px) !important;
		max-width: 166px !important;
		height: 120px !important;
		padding: 10px 7px 38px !important;
		font-size: clamp(14px, 1.8vw, 19px) !important;
	}

	#news_modal .report-paper--td > .paper-postit { left: 5% !important; }
	#news_modal .report-paper--director > .paper-postit { left: 23% !important; }
	#news_modal .report-paper--dioceses > .paper-postit { left: 50% !important; }
	#news_modal .report-paper--parishes > .paper-postit { left: 72% !important; }
}

/* Mobil: samma buntprincip, men mindre lappar. Fokus ändrar inte geometrin. */
@media (max-width: 760px) {
	#news_modal .report-paper--td,
	#news_modal .report-paper--td.is-focused {
		left: 1.1% !important;
		right: auto !important;
		top: 2.0% !important;
		width: 96.0% !important;
		height: 95.0% !important;
		transform: rotate(-.38deg) !important;
	}

	#news_modal .report-paper--director,
	#news_modal .report-paper--director.is-focused {
		left: 2.0% !important;
		right: auto !important;
		top: 2.8% !important;
		width: 95.5% !important;
		height: 94.6% !important;
		transform: rotate(.42deg) !important;
	}

	#news_modal .report-paper--dioceses,
	#news_modal .report-paper--dioceses.is-focused {
		left: 2.9% !important;
		right: auto !important;
		top: 3.6% !important;
		width: 95.0% !important;
		height: 94.2% !important;
		transform: rotate(-.34deg) !important;
	}

	#news_modal .report-paper--parishes,
	#news_modal .report-paper--parishes.is-focused {
		left: 3.8% !important;
		right: auto !important;
		top: 4.4% !important;
		width: 94.5% !important;
		height: 93.8% !important;
		transform: rotate(.48deg) !important;
	}

	#news_modal .report-paper > .paper-postit {
		top: -57px !important;
		width: 24.2% !important;
		max-width: none !important;
		height: 79px !important;
		padding: 7px 2px 23px !important;
		font-size: clamp(9px, 2.65vw, 12px) !important;
		font-weight: 650;
		line-height: .96 !important;
	}

	#news_modal .report-paper--td > .paper-postit { left: 1.0% !important; }
	#news_modal .report-paper--director > .paper-postit { left: 25.2% !important; }
	#news_modal .report-paper--dioceses > .paper-postit { left: 49.5% !important; }
	#news_modal .report-paper--parishes > .paper-postit { left: 73.7% !important; }

	/*
	   Tabellen får vara bredare än pappret och kan svepas/dras horisontellt,
	   men ingen horisontell scrollbar visas. Vertikal scroll ligger kvar på
	   rapportpapprets vanliga innehållsyta så vi undviker dubbla scrollbars.
	*/
	#news_modal .report-paper-content--stats .news-diocese-table-wrap,
	#news_modal .report-paper-content--stats .news-parish-table-wrap {
		display: block;
		width: 100%;
		max-width: 100%;
		overflow-x: auto !important;
		overflow-y: visible !important;
		-webkit-overflow-scrolling: touch;
		overscroll-behavior-x: contain;
		touch-action: pan-x pan-y;
		scrollbar-width: none !important;
		-ms-overflow-style: none;
	}

	#news_modal .report-paper-content--stats .news-diocese-table-wrap::-webkit-scrollbar,
	#news_modal .report-paper-content--stats .news-parish-table-wrap::-webkit-scrollbar {
		width: 0 !important;
		height: 0 !important;
		display: none !important;
	}

	#news_modal .report-paper-content--stats .news-diocese-table {
		width: 760px !important;
		min-width: 760px !important;
		table-layout: fixed;
	}

	#news_modal .report-paper-content--stats .news-parish-table {
		width: 900px !important;
		min-width: 900px !important;
		table-layout: fixed;
	}
}

/* Utloggad finns bara TD, alltså inte heller dess post-it. */
body.logged-out #news_modal .report-paper--td > .paper-postit {
	display: none !important;
}

/* =========================================================
   TD paperdesk v8
   Finjusteringar: stabilare post-it-spår, ny logotyp,
   dekorativa nederkantsnotiser och mobilvänlig tabellpanorering.
========================================================= */

#news_modal .td-masthead-center {
	align-self: center;
}

#news_modal .td-masthead-brand {
	display: inline-flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 0;
	font-family: Georgia, 'Times New Roman', serif;
	font-style: italic;
	font-weight: 700;
	letter-spacing: -0.03em;
	line-height: 0.88;
	color: rgba(38, 33, 27, 0.88);
	text-shadow: 0 0 0.35px rgba(38,33,27,.5), 0 1px 0 rgba(255,255,255,.12);
	filter: blur(0.12px);
}

#news_modal .td-masthead-brand-line--top {
	font-size: clamp(26px, 2.25vw, 42px);
	margin-left: -0.25em;
}

#news_modal .td-masthead-brand-line--bottom {
	font-size: clamp(34px, 3.1vw, 60px);
}

#news_modal .td-columns-wrap {
	position: relative;
	overflow: hidden;
}

#news_modal .td-columns {
	position: relative;
	z-index: 2;
}

#news_modal .td-bottom-fillers {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 8px;
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 14px;
	z-index: 1;
	pointer-events: none;
}

#news_modal .td-bottom-filler {
	min-height: clamp(78px, 8.4vh, 110px);
	padding: 8px 10px 10px;
	border: 1px solid rgba(84, 78, 68, 0.12);
	background: rgba(148, 143, 132, 0.08);
	box-sizing: border-box;
	overflow: hidden;
}

#news_modal .td-bottom-fillers--last .td-bottom-filler {
	min-height: clamp(140px, 20vh, 230px);
	background: rgba(148, 143, 132, 0.11);
}

#news_modal .td-bottom-filler .news-card-kicker,
#news_modal .td-bottom-filler h3,
#news_modal .td-bottom-filler .news-card-preview {
	color: rgba(89, 84, 75, 0.52) !important;
}

#news_modal .td-bottom-filler .news-card-kicker {
	font-size: 7px !important;
	text-transform: uppercase;
	letter-spacing: 0.12em;
	margin: 0 0 5px;
}

#news_modal .td-bottom-filler h3 {
	margin: 0 0 4px !important;
	font-size: clamp(14px, 1vw, 18px) !important;
	line-height: 1.02 !important;
	font-family: Georgia, serif !important;
}

#news_modal .td-bottom-filler .news-card-preview {
	margin: 0 !important;
	font-size: clamp(8px, .58vw, 10px) !important;
	line-height: 1.28 !important;
	font-family: Georgia, serif !important;
}

#news_modal .td-filler {
	opacity: .52;
}

#news_modal .report-paper > .paper-postit {
	will-change: auto;
}

@media (max-width: 760px) {
	#news_modal .td-masthead-brand-line--top {
		font-size: clamp(18px, 4.9vw, 26px);
	}

	#news_modal .td-masthead-brand-line--bottom {
		font-size: clamp(22px, 6.2vw, 32px);
	}

	#news_modal .td-bottom-fillers {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 9px;
		bottom: 5px;
	}

	#news_modal .td-bottom-filler {
		min-height: 68px;
		padding: 6px 7px 8px;
	}

	#news_modal .td-bottom-fillers--last .td-bottom-filler {
		min-height: min(23vh, 160px);
	}

	#news_modal .td-bottom-filler h3 {
		font-size: 11px !important;
	}

	#news_modal .td-bottom-filler .news-card-preview {
		font-size: 7px !important;
	}

	#news_modal .report-paper-content--stats {
		overflow-y: auto !important;
		overflow-x: hidden !important;
	}

	#news_modal .report-paper-content--stats .news-diocese-table-wrap,
	#news_modal .report-paper-content--stats .news-parish-table-wrap {
		overflow-x: auto !important;
		overflow-y: visible !important;
	}
}

/* =========================================================
   TD paperdesk v9
   - fasta, icke överlappande post-it-lägen
   - fakeartiklar i eget flöde under nyhetsspalterna
   - arkivmeny för tidigare upplagor
   - normal pointer när fake cursor är av
========================================================= */

/* Klickbara tidningsartiklar ska kännas klickbara även utan kräkla. */
body:not(.fake-cursor-enabled) #news_modal .news-card[data-news-key],
body:not(.fake-cursor-enabled) #news_modal .news-card[data-news-key] * {
	cursor: pointer !important;
}

/*
   Nederkantsartiklarna ligger nu I DOKUMENTFLÖDET efter de riktiga
   spaltartiklarna. De kan klippas i nederkant men får aldrig överlappa en
   riktig artikel.
*/
#news_modal .td-columns-wrap {
	display: flex !important;
	flex-direction: column !important;
	min-height: 0 !important;
	overflow: hidden !important;
}

#news_modal .td-columns {
	position: relative !important;
	z-index: 2 !important;
	height: auto !important;
	flex: 0 1 auto !important;
	column-fill: balance !important;
}

#news_modal .td-bottom-fillers {
	position: static !important;
	left: auto !important;
	right: auto !important;
	bottom: auto !important;
	width: 100% !important;
	display: grid !important;
	grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
	gap: 14px !important;
	margin: 8px 0 0 !important;
	padding: 0 !important;
	flex: 0 0 auto !important;
	z-index: 1 !important;
	pointer-events: none !important;
	box-sizing: border-box;
}

/* Defaultlayouten har tre riktiga spalter. */
#news_modal .td-bottom-fillers .td-bottom-filler:nth-child(4) {
	display: none !important;
}

#news_modal .td-bottom-filler {
	min-height: 74px !important;
	height: auto !important;
	box-sizing: border-box;
	overflow: hidden;
}

/*
   Sista sidan: fakeraden får äta upp all återstående plats. Om den blir
   mycket stor ser den ut som längre annons/notisblock i stället för små
   lappar mitt på ett tomt papper.
*/
#news_modal .td-bottom-fillers--last {
	flex: 1 1 130px !important;
	min-height: 130px !important;
	align-items: stretch !important;
}

#news_modal .td-bottom-fillers--last .td-bottom-filler {
	height: 100% !important;
	min-height: 130px !important;
}

/* Fyra nyhetsspalter på de breda layouterna = fyra fakeblock. */
@media (min-width: 1280px) {
	#news_modal .td-bottom-fillers {
		grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
	}

	#news_modal .td-bottom-fillers .td-bottom-filler:nth-child(4) {
		display: block !important;
	}
}

/* Mobil har två riktiga spalter = exakt två fakeblock. */
@media (max-width: 760px) {
	#news_modal .td-bottom-fillers {
		grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
		gap: 9px !important;
		margin-top: 6px !important;
	}

	#news_modal .td-bottom-fillers .td-bottom-filler:nth-child(n+3) {
		display: none !important;
	}

	#news_modal .td-bottom-fillers--last {
		min-height: 100px !important;
		flex-basis: 100px !important;
	}

	#news_modal .td-bottom-fillers--last .td-bottom-filler {
		min-height: 100px !important;
	}
}

/* Arkivmenyn ligger i mitten av sidfoten. */
#news_modal .td-page-footer {
	display: grid !important;
	grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) !important;
	align-items: center !important;
	gap: 12px !important;
}

#news_modal .td-footer-copy {
	justify-self: start;
}

#news_modal .td-edition-picker {
	justify-self: center;
	position: relative;
	z-index: 40;
	min-width: 190px;
	max-width: min(360px, 36vw);
}

#news_modal .td-edition-picker .custom-dropdown {
	width: 100%;
	min-width: 190px;
}

#news_modal .td-edition-picker .custom-dropdown-trigger {
	min-height: 28px;
	padding: 4px 9px !important;
	font-size: 11px;
	background: rgba(255,255,255,.12) !important;
	border: 1px solid rgba(70,58,38,.25) !important;
	box-shadow: none !important;
}

/* Menyn öppnas uppåt eftersom väljaren ligger längst ned på tidningen. */
#news_modal .td-edition-picker .custom-dropdown-menu {
	top: auto !important;
	bottom: calc(100% + 5px) !important;
	left: 50% !important;
	right: auto !important;
	transform: translateX(-50%);
	width: min(390px, 72vw) !important;
	max-height: min(48vh, 420px) !important;
	z-index: 120 !important;
}

#news_modal .td-edition-picker .custom-dropdown-option {
	font-size: 11px;
	white-space: normal;
	line-height: 1.2;
}

#news_modal .td-edition-current {
	font-size: 9px;
	opacity: .68;
	white-space: nowrap;
}

#news_modal .td-page-nav {
	justify-self: end;
}

@media (max-width: 760px) {
	#news_modal .td-page-footer {
		grid-template-columns: auto minmax(0, 1fr) auto !important;
		gap: 6px !important;
	}

	#news_modal .td-footer-copy {
		display: none !important;
	}

	#news_modal .td-edition-picker {
		min-width: 0;
		width: min(58vw, 260px);
		max-width: none;
	}

	#news_modal .td-edition-picker .custom-dropdown {
		min-width: 0;
	}

	#news_modal .td-edition-picker .custom-dropdown-trigger {
		font-size: 9px;
		min-height: 25px;
		padding: 3px 6px !important;
	}
}

/* =========================================================
   TD paperdesk v10
   - tätare tidningslayout
   - lätta bildplatshållare i papperstidningen
   - stabil arkiv-dropdown
   - Biskopsmötets knappstil åter i huvud-CSS
========================================================= */

/* Biskopsmötet: denna stil låg tidigare i huvud-CSS i den fungerande versionen. */
.bishop-meeting-v2-button {
	position: fixed;
	left: 554px;
	bottom: 20px;
	z-index: calc(var(--z-news-button) + 1);
	width: 84px;
	height: 84px;
	padding: 0 !important;
	border-radius: 18px !important;
	border: 1px solid var(--gold-border) !important;
	background: linear-gradient(to bottom, var(--gold-bg-top), var(--gold-bg-bottom)) !important;
	box-shadow: inset 0 1px 0 rgba(255,255,255,.7), 0 2px 6px rgba(0,0,0,.14) !important;
	display: flex;
	align-items: center;
	justify-content: center;
}

.bishop-meeting-v2-button-icon {
	display: block;
	width: 72px;
	height: 72px;
	pointer-events: none;
}

.bishop-meeting-v2-button-icon img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
	pointer-events: none;
}

#bishop_meeting_v2_unread {
	position: absolute;
	right: -5px;
	top: -5px;
	min-width: 20px;
	height: 20px;
	padding: 0 5px;
	box-sizing: border-box;
	border-radius: 999px;
	background: #8f2f2f;
	color: #fff;
	font: 700 11px/20px system-ui, sans-serif;
	text-align: center;
	box-shadow: 0 1px 4px rgba(0,0,0,.3);
}

body:not(.fake-cursor-enabled) .bishop-meeting-v2-button {
	cursor: pointer !important;
}

body.logged-out .bishop-meeting-v2-button {
	display: none !important;
}

/* Tidningen görs tätare så fler riktiga nyheter ryms per sida. */
#news_modal .td-newspaper-page {
	padding: 11px 15px 8px !important;
}

#news_modal .td-masthead {
	min-height: 64px !important;
	gap: 10px !important;
}

#news_modal .td-masthead-brand-line--top {
	font-size: clamp(21px, 1.85vw, 34px) !important;
}

#news_modal .td-masthead-brand-line--bottom {
	font-size: clamp(27px, 2.45vw, 46px) !important;
}

#news_modal .td-masthead-rule {
	margin: 0 0 5px !important;
}

#news_modal .td-lead-row {
	padding-bottom: 6px !important;
	margin-bottom: 5px !important;
}

#news_modal .td-lead-story {
	grid-template-columns: minmax(170px, 23%) minmax(0,1fr) !important;
	gap: 10px !important;
}

#news_modal .td-lead-story h3 {
	font-size: clamp(22px, 1.8vw, 34px) !important;
	line-height: 1 !important;
	margin-bottom: 4px !important;
}

#news_modal .td-lead-story .news-card-preview {
	font-size: clamp(8px, .56vw, 10px) !important;
	line-height: 1.22 !important;
}

/* Generisk bildgrafik. Originalbilden laddas först i artikelmodalen. */
#news_modal .td-paper-image-placeholder {
	position: relative;
	box-sizing: border-box;
	width: 100%;
	border: 1px solid rgba(60,54,44,.22);
	background:
		linear-gradient(155deg, transparent 0 50%, rgba(76,70,60,.10) 50% 64%, transparent 64%),
		linear-gradient(25deg, rgba(76,70,60,.08) 0 22%, transparent 22%),
		rgba(112,106,94,.08);
	overflow: hidden;
}

#news_modal .td-paper-image-placeholder--lead {
	height: 118px;
}

#news_modal .td-paper-image-placeholder--column {
	height: 54px;
	margin: 0 0 4px;
}

#news_modal .td-paper-image-placeholder-mark {
	position: absolute;
	left: 50%;
	top: 50%;
	width: 24px;
	height: 18px;
	transform: translate(-50%,-50%);
	border: 1px solid rgba(67,61,50,.28);
	box-sizing: border-box;
	opacity: .75;
}

#news_modal .td-paper-image-placeholder-mark::before {
	content: '';
	position: absolute;
	width: 5px;
	height: 5px;
	border-radius: 50%;
	left: 4px;
	top: 3px;
	background: rgba(67,61,50,.28);
}

#news_modal .td-paper-image-placeholder-mark::after {
	content: '';
	position: absolute;
	left: 3px;
	right: 3px;
	bottom: 3px;
	height: 7px;
	background: linear-gradient(135deg, transparent 0 22%, rgba(67,61,50,.24) 23% 50%, transparent 51% 58%, rgba(67,61,50,.18) 59% 100%);
}

#news_modal .td-column-item {
	margin-bottom: 5px !important;
	padding-bottom: 5px !important;
}

#news_modal .td-column-item .news-card-kicker {
	font-size: 6px !important;
	margin-bottom: 2px !important;
}

#news_modal .td-column-item h3 {
	font-size: clamp(11px, .82vw, 15px) !important;
	line-height: 1.04 !important;
	margin: 0 0 2px !important;
}

#news_modal .td-column-item .news-card-preview {
	font-size: clamp(7px, .48vw, 8.5px) !important;
	line-height: 1.18 !important;
}

#news_modal .td-columns {
	column-gap: 10px !important;
}

/* Antalet spalter följer fönsterbredden; fake-raden läser samma column-count i JS. */
@media (min-width: 1600px) {
	#news_modal .td-columns { column-count: 5 !important; }
}

@media (min-width: 1100px) and (max-width: 1599px) {
	#news_modal .td-columns { column-count: 4 !important; }
}

@media (min-width: 761px) and (max-width: 1099px) {
	#news_modal .td-columns { column-count: 3 !important; }
}

@media (max-width: 760px) {
	#news_modal .td-columns { column-count: 2 !important; column-gap: 7px !important; }
	#news_modal .td-lead-story { grid-template-columns: minmax(105px, 34%) minmax(0,1fr) !important; gap: 7px !important; }
	#news_modal .td-paper-image-placeholder--lead { height: 88px; }
	#news_modal .td-paper-image-placeholder--column { height: 42px; }
	#news_modal .td-lead-story h3 { font-size: 18px !important; }
	#news_modal .td-lead-story .news-card-preview { font-size: 7px !important; }
	#news_modal .td-column-item h3 { font-size: 10px !important; }
	#news_modal .td-column-item .news-card-preview { font-size: 6.6px !important; }
}

/* Dynamisk utfyllnad: alltid lika många fakeblock som de faktiska nyhetsspalterna. */
#news_modal .td-bottom-filler-slot {
	flex: 0 0 auto;
	width: 100%;
	min-height: 0;
	overflow: hidden;
}

#news_modal .td-bottom-filler-slot .td-bottom-fillers {
	display: grid !important;
	grid-template-columns: repeat(var(--td-filler-cols, 3), minmax(0,1fr)) !important;
	gap: 10px !important;
	width: 100% !important;
	margin: 5px 0 0 !important;
	min-height: 0 !important;
	max-height: none !important;
	flex: none !important;
	align-items: stretch !important;
}

#news_modal .td-bottom-filler-slot .td-bottom-filler {
	display: block !important;
	height: 100% !important;
	min-height: 0 !important;
	padding: 5px 6px !important;
	box-sizing: border-box;
	background: rgba(128,123,113,.08) !important;
	border: 1px solid rgba(90,84,74,.10) !important;
	overflow: hidden !important;
}

#news_modal .td-bottom-filler-slot .td-bottom-fillers--last .td-bottom-filler {
	background: rgba(128,123,113,.105) !important;
}

#news_modal .td-bottom-filler-slot .td-bottom-filler h3 {
	font-size: clamp(10px, .72vw, 13px) !important;
	line-height: 1.02 !important;
	margin-bottom: 2px !important;
}

#news_modal .td-bottom-filler-slot .td-bottom-filler .news-card-preview {
	font-size: clamp(6.5px, .44vw, 8px) !important;
	line-height: 1.15 !important;
}

/* Arkiv-dropdown: kompakt, täckande och framför tidningsinnehållet. */
#news_modal .td-newspaper-page {
	isolation: isolate;
}

#news_modal .td-page-footer {
	position: relative !important;
	z-index: 300 !important;
	overflow: visible !important;
}

#news_modal .td-edition-picker {
	position: relative !important;
	z-index: 320 !important;
	min-width: 168px !important;
	max-width: 230px !important;
}

#news_modal .td-edition-picker .custom-dropdown {
	position: relative !important;
	margin-top: 0 !important;
	min-width: 0 !important;
	width: 100% !important;
}

#news_modal .td-edition-picker .custom-dropdown-trigger {
	min-height: 25px !important;
	padding: 3px 8px !important;
	font-size: 10px !important;
	background: #e7dfc7 !important;
	border: 1px solid rgba(90,75,48,.42) !important;
	border-radius: 8px !important;
	color: #3d3528 !important;
	box-shadow: 0 1px 2px rgba(0,0,0,.08) !important;
}

#news_modal .td-edition-picker .custom-dropdown-menu {
	top: auto !important;
	bottom: calc(100% + 5px) !important;
	left: 50% !important;
	right: auto !important;
	transform: translateX(-50%) !important;
	width: 270px !important;
	max-width: min(78vw, 320px) !important;
	max-height: min(38vh, 290px) !important;
	overflow-y: auto !important;
	padding: 4px !important;
	background: #eee8d6 !important;
	border: 1px solid rgba(107,89,54,.55) !important;
	border-radius: 9px !important;
	box-shadow: 0 8px 22px rgba(0,0,0,.28) !important;
	z-index: 500 !important;
	pointer-events: auto !important;
}

#news_modal .td-edition-picker .custom-dropdown-option {
	display: block !important;
	width: 100% !important;
	padding: 6px 8px !important;
	margin: 0 !important;
	font-size: 10px !important;
	line-height: 1.15 !important;
	white-space: normal !important;
	background: transparent !important;
	border: 0 !important;
	border-radius: 6px !important;
	color: #3b3429 !important;
	text-align: left !important;
	pointer-events: auto !important;
}

#news_modal .td-edition-picker .custom-dropdown-option + .custom-dropdown-option {
	border-top: 1px solid rgba(85,74,55,.12) !important;
}

#news_modal .td-edition-picker .custom-dropdown-option:hover,
#news_modal .td-edition-picker .custom-dropdown-option:focus {
	background: rgba(142,116,64,.17) !important;
}

@media (max-width: 760px) {
	#news_modal .td-edition-picker { width: min(50vw, 190px) !important; }
	#news_modal .td-edition-picker .custom-dropdown-menu { width: min(76vw, 280px) !important; }
	.bishop-meeting-v2-button {
		left: auto;
		right: 76px;
		bottom: 12px;
		width: 58px;
		height: 58px;
		border-radius: 14px !important;
	}
	.bishop-meeting-v2-button-icon { width: 50px; height: 50px; }
}

/* =========================================================
   TD paperdesk v11
   - skarpare post-it
   - tätare/ogenomskinligare arkivmeny
   - rundare Biskopsmötesknapp
   - subtil skrynklig pappersyta på TD
========================================================= */

#news_modal .report-paper > .paper-postit,
#news_modal .paper-postit {
	border-radius: 0 !important;
}

#news_modal .td-edition-picker .custom-dropdown-trigger,
#news_modal .td-edition-picker .custom-dropdown-menu,
#news_modal .td-edition-picker .custom-dropdown-option {
	backdrop-filter: none !important;
	-webkit-backdrop-filter: none !important;
}

#news_modal .td-edition-picker .custom-dropdown-trigger {
	background: #eee5cc !important;
	opacity: 1 !important;
}

#news_modal .td-edition-picker .custom-dropdown-menu {
	background: #f1ead8 !important;
	opacity: 1 !important;
	box-shadow: 0 9px 24px rgba(0,0,0,.34) !important;
}

#news_modal .td-edition-picker .custom-dropdown-option {
	background: #f1ead8 !important;
	opacity: 1 !important;
}

#news_modal .td-edition-picker .custom-dropdown-option:hover,
#news_modal .td-edition-picker .custom-dropdown-option:focus,
#news_modal .td-edition-picker .custom-dropdown-option.is-selected {
	background: #dfd1ac !important;
}

.bishop-meeting-v2-button {
	border-radius: 50% !important;
	width: 84px;
	height: 84px;
	overflow: visible;
}

body:not(.fake-cursor-enabled) .bishop-meeting-v2-button {
	cursor: pointer !important;
}

/* Endast tidningen får en diskret fysisk, skrynklig pappersyta. */
#news_modal .td-newspaper-page {
	position: relative;
	isolation: isolate;
	background-color: #ddd5be !important;
}

#news_modal .td-newspaper-page::before {
	content: '';
	position: absolute;
	inset: 0;
	z-index: 0;
	pointer-events: none;
	background:
		radial-gradient(ellipse at 16% 22%, rgba(255,255,255,.16) 0 1.1%, transparent 6.5%),
		radial-gradient(ellipse at 72% 18%, rgba(73,64,49,.065) 0 .8%, transparent 7.5%),
		radial-gradient(ellipse at 42% 68%, rgba(255,255,255,.12) 0 .9%, transparent 8%),
		radial-gradient(ellipse at 87% 76%, rgba(67,58,45,.055) 0 .7%, transparent 7%),
		linear-gradient(117deg, transparent 0 23%, rgba(255,255,255,.06) 24%, transparent 25% 61%, rgba(71,62,48,.035) 62%, transparent 63%),
		linear-gradient(28deg, transparent 0 37%, rgba(82,72,55,.035) 38%, transparent 39% 73%, rgba(255,255,255,.045) 74%, transparent 75%);
	opacity: .72;
}

#news_modal .td-newspaper-page > * {
	position: relative;
	z-index: 1;
}

/* Fakeartiklar i de vanliga spalterna på sista sidan. */
#news_modal .td-columns .td-filler {
	opacity: .48 !important;
	background: rgba(118,113,104,.055) !important;
	border-top: 1px solid rgba(83,76,64,.08) !important;
	padding-top: 4px !important;
}

#news_modal .td-columns .td-filler h3,
#news_modal .td-columns .td-filler .news-card-preview,
#news_modal .td-columns .td-filler .news-card-kicker {
	color: rgba(78,73,65,.58) !important;
}

@media (max-width: 760px) {
	.bishop-meeting-v2-button {
		width: 58px;
		height: 58px;
		border-radius: 50% !important;
	}
}


/* =========================================================
   Biskopsmötet – modal
   Klienten använder dessa v2-klasser. Knappstilen ovan räcker
   inte för att själva mötet ska bli synligt.
========================================================= */

#bishop_meeting_v2_modal {
	position: fixed;
	inset: 0;
	z-index: 968;
	display: none;
	place-items: center;
	padding: 18px;
	box-sizing: border-box;
}

#bishop_meeting_v2_modal.open {
	display: grid;
}

.bishop-meeting-v2-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(22, 18, 13, 0.48);
	backdrop-filter: blur(3px);
	-webkit-backdrop-filter: blur(3px);
}

.bishop-meeting-v2-card {
	position: relative;
	z-index: 1;
	display: grid;
	grid-template-rows: auto auto minmax(0, 1fr) auto;
	width: min(860px, calc(100vw - 36px));
	height: min(760px, calc(100vh - 36px));
	max-height: calc(100vh - 36px);
	overflow: hidden;
	border: 1px solid rgba(142, 116, 64, 0.72);
	border-radius: 18px;
	background: #f6f0df;
	color: #2c261b;
	box-shadow: 0 28px 80px rgba(0,0,0,.36);
}

.bishop-meeting-v2-header {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 16px;
	padding: 18px 20px 14px;
	border-bottom: 1px solid rgba(92, 73, 39, .2);
	background: rgba(255,255,255,.3);
}

.bishop-meeting-v2-header h2 {
	margin: 2px 0 0;
	font-family: Georgia, 'Times New Roman', serif;
	font-size: 1.65rem;
}

.bishop-meeting-v2-kicker {
	font-size: .72rem;
	font-weight: 800;
	letter-spacing: .08em;
	text-transform: uppercase;
	opacity: .62;
}

.bishop-meeting-v2-close {
	flex: 0 0 auto;
	width: 38px;
	height: 38px;
	padding: 0 !important;
	border-radius: 10px !important;
}

.bishop-meeting-v2-readonly {
	margin: 12px 18px 0;
	padding: 9px 11px;
	border-radius: 10px;
	background: rgba(150, 100, 45, .1);
	font-size: .88rem;
}

.bishop-meeting-v2-scroll {
	position: relative;
	min-height: 0;
	overflow-y: auto;
	padding: 14px 18px 18px;
	scrollbar-width: none;
}

.bishop-meeting-v2-scroll::-webkit-scrollbar { display: none; }

.bishop-meeting-v2-older-wrap {
	text-align: center;
	margin-bottom: 10px;
}

.bishop-meeting-v2-messages {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.bishop-meeting-v2-message {
	display: grid;
	grid-template-columns: 28px minmax(0, 1fr);
	gap: 10px;
	padding: 11px 12px;
	border: 1px solid rgba(84, 68, 42, .16);
	border-radius: 12px;
	background: rgba(255,255,255,.58);
}

.bishop-meeting-v2-message.is-own {
	background: rgba(232, 220, 185, .72);
}

.bishop-meeting-v2-sigil {
	font-size: 1.15rem;
	opacity: .62;
}

.bishop-meeting-v2-message-content header {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 5px;
}

.bishop-meeting-v2-message-content time {
	font-size: .72rem;
	opacity: .58;
	white-space: nowrap;
}

.bishop-meeting-v2-message-body {
	line-height: 1.45;
	white-space: pre-wrap;
}

.bishop-meeting-v2-actions {
	display: flex;
	gap: 6px;
	margin-top: 7px;
}

.bishop-meeting-v2-actions button,
.bishop-meeting-v2-secondary,
.bishop-meeting-v2-older {
	font-size: .8rem;
	padding: 5px 8px;
}

.bishop-meeting-v2-turn-divider {
	margin: 8px 0 2px;
	text-align: center;
	opacity: .74;
}

.bishop-meeting-v2-turn-divider span {
	display: inline-flex;
	flex-direction: column;
	gap: 2px;
}

.bishop-meeting-v2-turn-divider small {
	font-size: .72rem;
}

.bishop-meeting-v2-composer {
	padding: 12px 18px 16px;
	border-top: 1px solid rgba(92, 73, 39, .2);
	background: rgba(255,255,255,.35);
}

.bishop-meeting-v2-composer label {
	display: block;
	margin-bottom: 6px;
	font-weight: 700;
	font-size: .82rem;
}

#bishop_meeting_v2_text {
	display: block;
	width: 100%;
	box-sizing: border-box;
	resize: vertical;
	min-height: 64px;
	max-height: 180px;
	padding: 9px 10px;
	border: 1px solid rgba(92, 73, 39, .28);
	border-radius: 10px;
	background: rgba(255,255,255,.72);
	color: inherit;
	font: inherit;
}

.bishop-meeting-v2-composer-footer {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-top: 8px;
}

.bishop-meeting-v2-rules {
	margin-right: auto;
	font-size: .72rem;
	opacity: .62;
}

.bishop-meeting-v2-context {
	margin-bottom: 8px;
	padding: 8px 10px;
	border-left: 3px solid rgba(142,116,64,.65);
	background: rgba(142,116,64,.08);
}

.bishop-meeting-v2-context span {
	display: block;
	margin-top: 3px;
	font-size: .82rem;
}

.bishop-meeting-v2-loading,
.bishop-meeting-v2-error {
	padding: 18px;
	text-align: center;
}

.bishop-meeting-v2-error { color: #8b2f2f; }

body.bishop-meeting-v2-open { overflow: hidden; }

@media (max-width: 760px) {
	#bishop_meeting_v2_modal { padding: 8px; }
	.bishop-meeting-v2-card {
		width: calc(100vw - 16px);
		height: calc(100vh - 16px);
		max-height: calc(100vh - 16px);
		border-radius: 14px;
	}
	.bishop-meeting-v2-header { padding: 14px 14px 11px; }
	.bishop-meeting-v2-scroll { padding: 10px 12px 14px; }
	.bishop-meeting-v2-composer { padding: 10px 12px 12px; }
	.bishop-meeting-v2-rules { display: none; }
}


/* TD arkivmeny: ska alltid vara helt ogenomskinlig. */
#news_modal .td-edition-picker .custom-dropdown-menu {
	background: #f1ead8 !important;
	background-color: #f1ead8 !important;
	background-image: none !important;
	opacity: 1 !important;
	filter: none !important;
	backdrop-filter: none !important;
	-webkit-backdrop-filter: none !important;
	box-shadow: 0 9px 24px rgba(0,0,0,.34) !important;
}

#news_modal .td-edition-picker .custom-dropdown-option {
	background: #f1ead8 !important;
	background-color: #f1ead8 !important;
	opacity: 1 !important;
	filter: none !important;
	backdrop-filter: none !important;
	-webkit-backdrop-filter: none !important;
}

#news_modal .td-edition-picker .custom-dropdown-option:hover,
#news_modal .td-edition-picker .custom-dropdown-option:focus,
#news_modal .td-edition-picker .custom-dropdown-option.is-selected {
	background: #dfd1ac !important;
	background-color: #dfd1ac !important;
}

#news_modal .td-edition-picker .custom-dropdown-menu::before,
#news_modal .td-edition-picker .custom-dropdown-menu::after {
	display: none !important;
	content: none !important;
}
