/* Atelier Gallery — frontend */

.ag-wrap {
	--ag-ink: #15110e;
	--ag-bone: #eee4d5;
	--ag-hair: rgba(238, 228, 213, .24);
	--ag-height: 78vh;
	position: relative;
	margin: 0 0 2rem;
}

.ag-stage {
	position: relative;
	width: 100%;
	height: var(--ag-height);
	min-height: 380px;
	background: var(--ag-ink);
	overflow: hidden;
	color: var(--ag-bone);
	touch-action: none;
	-webkit-user-select: none;
	user-select: none;
	-webkit-tap-highlight-color: transparent;
}

.ag-stage.is-full {
	position: fixed;
	inset: 0;
	width: 100vw;
	height: 100vh;
	height: 100dvh;
	max-height: none;
	min-height: 0;
	margin: 0;
	z-index: 2147483647;
	background: #120f0d;
}

/* När webbläsaren tar över med Fullscreen API */
.ag-stage:fullscreen,
.ag-stage:-webkit-full-screen {
	width: 100vw;
	height: 100vh;
	position: fixed;
	inset: 0;
}

.ag-stage:fullscreen .ag-canvas,
.ag-stage:-webkit-full-screen .ag-canvas {
	width: 100%;
	height: 100%;
}

/* Låt inte sidan rulla bakom helskärmen */
html:has(.ag-stage.is-full),
body:has(.ag-stage.is-full) {
	overflow: hidden;
}

/* Regeln måste utgå från scenen, inte från wrappern. På mobil flyttas
   scenen direkt till body i helskärmsläget; en wrapper-bunden regel slutade
   då gälla och WordPress-temats canvasbredd lämnade en brun remsa till höger. */
.ag-stage .ag-canvas,
.ag-stage canvas.ag-canvas {
	display: block !important;
	position: absolute !important;
	inset: 0 !important;
	width: 100% !important;
	height: 100% !important;
	min-width: 0 !important;
	min-height: 0 !important;
	max-width: none !important;
	max-height: none !important;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	border-radius: 0 !important;
	box-shadow: none !important;
	object-fit: fill !important;
	aspect-ratio: auto !important;
	transform: none !important;
	float: none !important;
	background: transparent !important;
}

/* Temat får inte heller flytta eller beskära scenen */
.ag-wrap {
	max-width: none;
	isolation: isolate;
}

.ag-wrap .ag-stage {
	box-sizing: border-box;
	max-width: none;
}

.ag-wrap .ag-stage *,
.ag-wrap .ag-stage *::before,
.ag-wrap .ag-stage *::after {
	box-sizing: border-box;
}

/* Vissa teman ger alla knappar egna färger och radier */
.ag-wrap .ag-stage button {
	border-radius: 0;
	text-transform: uppercase;
	box-shadow: none;
	min-height: 0;
	width: auto;
}

/* ---------- Skärmar över scenen ---------- */

.ag-veil {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	padding: 24px;
	background: radial-gradient(ellipse at 50% 42%, var(--ag-veil-1, rgba(54, 42, 33, .86)), var(--ag-veil-2, rgba(17, 13, 11, .98)));
	opacity: 0;
	pointer-events: none;
	transition: opacity .45s ease;
	z-index: 6;
}

.ag-veil.is-on {
	opacity: 1;
	pointer-events: auto;
}

.ag-veil.ag-enter.is-on {
	cursor: pointer;
}

/* Samma tonade skärm som innan man går in, fast halvgenomskinlig —
   ligger bakom besökaren under den självgående rundan (inaktivitet),
   utan text eller knapp. Den korta mörkläggningen mellan rum/dörrar
   (.ag-dim) är en annan, separat yta. */
.ag-idle-veil {
	position: absolute;
	inset: 0;
	background: radial-gradient(ellipse at 50% 42%, var(--ag-veil-1, rgba(54, 42, 33, .86)), var(--ag-veil-2, rgba(17, 13, 11, .98)));
	opacity: 0;
	pointer-events: none;
	transition: opacity 1.1s ease;
	z-index: 5;
}

.ag-idle-veil.is-on {
	opacity: .5;
}

.ag-title {
	font-size: clamp(30px, 5vw, 62px);
	line-height: 1.02;
	margin: 0 0 22px;
	font-weight: 400;
	letter-spacing: .02em;
	color: var(--ag-bone);
}

.ag-cta {
	margin: 0;
	font-size: 10px;
	letter-spacing: .42em;
	text-transform: uppercase;
	opacity: .78;
}

.ag-hint {
	margin: 18px 0 0;
	font-size: 10px;
	letter-spacing: .16em;
	text-transform: uppercase;
	opacity: .38;
	max-width: 30em;
}

.ag-progress {
	width: min(280px, 66vw);
	height: 3px;
	background: var(--ag-hair);
	margin: 22px auto 0;
	border-radius: 99px;
	overflow: hidden;
}

.ag-progress i {
	display: block;
	height: 100%;
	width: 0;
	background: var(--ag-bone);
	transition: width .3s ease;
	border-radius: inherit;
}

/* ---------- Hårkors och etikett ---------- */

.ag-reticle {
	position: absolute;
	left: 50%;
	top: 50%;
	width: 5px;
	height: 5px;
	margin: -2.5px 0 0 -2.5px;
	z-index: 4;
	pointer-events: none;
	opacity: 0;
	transition: opacity .25s ease, transform .18s ease;
}

.ag-stage.is-live .ag-reticle {
	opacity: .5;
}

.ag-reticle i {
	display: block;
	width: 100%;
	height: 100%;
	border-radius: 50%;
	background: var(--ag-bone);
	box-shadow: 0 0 4px rgba(0, 0, 0, .8);
}

.ag-reticle.is-near {
	opacity: 1;
	transform: scale(2.1);
}

/* I närläget tittar man på verket, inte genom ett sikte. Det tonas ut
   och kommer tillbaka när man backar ut i rummet igen. */
.ag-stage.is-focus .ag-reticle {
	opacity: 0;
	transform: none;
}

.ag-label {
	position: absolute;
	left: 50%;
	top: calc(50% + 26px);
	transform: translateX(-50%);
	font-size: 10px;
	letter-spacing: .24em;
	text-transform: uppercase;
	white-space: nowrap;
	opacity: 0;
	transition: opacity .2s ease;
	pointer-events: none;
	z-index: 4;
	text-shadow: 0 1px 6px rgba(0, 0, 0, .9);
}

