/* Portrait sheet: full screen on phones, centred panel on larger screens. */
.mmf-gp__portrait {
	display: none;
	background: #fff;
}

.mmf-gp__portrait:focus {
	outline: none;
}

.mmf-gp:not(.is-enhanced) .mmf-gp__portrait:target,
.mmf-gp__portrait.is-active {
	display: block;
}

.mmf-gp:not(.is-enhanced) .mmf-gp__portrait:target {
	position: fixed;
	inset: 0;
	z-index: 100000;
	overflow-y: auto;
}

.mmf-gp__dialog {
	box-sizing: border-box;
	width: 100%;
	max-width: none;
	height: 100%;
	max-height: none;
	margin: 0;
	padding: 0;
	border: 0;
	background: #fff;
	color: var(--gp-navy);
	overscroll-behavior: contain;
}

.mmf-gp__dialog::backdrop {
	background: rgba(30, 34, 68, 0.6);
}

.mmf-gp__bar {
	position: sticky;
	top: 0;
	z-index: 2;
	display: flex;
	justify-content: flex-end;
	padding: max(0.5rem, env(safe-area-inset-top)) 0.75rem 0.25rem;
	background: linear-gradient(#fff 65%, rgba(255, 255, 255, 0));
}

.mmf-gp__close {
	display: grid;
	place-items: center;
	width: 48px;
	height: 48px;
	border-radius: 50%;
	background: var(--gp-soft);
	color: var(--gp-navy);
	font-size: 2rem;
	line-height: 1;
	text-decoration: none;
}

.mmf-gp__body {
	max-width: 34rem;
	margin: 0 auto;
	padding: 0 1.25rem 1.5rem;
	text-align: center;
}

.mmf-gp__photo {
	width: min(200px, 44vw);
	height: auto;
	aspect-ratio: 1;
	border: 4px solid #fff;
	border-radius: 50%;
	box-shadow: 0 0 0 4px var(--gp-orange), 0 12px 30px rgba(180, 40, 126, 0.22);
	object-fit: cover;
}

#portraits .mmf-gp__ai {
	margin: 0.6rem 0 0;
	font-size: 0.7rem;
	color: rgba(30, 34, 68, 0.6);
}

.mmf-gp__portrait-name {
	margin: 0.5rem 0 0.2rem;
	font-size: 1.55rem;
	font-weight: 900;
	line-height: 1.1;
}

#portraits .mmf-gp__meta {
	margin: 0;
	font-size: 0.92rem;
	color: rgba(30, 34, 68, 0.75);
}

.mmf-gp__quote {
	margin: 1rem 0 0;
	padding: 1rem;
	border-radius: 20px;
	background: linear-gradient(135deg, var(--gp-orange), var(--gp-magenta));
	color: #fff;
}

.mmf-gp__langs {
	display: flex;
	gap: 0.25rem;
	justify-content: space-between;
	margin-top: 0.9rem;
	padding-top: 0.75rem;
	border-top: 1px solid rgba(255, 255, 255, 0.3);
	overflow-x: auto;
	scrollbar-width: none;
}

.mmf-gp__lang {
	flex: 0 0 auto;
	min-width: 40px;
	min-height: 44px;
	padding: 0 0.35rem;
	border: 0;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.18);
	color: #fff;
	font-size: 0.8rem;
	font-weight: 800;
	cursor: pointer;
}

.mmf-gp__lang[aria-pressed="true"] {
	background: #fff;
	color: var(--gp-magenta);
}

.mmf-gp__text {
	margin: 0;
	padding: 0;
	border: 0;
	font-size: 1.25rem;
	font-weight: 700;
	line-height: 1.4;
}

#portraits .mmf-gp__text p {
	margin: 0;
	font-size: inherit;
	line-height: inherit;
}

.mmf-gp__text[dir="rtl"] {
	font-size: 1.4rem;
	line-height: 1.7;
}

.mmf-gp__story {
	margin-top: 1.5rem;
	text-align: left;
	font-size: 1rem;
	line-height: 1.6;
}

#portraits .mmf-gp__story p {
	margin: 0 0 0.85rem;
	font-size: 1rem;
	line-height: 1.6;
}

#portraits .mmf-gp__story h4 {
	margin: 1.25rem 0 0.4rem;
	color: var(--gp-magenta);
	font-size: 1.05rem;
	line-height: 1.3;
}

.mmf-gp__born {
	font-weight: 700;
}

.mmf-gp__actions {
	position: sticky;
	bottom: 0;
	display: flex;
	gap: 0.6rem;
	justify-content: center;
	padding: 0.75rem 1.25rem max(0.75rem, env(safe-area-inset-bottom));
	background: rgba(255, 255, 255, 0.96);
	box-shadow: 0 -8px 24px rgba(30, 34, 68, 0.08);
}

.mmf-gp__donate {
	display: grid;
	flex: 1;
	max-width: 22rem;
	min-height: 52px;
	place-items: center;
	border-radius: 999px;
	background: linear-gradient(135deg, var(--gp-orange), var(--gp-magenta));
	color: #fff;
	font-size: 1.05rem;
	font-weight: 900;
	text-decoration: none;
}

@media (min-width: 768px) {
	.mmf-gp__dialog {
		width: min(600px, calc(100% - 2rem));
		height: auto;
		max-height: min(92vh, 960px);
		margin: auto;
		border-radius: 24px;
	}
}