.ag-label.is-on {
	opacity: .85;
}

/* ---------- Bildtext i närläge ---------- */

.ag-caption {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	padding: 26px 30px calc(26px + env(safe-area-inset-bottom));
	background: linear-gradient(to top, rgba(25, 18, 14, .94), rgba(25, 18, 14, 0));
	z-index: 5;
	opacity: 0;
	transform: translateY(14px);
	transition: opacity .35s ease, transform .35s ease;
	pointer-events: none;
}

.ag-caption.is-on {
	opacity: 1;
	transform: none;
	pointer-events: auto;
}

.ag-caption h3 {
	margin: 0 0 6px;
	font-size: 20px;
	font-weight: 400;
	letter-spacing: .01em;
	color: var(--ag-bone);
}

.ag-caption .ag-meta {
	margin: 0 0 10px;
	font-size: 10px;
	letter-spacing: .26em;
	text-transform: uppercase;
	opacity: .5;
}

.ag-caption .ag-text {
	margin: 0;
	font-size: 13px;
	line-height: 1.75;
	opacity: .72;
	max-width: 46em;
}

.ag-back {
	margin-top: 16px;
	background: none;
	border: 1px solid var(--ag-hair);
	color: var(--ag-bone);
	padding: 9px 20px;
	font: inherit;
	font-size: 10px;
	letter-spacing: .24em;
	text-transform: uppercase;
	cursor: pointer;
	border-radius: 0;
	transition: border-color .2s ease, background .2s ease;
}

.ag-back:hover,
.ag-back:focus-visible {
	border-color: rgba(232, 227, 218, .6);
	background: rgba(232, 227, 218, .07);
}

/* ---------- Touchstyrning ---------- */

.ag-touch {
	position: absolute;
	inset: 0;
	z-index: 3;
	pointer-events: none;
	display: none;
}

.ag-stage.is-touch.is-live .ag-touch {
	display: block;
}

/* Ringarna ligger fast i nederkanten så att styrningen syns hela tiden.
   Fingret får ändå landa var som helst på sin halva — utgångsläget är
   där tummen sätts ned, och pricken visar riktningen. */

.ag-touch.is-hidden .ag-stick,
.ag-touch.is-hidden .ag-look {
	opacity: 0;
}

/* Vänster halva: gå. En tunn heldragen ring med en liten prick. */

.ag-stick {
	position: absolute;
	left: calc(30px + env(safe-area-inset-left));
	bottom: calc(104px + env(safe-area-inset-bottom));
	width: 112px;
	height: 112px;
	border: 1px solid rgba(232, 227, 218, .24);
	border-radius: 50%;
	opacity: .6;
	transition: opacity .3s ease, border-color .3s ease;
}

.ag-stick.is-active {
	opacity: 1;
	border-color: rgba(232, 227, 218, .42);
}

.ag-stick i {
	position: absolute;
	left: 50%;
	top: 50%;
	width: 34px;
	height: 34px;
	margin: -17px 0 0 -17px;
	border-radius: 50%;
	background: rgba(232, 227, 218, .14);
	border: 1px solid rgba(232, 227, 218, .5);
	transition: transform .06s linear;
}

.ag-stick.is-active i {
	transition: transform .04s linear;
}

/* Höger halva: sväng. Ringen är streckad — den greppar inget, den
   vrider — och två pilspetsar i sidled visar rörelsen. */

.ag-look {
	position: absolute;
	right: calc(30px + env(safe-area-inset-right));
	bottom: calc(104px + env(safe-area-inset-bottom));
	width: 112px;
	height: 112px;
	border: 1px dashed rgba(232, 227, 218, .22);
	border-radius: 50%;
	opacity: .6;
	transition: opacity .3s ease, border-color .3s ease;
}

.ag-look.is-active {
	opacity: 1;
	border-color: rgba(232, 227, 218, .4);
}

.ag-look::before,
.ag-look::after {
	content: '';
	position: absolute;
	top: 50%;
	width: 7px;
	height: 7px;
	margin-top: -4px;
	border-top: 1px solid rgba(232, 227, 218, .5);
	border-right: 1px solid rgba(232, 227, 218, .5);
}

.ag-look::before {
	left: -14px;
	transform: rotate(-135deg);
}

.ag-look::after {
	right: -14px;
	transform: rotate(45deg);
}

.ag-look i {
	position: absolute;
	left: 50%;
	top: 50%;
	width: 9px;
	height: 9px;
	margin: -4.5px 0 0 -4.5px;
	border-radius: 50%;
	background: rgba(232, 227, 218, .65);
	transition: transform .06s linear;
}

.ag-look.is-active i {
	background: rgba(232, 227, 218, .85);
	transition: transform .04s linear;
}

/* Låg skärm: dra ned ringarna så de inte krockar med verken */
@media (max-height: 620px) {
	.ag-stick,
	.ag-look {
		width: 92px;
		height: 92px;
		bottom: calc(86px + env(safe-area-inset-bottom));
	}
}

/* ---------- HTML-reserv ---------- */

.ag-fallback {
	list-style: none;
	margin: 0;
	padding: 0;
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	white-space: nowrap;
}

.ag-wrap.no-webgl .ag-fallback {
	position: static;
	width: auto;
	height: auto;
	overflow: visible;
	clip: auto;
	clip-path: none;
	white-space: normal;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
	gap: 18px;
}

.ag-wrap.no-webgl .ag-stage {
	display: none;
}

.ag-fallback img {
	width: 100%;
	height: auto;
	display: block;
}

.ag-empty {
	padding: 20px;
	border: 1px dashed rgba(0, 0, 0, .2);
}

@media (prefers-reduced-motion: reduce) {
	.ag-veil,
	.ag-caption,
	.ag-label,
	.ag-reticle {
		transition: none;
	}

	.ag-stick,
	.ag-look,
	.ag-stick i,
	.ag-look i {
		transition: none;
	}
}

/* ---------- Rumsetikett ---------- */

.ag-room-tag {
	position: absolute;
	left: 50%;
	top: 34px;
	transform: translateX(-50%);
	font-size: 10px;
	letter-spacing: .42em;
	text-transform: uppercase;
	opacity: 0;
	transition: opacity .6s ease;
	pointer-events: none;
	z-index: 4;
	text-shadow: 0 1px 8px rgba(0, 0, 0, .9);
}

.ag-room-tag.is-on { opacity: .8; }

/* ---------- Vägledning i närläge ---------- */

.ag-hint-back {
	position: absolute;
	left: 50%;
	top: 22px;
	transform: translateX(-50%);
	font-size: 10px;
	letter-spacing: .2em;
	text-transform: uppercase;
	opacity: 0;
	transition: opacity .5s ease;
	pointer-events: none;
	z-index: 6;
	color: var(--ag-bone);
	text-shadow: 0 1px 8px rgba(0, 0, 0, .95);
}

.ag-hint-back.is-on { opacity: .62; }

/* ---------- Ljust galleri ---------- */

.ag-theme-white {
	--ag-ink: #eee7dc;
	--ag-bone: #241c17;
	--ag-hair: rgba(62, 46, 35, .22);
}

.ag-theme-white .ag-stage { background: #eee7dc; }

.ag-theme-white .ag-veil {
	background: radial-gradient(ellipse at 50% 42%, rgba(250, 246, 238, .90), rgba(225, 214, 199, .98));
}

.ag-theme-white .ag-reticle i { box-shadow: 0 0 4px rgba(255, 255, 255, .9); }
.ag-theme-white .ag-label,
.ag-theme-white .ag-room-tag { text-shadow: 0 1px 6px rgba(255, 255, 255, .85); }

.ag-theme-white .ag-stick,
.ag-theme-white .ag-look {
	border-color: rgba(22, 23, 26, .22);
}

.ag-theme-white .ag-stick.is-active,
.ag-theme-white .ag-look.is-active {
	border-color: rgba(22, 23, 26, .4);
}

.ag-theme-white .ag-stick i {
	background: rgba(22, 23, 26, .1);
	border-color: rgba(22, 23, 26, .35);
}

.ag-theme-white .ag-look::before,
.ag-theme-white .ag-look::after {
	border-top-color: rgba(22, 23, 26, .45);
	border-right-color: rgba(22, 23, 26, .45);
}

.ag-theme-white .ag-look i {
	background: rgba(22, 23, 26, .55);
}

/* Bildtexten ligger mot det mörklagda rummet — den förblir ljus i båda temana */
.ag-theme-white .ag-caption {
	background: linear-gradient(to top, rgba(25, 18, 14, .92), rgba(25, 18, 14, 0));
	color: #e8e3da;
}
.ag-theme-white .ag-caption h3 { color: #e8e3da; }
.ag-theme-white .ag-back {
	color: #e8e3da;
	border-color: rgba(232, 227, 218, .28);
}
.ag-theme-white .ag-hint-back {
	color: #e8e3da;
	text-shadow: 0 1px 8px rgba(0, 0, 0, .9);
}

/* ---------- Knappar i bildtexten ---------- */

.ag-caption-actions {
	display: flex;
	gap: 10px;
	align-items: center;
	margin-top: 16px;
	flex-wrap: wrap;
}

.ag-caption-actions .ag-back { margin-top: 0; }

.ag-sound {
	background: none;
	border: 1px solid rgba(232, 227, 218, .28);
	color: #e8e3da;
	padding: 9px 20px;
	font: inherit;
	font-size: 10px;
	letter-spacing: .24em;
	text-transform: uppercase;
	cursor: pointer;
	border-radius: 0;
	transition: border-color .2s ease, background .2s ease;
}

.ag-sound:hover,
.ag-sound:focus-visible {
	border-color: rgba(232, 227, 218, .6);
	background: rgba(232, 227, 218, .07);
}

.ag-sound.is-on {
	background: rgba(232, 227, 218, .14);
	border-color: rgba(232, 227, 218, .65);
}

.ag-like {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	background: none;
	border: 1px solid rgba(232, 227, 218, .28);
	color: #e8e3da;
	padding: 9px 20px;
	font: inherit;
	font-size: 10px;
	letter-spacing: .24em;
	text-transform: uppercase;
	cursor: pointer;
	border-radius: 0;
	transition: border-color .2s ease, background .2s ease;
}

.ag-like svg { fill: none; stroke: currentColor; stroke-width: 1.6; transition: fill .2s ease; }

.ag-like:hover,
.ag-like:focus-visible {
	border-color: rgba(232, 227, 218, .6);
	background: rgba(232, 227, 218, .07);
}

.ag-like.is-liked {
	background: rgba(232, 227, 218, .14);
	border-color: rgba(232, 227, 218, .65);
}

.ag-like.is-liked svg { fill: currentColor; stroke: none; }

/* ---------- Toast: hemligt rum upplåst ---------- */

.ag-secret-toast {
	position: absolute;
	left: 50%;
	bottom: 128px;
	transform: translate(-50%, 10px);
	max-width: min(86%, 480px);
	background: rgba(18, 15, 13, .92);
	border: 1px solid rgba(232, 227, 218, .3);
	color: #e8e3da;
	padding: 16px 22px;
	text-align: center;
	font-size: 13px;
	line-height: 1.55;
	letter-spacing: .01em;
	opacity: 0;
	pointer-events: none;
	transition: opacity .5s ease, transform .5s ease;
	z-index: 40;
}

.ag-secret-toast.is-on {
	opacity: 1;
	transform: translate(-50%, 0);
}

.ag-secret-toast-text { margin: 0; }

/* ---------- Ny version eller nytillkommet verk ---------- */

.ag-update-stack {
	position: absolute;
	top: 50%;
	left: 50%;
	right: auto;
	transform: translate(-50%, -50%);
	z-index: 12;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 9px;
	width: min(72vw, 340px);
	pointer-events: none;
}

.ag-update-button {
	position: relative;
	display: grid;
	place-items: center;
	width: 46px !important;
	height: 46px;
	padding: 0;
	border: 1px solid rgba(255, 255, 255, .58);
	background: rgba(8, 8, 8, .86);
	color: #fff;
	cursor: pointer;
	pointer-events: auto;
	box-shadow: 0 8px 30px rgba(0, 0, 0, .28);
	opacity: .94;
	animation: ag-update-arrive .45s ease both;
}

.ag-update-button[hidden],
.ag-update-notice[hidden] { display: none !important; }

.ag-update-button svg {
	display: block;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.7;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.ag-update-button:hover,
.ag-update-button:focus-visible {
	border-color: #fff;
	background: rgba(25, 21, 18, .96);
}

.ag-update-button.is-loading svg { animation: ag-update-spin .9s linear infinite; }

.ag-update-dot {
	position: absolute;
	top: 5px;
	right: 5px;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: #d93632;
	box-shadow: 0 0 0 3px rgba(217, 54, 50, .2);
	animation: ag-update-pulse 1.8s ease-in-out infinite;
}

.ag-update-notice {
	position: relative;
	width: 100%;
	min-height: 46px;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 10px 15px;
	background: rgba(8, 8, 8, .86);
	border: 1px solid rgba(255, 255, 255, .28);
	color: #fff;
	text-align: center;
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
	animation: ag-update-arrive .45s ease both;
}

.ag-update-notice-text {
	margin: 0;
	font-size: 10px;
	line-height: 1.45;
	letter-spacing: .12em;
	text-transform: uppercase;
}

@keyframes ag-update-arrive {
	from { opacity: 0; transform: translateY(-8px); }
	to { opacity: 1; transform: translateY(0); }
}

@keyframes ag-update-spin { to { transform: rotate(360deg); } }
@keyframes ag-update-pulse {
	0%, 100% { opacity: .62; transform: scale(.86); }
	50% { opacity: 1; transform: scale(1.12); }
}

@media (max-width: 640px) {
	.ag-update-stack {
		top: 50%;
		left: 50%;
		right: auto;
		width: min(74vw, 280px);
	}
}

@media (max-width: 640px) {
	.ag-secret-toast { bottom: 96px; font-size: 12px; padding: 13px 18px; }
}

/* ---------- Planritning ---------- */

.ag-nav {
	position: absolute;
	left: calc(18px + env(safe-area-inset-left));
	bottom: calc(18px + env(safe-area-inset-bottom));
	z-index: 4;
	pointer-events: none;
	opacity: 0;
	transition: opacity .4s ease;
}

.ag-stage.is-live .ag-nav { opacity: 1; }

.ag-map {
	display: block;
	width: 170px;
	height: 75px;
	background: rgba(10, 11, 13, .38);
	backdrop-filter: blur(4px);
	border: 1px solid var(--ag-hair);
	border-radius: 2px;
}

.ag-theme-white .ag-map {
	background: rgba(249, 244, 236, .68);
}

.ag-nav-info {
	display: flex;
	align-items: baseline;
	gap: 10px;
	margin-top: 7px;
	font-size: 9px;
	letter-spacing: .2em;
	text-transform: uppercase;
	color: var(--ag-bone);
	text-shadow: 0 1px 6px rgba(0, 0, 0, .55);
}

.ag-theme-white .ag-nav-info { text-shadow: 0 1px 6px rgba(255, 255, 255, .8); }

.ag-nav-room { opacity: .82; }
.ag-nav-count { opacity: .45; margin-left: auto; }

/* Kartan viker undan när ett verk är förstorat */
.ag-nav.is-hidden { opacity: 0 !important; }

@media (max-width: 600px) {
	.ag-map { width: 128px; height: 56px; }
	.ag-nav-info { font-size: 8px; gap: 7px; }
}

.ag-scope {
	margin: 0 0 16px;
	font-size: 11px;
	letter-spacing: .28em;
	text-transform: uppercase;
	opacity: .45;
}

/* ---------- Scenen lyft ur sidan i helskärm ---------- */

.ag-placeholder {
	width: 100%;
	height: var(--ag-height, 78vh);
	min-height: 380px;
}

.ag-stage.ag-portal {
	--ag-ink: #15110e;
	--ag-bone: #eee4d5;
	--ag-hair: rgba(238, 228, 213, .24);
}

.ag-stage.ag-portal.ag-theme-white {
	--ag-ink: #eee7dc;
	--ag-bone: #241c17;
	--ag-hair: rgba(62, 46, 35, .22);
	background: #eee7dc;
}

.ag-stage.ag-portal.ag-theme-white .ag-veil {
	background: radial-gradient(ellipse at 50% 42%, rgba(250, 246, 238, .90), rgba(225, 214, 199, .98));
}

.ag-stage.ag-portal.ag-theme-white .ag-caption {
	background: linear-gradient(to top, rgba(25, 18, 14, .92), rgba(25, 18, 14, 0));
	color: #e8e3da;
}

.ag-stage.ag-portal.ag-theme-white .ag-map {
	background: rgba(249, 244, 236, .68);
}


/* ---------- Knappar ska alltid kunna tryckas ---------- */

.ag-wrap .ag-stage button,
.ag-stage.ag-portal button {
	pointer-events: auto !important;
	touch-action: manipulation;
	position: relative;
	z-index: 8;
}

.ag-caption.is-on {
	pointer-events: auto;
	touch-action: manipulation;
}

.ag-close {
	touch-action: manipulation;
}

/* ---------- Bildtexten på liten skärm ---------- */

@media (max-width: 900px), (max-height: 560px) {
	.ag-caption {
		padding: 10px 18px calc(10px + env(safe-area-inset-bottom));
		background: linear-gradient(to top, rgba(25, 18, 14, .94) 55%, rgba(25, 18, 14, 0));
		padding-left: calc(18px + env(safe-area-inset-left));
		padding-right: calc(18px + env(safe-area-inset-right));
	}

	.ag-caption h3 {
		font-size: 15px;
		margin-bottom: 3px;
	}

	.ag-caption .ag-meta {
		font-size: 9px;
		margin-bottom: 5px;
	}

	.ag-caption .ag-text {
		font-size: 12px;
		line-height: 1.55;
		max-height: 3.1em;
		overflow: hidden;
	}

	.ag-caption-actions {
		margin-top: 7px;
		gap: 8px;
	}

	.ag-caption-actions button {
		padding: 7px 14px;
		font-size: 9px;
		letter-spacing: .18em;
	}
}

/* Liggande telefon: minimalt, så verket får plats */
@media (max-height: 460px) {
	.ag-caption .ag-text { display: none; }
	.ag-caption { padding-bottom: calc(10px + env(safe-area-inset-bottom)); }
	.ag-caption h3 { font-size: 14px; }
	.ag-caption-actions { margin-top: 8px; }
}

/* Hörnen på telefoner med skärmutskärning */
.ag-stage.is-full .ag-nav {
	left: calc(18px + env(safe-area-inset-left));
}

.ag-stage.is-full .ag-close {
	right: calc(12px + env(safe-area-inset-right));
	top: calc(12px + env(safe-area-inset-top));
}

/* ---------- Albumet ---------- */

.ag-album {
	position: absolute;
	inset: 0;
	z-index: 10;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
	background: rgba(22, 17, 14, .94);
	backdrop-filter: blur(10px);
	opacity: 0;
	transition: opacity .35s ease;
	color: #e8e3da;
}

.ag-album.is-on { opacity: 1; }
.ag-album[hidden] { display: none; }

.ag-album-inner {
	width: 100%;
	max-width: 1180px;
	height: 100%;
	min-height: 0;
	display: flex;
	flex-direction: column;
	gap: 16px;
	position: relative;
}

.ag-album-close {
	position: absolute;
	top: 0;
	right: 0;
	z-index: 3;
	width: 40px;
	height: 40px;
	background: none;
	border: 1px solid rgba(232, 227, 218, .25);
	color: #e8e3da;
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
}

.ag-album-stage {
	position: relative;
	flex: 1 1 auto;
	min-height: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 14px;
}

.ag-album-media {
	flex: 1 1 auto;
	min-width: 0;
	min-height: 0;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
}

.ag-album-media img {
	max-width: 100%;
	max-height: 100%;
	width: auto;
	height: auto;
	min-width: 0;
	min-height: 0;
	object-fit: contain;
	display: block;
	margin: auto;
	box-shadow: 0 24px 70px rgba(0, 0, 0, .6);
}

/* Meta och miniatyrer krymper aldrig bort bilden */
.ag-album-meta,
.ag-album-strip {
	flex: 0 0 auto;
}

.ag-album-blank {
	width: 220px;
	height: 140px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(232, 227, 218, .08);
	font-size: 28px;
	opacity: .5;
}

.ag-album-prev,
.ag-album-next {
	flex: 0 0 auto;
	width: 46px;
	height: 76px;
	background: none;
	border: 1px solid rgba(232, 227, 218, .18);
	color: #e8e3da;
	font-size: 26px;
	line-height: 1;
	cursor: pointer;
	transition: border-color .2s ease, background .2s ease;
}

.ag-album-prev:hover,
.ag-album-next:hover {
	border-color: rgba(232, 227, 218, .55);
	background: rgba(232, 227, 218, .07);
}

.ag-album-meta { text-align: center; }

.ag-album-meta h3 {
	margin: 0 0 5px;
	font-size: 20px;
	font-weight: 400;
	color: #e8e3da;
}

.ag-album-sub {
	margin: 0 0 8px;
	font-size: 10px;
	letter-spacing: .26em;
	text-transform: uppercase;
	opacity: .5;
}

.ag-album-text {
	margin: 0 auto;
	font-size: 13px;
	line-height: 1.7;
	opacity: .72;
	max-width: 52em;
	max-height: 4.4em;
	overflow: hidden;
}

.ag-album-actions {
	margin-top: 14px;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 16px;
}

.ag-album-goto {
	background: none;
	border: 1px solid rgba(232, 227, 218, .3);
	color: #e8e3da;
	padding: 9px 20px;
	font: inherit;
	font-size: 10px;
	letter-spacing: .24em;
	text-transform: uppercase;
	cursor: pointer;
	transition: border-color .2s ease, background .2s ease;
}

.ag-album-goto:hover {
	border-color: rgba(232, 227, 218, .65);
	background: rgba(232, 227, 218, .1);
}

.ag-album-count {
	font-size: 10px;
	letter-spacing: .22em;
	opacity: .45;
}

.ag-album-strip {
	display: flex;
	gap: 8px;
	overflow-x: auto;
	overflow-y: hidden;
	padding: 4px 0 8px;
	scrollbar-width: thin;
	-webkit-overflow-scrolling: touch;
}

.ag-thumb {
	flex: 0 0 auto;
	width: 62px;
	height: 62px;
	padding: 0;
	border: 1px solid transparent;
	background: rgba(232, 227, 218, .07);
	cursor: pointer;
	opacity: .45;
	transition: opacity .2s ease, border-color .2s ease;
	overflow: hidden;
	color: #e8e3da;
}

.ag-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.ag-thumb:hover { opacity: .85; }

.ag-thumb.is-on {
	opacity: 1;
	border-color: rgba(232, 227, 218, .8);
}

@media (max-width: 700px), (max-height: 560px) {
	.ag-album { padding: 14px; }
	.ag-album-inner { gap: 10px; }
	.ag-album-close { width: 34px; height: 34px; font-size: 19px; }
	.ag-album-prev, .ag-album-next {
		width: 34px;
		height: 58px;
		font-size: 20px;
		flex: 0 0 auto;
	}
	.ag-album-meta h3 { font-size: 15px; }
	.ag-album-text { display: none; }
	.ag-album-actions { margin-top: 8px; gap: 10px; }
	.ag-thumb { width: 44px; height: 44px; }
	.ag-album-strip { gap: 5px; }
}

@media (max-height: 430px) {
	.ag-album-strip { display: none; }
	.ag-album-sub { margin-bottom: 4px; }
}

/* ---------- Den klickbara bokhyllan ---------- */

.ag-library {
	position: absolute;
	inset: 0;
	z-index: 11;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: max(20px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-right)) max(18px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left));
	background:
		radial-gradient(circle at 50% 38%, rgba(95, 72, 51, .20), transparent 48%),
		rgba(18, 14, 12, .965);
	backdrop-filter: blur(12px);
	color: #eee6da;
	opacity: 0;
	transition: opacity .32s ease;
	overflow: hidden;
}

.ag-library.is-on { opacity: 1; }
.ag-library[hidden] { display: none; }

.ag-library-inner {
	position: relative;
	width: min(100%, 1100px);
	height: 100%;
	min-height: 0;
	display: flex;
	flex-direction: column;
	gap: 13px;
}

.ag-library-close {
	position: absolute;
	top: 0;
	right: 0;
	z-index: 4;
	width: 40px;
	min-width: 40px;
	height: 40px;
	padding: 0;
	border: 1px solid rgba(238, 230, 218, .28);
	background: rgba(18, 14, 12, .62);
	color: #eee6da;
	font: inherit;
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
}

.ag-library-head {
	flex: 0 0 auto;
	text-align: center;
	padding: 2px 52px 0;
}

.ag-library-head h3 {
	margin: 0;
	color: #eee6da;
	font-size: clamp(18px, 2.7vw, 28px);
	font-weight: 400;
	letter-spacing: .08em;
}

.ag-library-total {
	margin: 5px 0 0;
	font-size: 9px;
	letter-spacing: .25em;
	text-transform: uppercase;
	opacity: .48;
}

.ag-library-stage {
	flex: 1 1 auto;
	min-height: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: clamp(12px, 3vw, 34px);
}

.ag-library-book {
	min-width: 0;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: clamp(18px, 4vw, 46px);
}

.ag-library-image {
	display: block;
	width: auto;
	height: min(100%, 510px);
	max-width: min(34vw, 150px);
	object-fit: contain;
	box-shadow: 0 22px 60px rgba(0, 0, 0, .62), -5px 0 12px rgba(0, 0, 0, .24);
	background: #29231e;
}

.ag-library-meta {
	width: min(36vw, 360px);
	text-align: left;
}

.ag-library-meta h4 {
	margin: 0 0 10px;
	color: #eee6da;
	font-size: clamp(19px, 3.4vw, 36px);
	font-weight: 400;
	line-height: 1.12;
}

.ag-library-category,
.ag-library-count {
	margin: 0;
	font-size: 10px;
	letter-spacing: .24em;
	text-transform: uppercase;
	opacity: .52;
}

.ag-library-history {
	max-width: 38em;
	margin: 18px 0 0;
	color: rgba(238, 230, 218, .76);
	font-size: clamp(12px, 1.25vw, 15px);
	font-weight: 300;
	line-height: 1.68;
	letter-spacing: .015em;
}

.ag-library-count { margin-top: 11px; opacity: .34; }

.ag-library-prev,
.ag-library-next {
	flex: 0 0 46px;
	width: 46px;
	min-width: 46px;
	height: 78px;
	padding: 0;
	border: 1px solid rgba(238, 230, 218, .22);
	background: rgba(238, 230, 218, .025);
	color: #eee6da;
	font: inherit;
	font-size: 28px;
	line-height: 1;
	cursor: pointer;
}

.ag-library-prev:hover,
.ag-library-next:hover,
.ag-library-close:hover {
	border-color: rgba(238, 230, 218, .65);
	background: rgba(238, 230, 218, .08);
}

.ag-library-strip {
	flex: 0 0 auto;
	display: flex;
	align-items: flex-end;
	gap: 7px;
	height: 104px;
	padding: 5px 2px 9px;
	overflow-x: auto;
	overflow-y: hidden;
	scrollbar-width: thin;
	-webkit-overflow-scrolling: touch;
}

.ag-library-thumb {
	position: relative;
	flex: 0 0 24px;
	width: 24px;
	min-width: 24px;
	height: 88px;
	padding: 0;
	border: 1px solid transparent;
	background: #2c251f;
	opacity: .46;
	overflow: hidden;
	cursor: pointer;
	transition: opacity .18s ease, transform .18s ease, border-color .18s ease;
}

.ag-library-thumb img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.ag-library-thumb:hover { opacity: .84; transform: translateY(-3px); }
.ag-library-thumb.is-on {
	opacity: 1;
	transform: translateY(-4px);
	border-color: rgba(238, 230, 218, .92);
}

@media (max-width: 700px) {
	.ag-library { padding: max(14px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) max(10px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left)); }
	.ag-library-inner { gap: 8px; }
	.ag-library-close { width: 36px; min-width: 36px; height: 36px; font-size: 20px; }
	.ag-library-head { padding-left: 42px; padding-right: 42px; }
	.ag-library-stage { gap: 10px; }
	.ag-library-book { gap: 15px; }
	.ag-library-image { max-width: min(31vw, 118px); height: min(100%, 430px); }
	.ag-library-meta { width: min(38vw, 230px); }
	.ag-library-meta h4 { font-size: clamp(17px, 5.2vw, 27px); }
	.ag-library-history { margin-top: 12px; font-size: 11px; line-height: 1.52; }
	.ag-library-prev, .ag-library-next { flex-basis: 34px; width: 34px; min-width: 34px; height: 62px; font-size: 22px; }
	.ag-library-strip { height: 83px; gap: 5px; }
	.ag-library-thumb { flex-basis: 18px; width: 18px; min-width: 18px; height: 68px; }
}

@media (max-height: 500px) {
	.ag-library { padding-top: 10px; padding-bottom: 8px; }
	.ag-library-head h3 { font-size: 16px; }
	.ag-library-total { margin-top: 2px; }
	.ag-library-image { height: min(100%, 270px); }
	.ag-library-meta h4 { font-size: 18px; margin-bottom: 5px; }
	.ag-library-history { max-height: 76px; margin-top: 8px; overflow-y: auto; font-size: 10px; line-height: 1.45; }
	.ag-library-strip { height: 58px; padding-bottom: 3px; }
	.ag-library-thumb { flex-basis: 13px; width: 13px; min-width: 13px; height: 49px; }
}

.ag-progress-count {
	margin: 12px 0 0;
	font-size: 10px;
	letter-spacing: .28em;
	opacity: .62;
}

/* ---------- Begränsad ägarinloggning och balkongens gästbok ---------- */

.ag-member-button,
.ag-home-button {
	position: absolute;
	top: calc(14px + env(safe-area-inset-top));
	left: calc(14px + env(safe-area-inset-left));
	z-index: 8;
	padding: 9px 13px;
	border: 1px solid rgba(255, 255, 255, .28);
	background: rgba(8, 8, 8, .72);
	color: #fff;
	font: inherit;
	font-size: 9px;
	letter-spacing: .22em;
	text-transform: uppercase;
	opacity: 0;
	pointer-events: none;
	transition: opacity .25s ease, border-color .2s ease;
}

.ag-stage.is-live .ag-member-button,
.ag-stage.is-live .ag-home-button {
	opacity: .82;
	pointer-events: auto;
}

.ag-member-button:hover,
.ag-member-button:focus-visible,
.ag-home-button:hover,
.ag-home-button:focus-visible {
	opacity: 1;
	border-color: rgba(255, 255, 255, .72);
}

/* Rummets ljusläge: allmänljuset går ner medan spotarna träder fram. */
.ag-stage .ag-light-toggle {
	position: absolute !important;
	top: calc(10px + env(safe-area-inset-top)) !important;
	left: 50% !important;
	right: auto !important;
	transform: translateX(-50%) !important;
	z-index: 8;
	display: grid;
	place-items: center;
	width: 38px !important;
	height: 32px !important;
	min-width: 0 !important;
	min-height: 0 !important;
	max-width: 38px !important;
	max-height: 32px !important;
	padding: 0 !important;
	border: 1px solid rgba(255, 255, 255, .12) !important;
	border-radius: 8px !important;
	-webkit-appearance: none !important;
	appearance: none !important;
	background: rgba(20, 18, 17, .88) !important;
	background-color: rgba(20, 18, 17, .88) !important;
	background-image: none !important;
	color: rgba(210, 204, 197, .52) !important;
	box-shadow: none !important;
	opacity: 0;
	pointer-events: none !important;
	transition: opacity .25s ease, color .25s ease, background .25s ease, box-shadow .25s ease;
}

.ag-stage.is-live .ag-light-toggle {
	opacity: .68;
	pointer-events: auto !important;
}

.ag-stage .ag-light-toggle:hover,
.ag-stage .ag-light-toggle:focus-visible {
	opacity: .86;
	border-color: rgba(255, 255, 255, .32) !important;
}

.ag-stage .ag-light-toggle svg {
	fill: none;
	stroke: currentColor;
	stroke-width: 1.6;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.ag-stage .ag-light-toggle.is-on {
	color: rgba(221, 187, 116, .78) !important;
	background: rgba(25, 22, 18, .86) !important;
	box-shadow: 0 0 11px rgba(247, 194, 87, .12) !important;
}

.ag-stage .ag-light-toggle.is-on .ag-light-rays {
	stroke-width: 2.2;
}

.ag-member-panel,
.ag-guestbook {
	position: absolute;
	inset: 0;
	z-index: 20;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: max(18px, env(safe-area-inset-top)) max(18px, env(safe-area-inset-right)) max(18px, env(safe-area-inset-bottom)) max(18px, env(safe-area-inset-left));
	background: rgba(7, 7, 7, .78);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
	opacity: 0;
	pointer-events: none;
	transition: opacity .28s ease;
}

.ag-member-panel[hidden],
.ag-guestbook[hidden] {
	display: none;
}

.ag-member-panel.is-on,
.ag-guestbook.is-on {
	opacity: 1;
	pointer-events: auto;
}

.ag-member-card,
.ag-guestbook-card {
	position: relative;
	width: min(520px, 100%);
	max-height: 100%;
	overflow: auto;
	padding: 34px;
	border: 1px solid rgba(255, 255, 255, .18);
	background: #111;
	color: #fff;
	box-shadow: 0 22px 80px rgba(0, 0, 0, .58);
}

.ag-guestbook-card {
	width: min(680px, 100%);
}

.ag-member-close,
.ag-guestbook-close {
	position: absolute;
	top: 12px;
	right: 12px;
	width: 34px;
	height: 34px;
	border: 1px solid rgba(255, 255, 255, .24);
	background: transparent;
	color: #fff;
	font-size: 20px;
	line-height: 1;
}

.ag-member-kicker {
	margin: 0 0 10px;
	font-size: 9px;
	letter-spacing: .34em;
	opacity: .5;
}

.ag-member-title,
.ag-guestbook-card h3 {
	margin: 0 0 24px;
	font-size: clamp(24px, 5vw, 38px);
	font-weight: 400;
	letter-spacing: .08em;
}

.ag-member-form,
.ag-guestbook-form {
	display: grid;
	gap: 12px;
}

.ag-member-form label,
.ag-guestbook-form label {
	display: grid;
	gap: 7px;
	font-size: 9px;
	letter-spacing: .24em;
}

.ag-member-form input,
.ag-guestbook-form input[name="name"],
.ag-guestbook-form textarea {
	width: 100%;
	border: 1px solid rgba(255, 255, 255, .24);
	border-radius: 0;
	background: #090909;
	color: #fff;
	font: inherit;
	font-size: 16px;
	letter-spacing: normal;
	padding: 12px;
	resize: vertical;
}

.ag-member-form input:focus,
.ag-guestbook-form input[name="name"]:focus,
.ag-guestbook-form textarea:focus {
	outline: none;
	border-color: rgba(255, 255, 255, .76);
}

.ag-member-form > button,
.ag-member-actions button,
.ag-guestbook-form > button {
	justify-self: start;
	border: 1px solid rgba(255, 255, 255, .38);
	background: #fff;
	color: #0b0b0b;
	padding: 11px 16px;
	font: inherit;
	font-size: 9px;
	letter-spacing: .2em;
}

.ag-member-error,
.ag-guestbook-error {
	min-height: 1.3em;
	margin: 0;
	color: #ff9b83;
	font-size: 11px;
}

.ag-member-signed p {
	margin: 0 0 10px;
}

.ag-member-role {
	font-size: 10px;
	letter-spacing: .2em;
	text-transform: uppercase;
	opacity: .52;
}

.ag-member-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 22px;
}

.ag-member-actions .ag-member-logout {
	background: transparent;
	color: #fff;
}

.ag-guestbook-entries {
	display: grid;
	gap: 10px;
	max-height: min(42vh, 360px);
	overflow: auto;
	margin: 0 0 22px;
	padding-right: 5px;
}

.ag-guestbook-entry,
.ag-guestbook-empty {
	padding: 14px 16px;
	border: 1px solid rgba(255, 255, 255, .13);
	background: rgba(255, 255, 255, .035);
}

.ag-guestbook-entry-head {
	display: flex;
	justify-content: space-between;
	gap: 14px;
	margin-bottom: 8px;
	font-size: 9px;
	letter-spacing: .16em;
	text-transform: uppercase;
	opacity: .55;
}

.ag-guestbook-entry p,
.ag-guestbook-empty {
	margin: 0;
	font-size: 13px;
	line-height: 1.55;
	white-space: pre-wrap;
}

@media (max-width: 600px) {
	.ag-member-card,
	.ag-guestbook-card { padding: 28px 20px 22px; }
	.ag-member-actions { display: grid; }
	.ag-guestbook-entries { max-height: 34vh; }
}

/* Albumet i helskärm: räkna mot rutans verkliga höjd */
.ag-stage.is-full .ag-album {
	height: 100%;
	padding-top: calc(14px + env(safe-area-inset-top));
	padding-bottom: calc(14px + env(safe-area-inset-bottom));
	padding-left: calc(14px + env(safe-area-inset-left));
	padding-right: calc(14px + env(safe-area-inset-right));
}

.ag-album-close {
	flex: 0 0 auto;
}

/* Hårkorset markerar tydligare när något är i siktet */
.ag-reticle.is-near i {
	background: transparent;
	border: 2px solid #fff4d2;
	box-shadow:
		0 0 5px rgba(0, 0, 0, .75),
		0 0 8px rgba(255, 244, 210, .92),
		0 0 17px rgba(255, 213, 130, .72);
	animation: ag-reticle-spark .7s steps(2, end) infinite;
}

.ag-reticle.is-near {
	transform: scale(3.1);
}

@keyframes ag-reticle-spark {
	0%, 100% { opacity: 1; transform: scale(1); }
	35% { opacity: .72; transform: scale(.86); }
	62% { opacity: .95; transform: scale(1.16); }
	80% { opacity: .78; transform: scale(.94); }
}

/* ---------- Lås: grind, lösenordsruta och låst verk ---------- */

.ag-gated {
	display: block;
}

.ag-gate {
	min-height: min(52vh, 460px);
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 14px;
	padding: 48px 24px;
	text-align: center;
	background: var(--ag-ink, #0d0f12);
	color: var(--ag-bone, #e8e3da);
}

.ag-theme-white .ag-gate {
	background: #eee7dc;
	color: #241c17;
}

.ag-gate-title {
	margin: 0;
	font-size: 22px;
	font-weight: 400;
	letter-spacing: .04em;
}

.ag-gate-lead {
	margin: 0;
	font-size: 13px;
	opacity: .68;
	max-width: 34em;
}

.ag-gate-form {
	margin: 6px 0 0;
	width: 100%;
	max-width: 340px;
}

.ag-gate-note {
	margin: 0 0 10px;
	font-size: 12px;
	opacity: .62;
	line-height: 1.6;
}

.ag-gate-row {
	display: flex;
	gap: 8px;
}

.ag-gate-form input[type="password"] {
	flex: 1 1 auto;
	min-width: 0;
	background: none;
	border: 1px solid currentColor;
	border-radius: 0;
	color: inherit;
	font: inherit;
	font-size: 13px;
	padding: 9px 12px;
	opacity: .85;
}

.ag-gate-form input[type="password"]:focus {
	outline: none;
	opacity: 1;
}

.ag-gate-form button {
	background: none;
	border: 1px solid currentColor;
	border-radius: 0;
	color: inherit;
	font: inherit;
	font-size: 10px;
	letter-spacing: .22em;
	text-transform: uppercase;
	padding: 9px 18px;
	cursor: pointer;
}

.ag-gate-form button:hover {
	background: rgba(128, 128, 128, .14);
}

.ag-gate-bad {
	margin: 9px 0 0;
	font-size: 12px;
	color: #c8553d;
}

/* Den lilla varianten under ett galleri där bara vissa verk är låsta */
.ag-gate-form.is-compact {
	max-width: 420px;
	margin: 16px auto 0;
	text-align: center;
}

.ag-album-blank.is-locked {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 32px;
	font-size: 13px;
	line-height: 1.7;
	text-align: center;
	opacity: .7;
	max-width: 22em;
}

.ag-anchor {
	display: block;
	height: 0;
	scroll-margin-top: 80px;
}

/* Lösenordsrutan i bildtexten, för verk man går fram till i vyn */

.ag-caption-pass {
	display: flex;
	gap: 8px;
	margin: 12px 0 0;
	max-width: 320px;
}

.ag-caption-pass[hidden] {
	display: none;
}

.ag-caption-pass input[type="password"] {
	flex: 1 1 auto;
	min-width: 0;
	background: none;
	border: 1px solid rgba(232, 227, 218, .34);
	border-radius: 0;
	color: #e8e3da;
	font: inherit;
	font-size: 13px;
	padding: 8px 11px;
}

.ag-caption-pass input[type="password"]:focus {
	outline: none;
	border-color: rgba(232, 227, 218, .7);
}

.ag-caption-pass button {
	background: none;
	border: 1px solid rgba(232, 227, 218, .34);
	border-radius: 0;
	color: #e8e3da;
	font: inherit;
	font-size: 10px;
	letter-spacing: .22em;
	text-transform: uppercase;
	padding: 8px 16px;
	cursor: pointer;
	white-space: nowrap;
}

.ag-caption-pass button:hover {
	border-color: rgba(232, 227, 218, .7);
}

/* ---------- Länkknappen i bildtexten ---------- */

.ag-link {
	background: none;
	border: 1px solid rgba(232, 227, 218, .28);
	color: #e8e3da;
	padding: 9px 20px;
	font: inherit;
	font-size: 10px;
	letter-spacing: .24em;
	text-transform: uppercase;
	cursor: pointer;
	border-radius: 0;
	transition: border-color .2s ease, background .2s ease;
}

.ag-link:hover,
.ag-link:focus-visible {
	border-color: rgba(232, 227, 218, .6);
	background: rgba(232, 227, 218, .07);
}

.ag-link.is-done {
	background: rgba(232, 227, 218, .14);
	border-color: rgba(232, 227, 218, .65);
}

/* ---------- Draperiet ----------
   Ger vald mörk/ljus övergång när en dörr öppnas och mörkar mellan
   rum i visningsläget. Ligger över slöjan men under albumet. */

.ag-dim {
	position: absolute;
	inset: 0;
	z-index: 7;
	background: #000;
	opacity: 0;
	pointer-events: none;
	transition: opacity .5s ease;
}

.ag-dim.is-on {
	opacity: 1;
}

.ag-dim.is-bright {
	background: radial-gradient(ellipse at 50% 48%, #fff 0%, #fffdf7 45%, #f5f0e8 100%);
}

.ag-dim.is-bright.is-on {
	opacity: .58;
}

/* Långsammare väg tillbaka in i ljuset än ner i mörkret */
.ag-dim.is-slow {
	transition-duration: 1.3s;
}

@media (prefers-reduced-motion: reduce) {
	.ag-dim { transition-duration: .2s; }
}

/* 1.54.1: Tillbaka-knappen har samma form som LOGIN hade. */
.ag-home-button { text-decoration: none; line-height: 1.2; display: inline-block; }
.ag-home-button:visited { color: #fff; }

/* 1.55.0: öppen gästbok */
.ag-gb-trap { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.ag-guestbook-form input[name="name"] { width: 100%; box-sizing: border-box; }
.ag-guestbook-note { margin: 4px 0 0; font-size: 11px; opacity: .6; letter-spacing: .04em; }
.ag-guestbook-error.is-ok { color: #9fd8a6; }
.ag-guestbook-card { position: relative; }
.ag-guestbook .ag-guestbook-close { position: absolute !important; top: 12px !important; right: 12px !important; left: auto !important; margin: 0 !important; display: grid; place-items: center; padding: 0; }
.ag-guestbook .ag-guestbook-close { width: 34px !important; height: 34px !important; min-width: 34px; box-sizing: border-box; }
