/* Portale Esercenti — front-end form / account styles.
   Harmonised with the theme: same tokens, radii and accent as the rest of the
   site, with safe fallbacks so the forms still look right under another theme. */

.pe-auth,
.pe-account,
.pe-form,
.pe-cprompt,
.pe-cprompt-modal,
.pe-fav-form,
.pe-cal,
.pe-toast,
.pe-favtoast {
	--pe-accent: var(--pet-accent, #1f6feb);
	--pe-on-accent: var(--pet-on-accent, #fff);
	--pe-accent-text: var(--pet-accent-text, #1f5fbf);
	--pe-accent-dark: var(--pet-accent-dark, #1a5fcc);
	--pe-accent-fg: var(--pet-accent-fg, var(--pet-accent, #1f6feb));
	--pe-tint: var(--pet-accent-tint, #eef4fe);
	--pe-tint-2: var(--pet-accent-tint-2, #d6e4fb);
	--pe-border: var(--pet-border, #dde3ec);
	--pe-panel: var(--pet-panel, #fff);
	--pe-surface: var(--pet-surface, #eef2f8);
	--pe-surface-2: var(--pet-surface-2, #e2e8f1);
	--pe-ink: var(--pet-ink, #313846);
	--pe-ink-soft: var(--pet-ink-soft, #616774);
	--pe-radius: var(--pet-radius, 6px);
	--pe-card-radius: 16px;
	--pe-shadow: 0 10px 40px rgba(20, 22, 28, .09);

	font-family: var(--pet-font, "Helvetica Neue", Helvetica, Arial, sans-serif);
	color: var(--pe-ink);
}

/* =====================================================================
   Auth card (login / register / password)
   ===================================================================== */

.pe-auth {
	max-width: 460px;
	margin: 8px auto 40px;
}
.pe-auth--register,
.pe-auth--wide { max-width: 560px; }

.pe-auth__card {
	background: var(--pe-panel);
	border: 1px solid var(--pe-border);
	border-radius: var(--pe-card-radius);
	box-shadow: var(--pe-shadow);
	overflow: hidden;
}

.pe-auth__head {
	padding: 30px 32px 22px;
	text-align: center;
	background:
		linear-gradient(180deg, var(--pe-tint), transparent);
	border-bottom: 1px solid var(--pe-border);
}
.pe-auth__mark {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	margin-bottom: 12px;
	border-radius: 12px;
	background: var(--pe-accent);
	color: var(--pe-on-accent);
}
.pe-auth__title {
	margin: 0;
	font-size: 1.4rem;
	letter-spacing: -.01em;
}
.pe-auth__sub {
	margin: 6px 0 0;
	font-size: .92rem;
	color: var(--pe-ink-soft);
	line-height: 1.5;
}
.pe-auth__lead {
	margin: 0 0 18px;
	font-size: .92rem;
	line-height: 1.55;
	color: var(--pe-ink-soft);
}
.pe-auth__body { padding: 26px 32px 28px; }
.pe-auth__foot {
	padding: 16px 32px 22px;
	border-top: 1px solid var(--pe-border);
	background: var(--pe-surface);
	text-align: center;
	font-size: .88rem;
	color: var(--pe-ink-soft);
	line-height: 1.6;
}
.pe-auth__foot a { color: var(--pe-accent-text); font-weight: 600; }
.pe-auth__foot-sep { margin: 0 8px; opacity: .5; }

/* TradePress line below the card — always the same on every portal, so the
   shared-access layer is recognisable. Vendor colour is fixed, not the client
   accent. */
.pe-auth__vendor {
	margin: 14px 0 0;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 7px;
	font-size: .72rem;
	color: var(--pe-ink-soft);
}
.pe-auth__vendor a {
	padding: 3px 9px;
	border-radius: 999px;
	font-size: .7rem;
	font-weight: 700;
	letter-spacing: .02em;
	background: #ff8a65;
	color: #fff;
	text-decoration: none;
}
.pe-auth__vendor a:hover { background: #ff7a50; }
.pe-account--dashboard .pe-auth__vendor { margin-top: 26px; }

/* "You can reuse your TradePress account" hint on login / registration.
   Colori TradePress fissi (non l'accent del cliente): lo strato di accesso
   condiviso deve avere continuità su ogni portale. */
.pe-auth__hint {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	margin: 0 0 20px;
	padding: 14px 16px;
	background: #ff8a65;
	border: 1px solid #ff8a65;
	border-radius: var(--pe-radius);
	box-shadow: 0 4px 14px rgba(255, 138, 101, .35);
	font-size: .85rem;
	line-height: 1.3;
	color: rgba(255, 255, 255, .92);
}
.pe-auth__hint-ico {
	flex: none;
	display: block;
	margin-top: 1px;
	padding: 3px;
	border-radius: 50%;
	background: rgba(255, 255, 255, .22);
	color: #fff;
}
.pe-auth__hint strong { color: #fff; font-weight: 700; }
.pe-auth__hint a { color: #fff; font-weight: 700; text-decoration: underline; }

/* =====================================================================
   Dashboard
   ===================================================================== */

.pe-account--dashboard {
	max-width: 780px;
	margin: 8px auto 44px;
}

.pe-account__header {
	display: flex;
	align-items: center;
	gap: 20px;
	padding: 22px 24px;
	margin: 0 0 20px;
	background: var(--pe-panel);
	border: 1px solid var(--pe-border);
	border-radius: var(--pe-card-radius);
	box-shadow: var(--pe-shadow);
}
.pe-account__ident { flex: 1 1 auto; min-width: 0; }
.pe-account__name {
	margin: 0;
	font-size: 1.35rem;
	letter-spacing: -.01em;
	line-height: 1.2;
}
.pe-account__org {
	margin: 3px 0 0;
	color: var(--pe-ink-soft);
	font-size: .92rem;
}
.pe-account__header-actions { display: flex; align-items: center; gap: 8px; flex: none; }
.pe-account__logout { flex: none; }

/* Section cards */
.pe-card {
	background: var(--pe-panel);
	border: 1px solid var(--pe-border);
	border-radius: var(--pe-card-radius);
	padding: 22px 24px;
	margin: 0 0 16px;
}
.pe-card__title {
	margin: 0 0 16px;
	font-size: 1rem;
	font-weight: 700;
	letter-spacing: 0;
	text-transform: none;
	color: var(--pe-ink);
}

.pe-account__actions {
	display: flex;
	justify-content: flex-end;
	gap: 12px;
	padding: 6px 2px 0;
	margin-top: 4px;
}
.pe-account__actions--stacked {
	justify-content: flex-start;
	flex-wrap: wrap;
	align-items: center;
	margin-top: 12px;
}
.pe-account__actions--stacked form { margin: 0; }

.pe-card--privacy { margin-top: 48px; }
.pe-card--privacy .pe-field__hint { margin: 4px 0 0; }

/* Standalone "Richiedi assistenza" page: full-width single-select options
   (radio input visually hidden, its label styled as the selectable row). */
.pe-support__reasons {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin: 10px 0 20px;
}
.pe-reason { position: relative; }
.pe-reason input {
	position: absolute;
	opacity: 0;
	width: 1px;
	height: 1px;
	margin: 0;
}
.pe-reason label {
	display: block;
	width: 100%;
	padding: 13px 16px;
	background: var(--pe-surface);
	border: 1px solid var(--pe-border);
	border-radius: var(--pe-radius);
	font-weight: 600;
	font-size: .92rem;
	color: var(--pe-ink);
	cursor: pointer;
	transition: border-color .15s ease, background .15s ease, color .15s ease;
}
.pe-reason input:checked + label {
	border-color: var(--pe-accent);
	background: var(--pe-tint);
	color: var(--pe-accent-text);
}
.pe-reason input:focus-visible + label {
	outline: 2px solid var(--pe-accent);
	outline-offset: 2px;
}
.pe-field--support-msg { margin-top: 4px; }

/* =====================================================================
   Avatar
   ===================================================================== */

.pe-avatar {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: none;
	border-radius: 50%;
	overflow: hidden;
	background: var(--pe-surface-2);
	box-shadow: inset 0 0 0 1px rgba(20, 22, 28, .06);
}
.pe-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pe-avatar--placeholder {
	background: linear-gradient(140deg, var(--pe-accent), var(--pe-accent-dark));
	color: var(--pe-on-accent);
	font-weight: 700;
	line-height: 1;
}
.pe-avatar--placeholder > span { letter-spacing: .02em; }

.pe-avatar-field {
	display: flex;
	align-items: flex-start;
	gap: 20px;
}
.pe-avatar-field__preview { box-shadow: inset 0 0 0 1px rgba(20, 22, 28, .06), 0 4px 14px rgba(20, 22, 28, .1); }
.pe-avatar-field__controls { flex: 1 1 auto; min-width: 0; }

.pe-avatar-upload {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	flex-wrap: wrap;
	cursor: pointer;
}
.pe-avatar-upload input[type="file"] {
	position: absolute;
	width: 1px; height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
}
.pe-avatar-upload__btn {
	display: inline-block;
	padding: 9px 16px;
	border: 1px solid var(--pe-accent);
	border-radius: var(--pe-radius);
	background: var(--pe-tint);
	color: var(--pe-accent-text);
	font-weight: 700;
	font-size: .88rem;
	transition: background .15s ease;
}
.pe-avatar-upload:hover .pe-avatar-upload__btn { background: var(--pe-tint-2); }
.pe-avatar-upload input:focus-visible + .pe-avatar-upload__btn {
	outline: 0;
	box-shadow: 0 0 0 3px var(--pe-tint-2);
}
.pe-avatar-upload__name {
	font-size: .85rem;
	color: var(--pe-ink-soft);
	word-break: break-all;
}
.pe-avatar-field__remove {
	display: flex !important;
	align-items: center;
	gap: 8px;
	margin-top: 12px;
	font-size: .88rem;
}
.pe-avatar-field__remove input { width: 17px; height: 17px; accent-color: var(--pe-accent); }

/* =====================================================================
   Status pill
   ===================================================================== */

.pe-pill {
	display: inline-block;
	margin-top: 8px;
	padding: 3px 11px;
	border-radius: 999px;
	font-size: .76rem;
	font-weight: 700;
	letter-spacing: .01em;
}
.pe-pill--pending  { background: #fdf6e6; color: #8a6d1a; box-shadow: inset 0 0 0 1px #f0dfb3; }
.pe-pill--approved { background: #eaf7ee; color: #1a7a3d; box-shadow: inset 0 0 0 1px #bfe4cb; }
.pe-pill--rejected { background: #fdecec; color: #b5292b; box-shadow: inset 0 0 0 1px #f2c2c2; }

/* =====================================================================
   Fields
   ===================================================================== */

.pe-field { margin: 0 0 18px; }
.pe-field:last-child { margin-bottom: 0; }
.pe-field > label,
.pe-field__label {
	display: block;
	font-weight: 700;
	font-size: .9rem;
	color: var(--pe-ink);
	margin-bottom: 7px;
}
.pe-req { color: #d63638; font-weight: 700; }

.pe-field input[type="text"],
.pe-field input[type="email"],
.pe-field input[type="tel"],
.pe-field input[type="password"],
.pe-field input[type="url"],
.pe-field input[type="number"],
.pe-select-wrap select {
	width: 100%;
	height: 48px;
	padding: 0 15px;
	border: 1px solid var(--pe-border);
	border-radius: 10px;
	font: inherit;
	font-size: 1rem;
	color: var(--pe-ink);
	background: var(--pe-panel);
	transition: border-color .15s ease, box-shadow .15s ease;
	appearance: none;
	-webkit-appearance: none;
}
.pe-field input:focus,
.pe-select-wrap select:focus {
	outline: 0;
	border-color: var(--pe-accent);
	box-shadow: 0 0 0 3px var(--pe-tint-2);
}
.pe-field input::placeholder { color: var(--pe-ink-soft); }

/* Textarea — Safari has no useful default (small, monospace), so it needs
   the same explicit treatment as the text inputs above. */
.pe-field textarea {
	display: block;
	width: 100%;
	min-height: 110px;
	padding: 13px 15px;
	border: 1px solid var(--pe-border);
	border-radius: 10px;
	font: inherit;
	font-size: 1rem;
	line-height: 1.5;
	color: var(--pe-ink);
	background: var(--pe-panel);
	resize: vertical;
	appearance: none;
	-webkit-appearance: none;
	transition: border-color .15s ease, box-shadow .15s ease;
}
.pe-field textarea:focus {
	outline: 0;
	border-color: var(--pe-accent);
	box-shadow: 0 0 0 3px var(--pe-tint-2);
}
.pe-field textarea::placeholder { color: var(--pe-ink-soft); }

/* Side-by-side row */
.pe-field-row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 18px;
	margin: 0 0 18px;
}
.pe-field-row .pe-field { margin: 0; }

/* Password field + show/hide toggle */
.pe-input-wrap { position: relative; display: block; }
.pe-input-wrap input { padding-right: 46px; }
.pe-pass-toggle {
	position: absolute;
	top: 0;
	right: 0;
	width: 46px;
	height: 48px;
	border: 0;
	background-color: var(--pe-ink-soft);
	cursor: pointer;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7Z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E") center / 20px 20px no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7Z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E") center / 20px 20px no-repeat;
}
.pe-pass-toggle:hover { background-color: var(--pe-ink); }
.pe-pass-toggle.is-visible {
	-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9.88 9.88a3 3 0 1 0 4.24 4.24'/%3E%3Cpath d='M10.73 5.08A10.43 10.43 0 0 1 12 5c7 0 10 7 10 7a13.16 13.16 0 0 1-1.67 2.68'/%3E%3Cpath d='M6.61 6.61A13.5 13.5 0 0 0 2 12s3 7 10 7a9.7 9.7 0 0 0 5.39-1.61'/%3E%3Cline x1='2' x2='22' y1='2' y2='22'/%3E%3C/svg%3E");
	mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9.88 9.88a3 3 0 1 0 4.24 4.24'/%3E%3Cpath d='M10.73 5.08A10.43 10.43 0 0 1 12 5c7 0 10 7 10 7a13.16 13.16 0 0 1-1.67 2.68'/%3E%3Cpath d='M6.61 6.61A13.5 13.5 0 0 0 2 12s3 7 10 7a9.7 9.7 0 0 0 5.39-1.61'/%3E%3Cline x1='2' x2='22' y1='2' y2='22'/%3E%3C/svg%3E");
}

/* Select chevron */
.pe-select-wrap { position: relative; display: block; }
.pe-select-wrap select {
	padding-right: 42px;
	cursor: pointer;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='none' stroke='%23737a86' stroke-width='1.6' stroke-linecap='round' d='M1 1.5 6 6.5 11 1.5'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 16px center;
	background-size: 12px 8px;
}

/* Checkbox rows */
.pe-field--check > label {
	display: flex;
	gap: 10px;
	align-items: flex-start;
	font-weight: 400;
	margin-bottom: 0;
}
.pe-field--check input { margin: 2px 0 0; width: 18px; height: 18px; flex: none; accent-color: var(--pe-accent); }
.pe-field--check .pe-req { margin-left: 2px; }

.pe-field__hint {
	display: block;
	font-size: .85rem;
	line-height: 1.5;
	color: var(--pe-ink-soft);
	margin-top: 8px;
}
.pe-field__hint a { color: var(--pe-accent-text); }
.pe-field__hint--notice {
	margin-top: 18px;
	padding: 10px 14px;
	border-radius: var(--pe-radius, 10px);
	background: var(--pe-surface-2, #f3f4f6);
}
.pe-field__static {
	display: inline-block;
	padding: 8px 12px;
	border-radius: 8px;
	background: var(--pe-surface);
	font-weight: 700;
	font-size: .95rem;
}

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

.pe-field--submit {
	display: flex;
	gap: 12px;
	align-items: center;
	margin-top: 20px;
	margin-bottom: 0;
}
.pe-btn {
	display: inline-block;
	background: var(--pe-accent);
	color: var(--pe-on-accent);
	border: 1px solid var(--pe-accent);
	padding: 13px 26px;
	border-radius: var(--pe-radius);
	font: inherit;
	font-weight: 700;
	font-size: .95rem;
	letter-spacing: .01em;
	cursor: pointer;
	text-decoration: none;
	transition: background .15s ease, border-color .15s ease;
}
.pe-btn:hover { background: var(--pe-accent-dark); border-color: var(--pe-accent-dark); }
.pe-btn--block { display: block; width: 100%; text-align: center; }
.pe-auth__help-btn { margin-top: 12px; }
.pe-btn--sm { padding: 8px 15px; font-size: .85rem; }
.pe-btn--xs { padding: 5px 11px; font-size: .78rem; }
.pe-btn--ghost {
	background: transparent;
	color: var(--pe-accent-text);
	border-color: var(--pe-accent);
}
.pe-btn--ghost:hover { background: var(--pe-tint); color: var(--pe-accent-text); border-color: var(--pe-accent-dark); }
.pe-btn--ghost.pe-btn--danger { color: #b3261e; border-color: #e6b4b0; background: transparent; }
.pe-btn--ghost.pe-btn--danger:hover { background: #b3261e; border-color: #b3261e; color: #fff; }
.pe-link-btn {
	background: none;
	border: none;
	padding: 0;
	color: var(--pe-ink-soft);
	font: inherit;
	font-size: .85rem;
	text-decoration: underline;
	cursor: pointer;
}
.pe-link-btn:hover { color: var(--pe-accent-text); }

/* =====================================================================
   "Richiedi assistenza": before-you-ask wizard
   ===================================================================== */

.pe-support-wizard {
	margin-bottom: 24px;
	padding: 18px 20px;
	border: 1px solid var(--pe-border);
	border-radius: var(--pe-radius);
	background: var(--pe-surface, #f7f9fc);
}
.pe-support-wizard__title { margin: 0 0 14px; font-weight: 700; color: var(--pe-ink); }
.pe-support-wizard__q { margin: 0 0 12px; color: var(--pe-ink); }
.pe-support-wizard__choices { display: flex; flex-wrap: wrap; gap: 10px; }
.pe-support-wizard__step .pe-notice { margin-bottom: 12px; }
.pe-support-wizard__step .pe-auth__hint { margin-bottom: 12px; }
.pe-support-wizard__skip { margin: 14px 0 0; }

/* =====================================================================
   Messages — same visual language as the theme's .pet-notice
   ===================================================================== */

.pe-notice,
.pe-form__errors {
	padding: 14px 16px;
	margin: 0 0 18px;
	background: var(--pe-surface);
	border: 1px solid var(--pe-border);
	border-left: 3px solid var(--pe-accent);
	border-radius: var(--pe-radius);
	font-size: .92rem;
	line-height: 1.55;
	color: var(--pe-ink);
}
.pe-notice a,
.pe-form__errors a { color: var(--pe-accent-text); font-weight: 600; }

.pe-form__errors {
	border-left-color: #d63638;
	background: #fdecec;
	border-color: #f2c2c2;
}
.pe-form__errors ul { margin: 0; padding-left: 18px; }
.pe-form__errors li + li { margin-top: 4px; }
.pe-form__errors p { margin: 0; }

.pe-notice--warning,
.pe-notice--pending { border-left-color: #dba617; background: #fdf6e6; border-color: #f0dfb3; }
.pe-notice--success,
.pe-notice--approved { border-left-color: #1a9e4b; background: #eaf7ee; border-color: #bfe4cb; }
.pe-notice--error,
.pe-notice--rejected { border-left-color: #d63638; background: #fdecec; border-color: #f2c2c2; }
.pe-notice--action { border-left-color: var(--pe-accent); background: var(--pe-accent-tint, var(--pe-surface)); }
.pe-notice--action strong { display: block; margin-bottom: 3px; color: var(--pe-ink); }
.pe-notice--action p { margin: 0; }

/* Icon at the start of every message (the reserved area's flashes carry an
   inline SVG instead — .pe-dash__flash). Icon and colour follow the variant. */
.pe-notice:not(.pe-dash__flash):not(.pe-notice--action),
.pe-form__errors:not(.pe-dash__flash) {
	position: relative;
	padding-left: 44px;
}
.pe-notice:not(.pe-dash__flash):not(.pe-notice--action)::before,
.pe-form__errors:not(.pe-dash__flash)::before {
	content: "";
	position: absolute;
	left: 15px;
	top: 15px;
	width: 19px;
	height: 19px;
	background: var(--pe-notice-tint, var(--pe-accent-fg, var(--pe-accent)));
	-webkit-mask: var(--pe-notice-icon) center / contain no-repeat;
	mask: var(--pe-notice-icon) center / contain no-repeat;
}
.pe-notice { --pe-notice-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M12 16v-4'/%3E%3Cpath d='M12 8h.01'/%3E%3C/svg%3E"); }
.pe-notice--success,
.pe-notice--approved { --pe-notice-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='m8.5 12.5 2.5 2.5 5-5.5'/%3E%3C/svg%3E"); --pe-notice-tint: #1a9e4b; }
.pe-notice--warning,
.pe-notice--pending { --pe-notice-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M12 7v5l3 2'/%3E%3C/svg%3E"); --pe-notice-tint: #b7860b; }
.pe-notice--error,
.pe-notice--rejected,
.pe-form__errors { --pe-notice-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M12 8v4'/%3E%3Cpath d='M12 16h.01'/%3E%3C/svg%3E"); --pe-notice-tint: #d63638; }

/* =====================================================================
   Responsive
   ===================================================================== */

@media (max-width: 560px) {
	.pe-auth__head { padding: 26px 22px 20px; }
	.pe-auth__body { padding: 22px; }
	.pe-auth__foot { padding: 14px 22px 18px; }

	.pe-account__header { flex-wrap: wrap; gap: 14px; padding: 18px; }
	.pe-account__header-actions { order: 3; width: 100%; }
	.pe-account__header-actions a { flex: 1 1 auto; text-align: center; }
	.pe-card { padding: 18px; }

	.pe-field-row { grid-template-columns: 1fr; gap: 0; }
	.pe-field-row .pe-field { margin: 0 0 18px; }

	.pe-avatar-field { flex-direction: column; align-items: center; text-align: center; }
	.pe-avatar-upload { justify-content: center; }
	.pe-avatar-field__remove { justify-content: center; }

	.pe-account__actions { justify-content: stretch; }
	.pe-account__actions .pe-btn { flex: 1; text-align: center; }
}

/* =====================================================================
   "Il tuo cinema": one-question-per-screen profile
   ===================================================================== */

.pe-cinema__bar {
	height: 8px;
	margin: 12px 0 6px;
	border-radius: 99px;
	background: var(--pe-surface-2);
	overflow: hidden;
}
.pe-cinema__bar span {
	display: block;
	height: 100%;
	border-radius: inherit;
	background: var(--pe-accent);
	transition: width .35s ease;
}

.pe-cinema {
	max-width: 640px;
	margin: 8px auto 44px;
}
.pe-cinema__back { margin: 0 0 12px; font-size: .9rem; }
.pe-cinema__back a { color: var(--pe-accent-text); text-decoration: none; }
.pe-cinema__back a:hover { text-decoration: underline; }

.pe-cinema__form,
.pe-cinema__summary {
	padding: 26px 28px;
	box-shadow: var(--pe-shadow);
	scroll-margin-top: 100px; /* clear the theme's sticky header */
}
.pe-cinema__title { margin: 0; font-size: 1.2rem; letter-spacing: -.01em; }
.pe-cinema__meta {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	margin: 0 0 24px;
	font-size: .8rem;
	font-weight: 700;
	color: var(--pe-ink-soft);
}

/* Without JS every step is listed; with JS one at a time. */
.pe-cinema__step + .pe-cinema__step {
	margin-top: 28px;
	padding-top: 24px;
	border-top: 1px solid var(--pe-border);
}
.pe-cinema.is-js .pe-cinema__step + .pe-cinema__step { margin-top: 0; padding-top: 0; border-top: 0; }
.pe-cinema.is-js .pe-cinema__step:not([hidden]) { animation: pe-cinema-in .25s ease; }
@keyframes pe-cinema-in {
	from { opacity: 0; transform: translateX(14px); }
	to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
	.pe-cinema.is-js .pe-cinema__step:not([hidden]) { animation: none; }
	.pe-cinema__bar span { transition: none; }
}

.pe-cinema__section {
	display: inline-block;
	margin: 0 0 10px;
	padding: 3px 10px;
	border-radius: 99px;
	background: var(--pe-tint);
	color: var(--pe-accent-text);
	font-size: .72rem;
	font-weight: 700;
	letter-spacing: .05em;
	text-transform: uppercase;
}
.pe-cinema__q {
	margin: 0 0 6px;
	font-size: 1.35rem;
	line-height: 1.3;
	letter-spacing: -.01em;
}
.pe-cinema__q:focus,
.pe-cinema__q:focus-visible { outline: none; box-shadow: none; }
.pe-cinema__hint { margin: 0 0 4px; font-size: .88rem; color: var(--pe-ink-soft); }

/* Answer tiles (radio / checkbox visually hidden, the label is the tile). */
.pe-cinema__opts {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 10px;
	margin: 18px 0 4px;
}
.pe-cinema__opt { position: relative; display: flex; margin: 0; cursor: pointer; }
.pe-cinema__opt input {
	position: absolute;
	width: 1px;
	height: 1px;
	opacity: 0;
	pointer-events: none;
}
.pe-cinema__opt span {
	position: relative;
	display: flex;
	flex: 1;
	align-items: center;
	min-height: 54px;
	padding: 12px 16px 12px 46px;
	border: 1.5px solid var(--pe-border);
	border-radius: 12px;
	background: var(--pe-panel);
	font-size: .95rem;
	font-weight: 600;
	line-height: 1.3;
	transition: border-color .15s ease, background .15s ease, transform .1s ease;
}
.pe-cinema__opt span::before {
	content: "";
	position: absolute;
	top: 50%;
	left: 16px;
	width: 18px;
	height: 18px;
	margin-top: -9px;
	border: 1.5px solid var(--pe-border);
	border-radius: 50%;
	background: var(--pe-panel);
	transition: background .15s ease, border-color .15s ease;
}
.pe-cinema__opt input[type="checkbox"] + span::before { border-radius: 5px; }
.pe-cinema__opt:hover span { border-color: var(--pe-accent); }
.pe-cinema__opt:active span { transform: scale(.98); }
.pe-cinema__opt input:checked + span {
	border-color: var(--pe-accent);
	background: var(--pe-tint);
	color: var(--pe-accent-text);
}
.pe-cinema__opt input:checked + span::before {
	border-color: var(--pe-accent);
	background: var(--pe-accent);
	box-shadow: inset 0 0 0 3px var(--pe-panel);
}
.pe-cinema__opt input:focus-visible + span { outline: 2px solid var(--pe-accent); outline-offset: 2px; }

/* "Quanto spesso": three segmented choices per row. */
.pe-cinema__freq { display: grid; gap: 16px; margin: 18px 0 4px; }
.pe-cinema__freq-row { margin: 0; padding: 0; border: 0; min-width: 0; }
.pe-cinema__freq-row legend { margin: 0 0 8px; padding: 0; font-size: .95rem; font-weight: 600; }
.pe-cinema__seg { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.pe-cinema__opt--seg span { justify-content: center; min-height: 44px; padding: 10px 12px; text-align: center; }
.pe-cinema__opt--seg span::before { display: none; }

/* Number of screens. */
.pe-cinema__counter { display: flex; align-items: center; gap: 14px; margin: 18px 0 6px; }
.pe-cinema__cbtn {
	width: 52px;
	height: 52px;
	border: 1.5px solid var(--pe-accent);
	border-radius: 50%;
	background: var(--pe-panel);
	color: var(--pe-accent-text);
	font: inherit;
	font-size: 1.6rem;
	line-height: 1;
	cursor: pointer;
}
.pe-cinema__cbtn:hover { background: var(--pe-tint); }
.pe-cinema__counter input {
	width: 96px;
	padding: 8px;
	border: 1.5px solid var(--pe-border);
	border-radius: 12px;
	background: var(--pe-panel);
	color: var(--pe-ink);
	font: inherit;
	font-size: 2rem;
	font-weight: 700;
	text-align: center;
	-moz-appearance: textfield;
	appearance: textfield;
}
.pe-cinema__counter input::-webkit-inner-spin-button,
.pe-cinema__counter input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }

.pe-cinema__text { margin: 18px 0 4px; }
.pe-cinema__text input { font-size: 1.05rem; }
.pe-cinema__extra { margin: 16px 0 0; }
.pe-cinema__extra label { display: block; font-size: .9rem; font-weight: 600; }
.pe-cinema__extra label input { margin-top: 6px; }
label.pe-cinema__extra { display: flex; gap: 10px; align-items: center; font-weight: 600; cursor: pointer; }

.pe-cinema__error { margin: 12px 0 0; font-size: .88rem; color: #b3261e; }

.pe-cinema__nav { display: none; }
.pe-cinema.is-js .pe-cinema__nav {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-top: 26px;
}
.pe-cinema__nav-right { display: flex; align-items: center; gap: 18px; margin-left: auto; }
.pe-cinema__form.is-busy [data-cinema-next] { opacity: .6; pointer-events: none; }
.pe-cinema__nojs { margin-top: 28px; }
.pe-cinema.is-js .pe-cinema__nojs { display: none; }
.pe-cinema__later { margin: 22px 0 0; font-size: .85rem; color: var(--pe-ink-soft); text-align: center; }
.pe-cinema__later a { color: inherit; }

/* Summary */
.pe-cinema__done strong { display: block; margin-bottom: 2px; }
.pe-cinema__list { margin: 18px 0 8px; }
.pe-cinema__row {
	display: grid;
	grid-template-columns: 170px minmax(0, 1fr) auto;
	gap: 12px;
	align-items: baseline;
	padding: 12px 0;
	border-top: 1px solid var(--pe-border);
}
.pe-cinema__row dt { font-size: .85rem; font-weight: 700; color: var(--pe-ink-soft); }
.pe-cinema__row dd { margin: 0; line-height: 1.45; }
.pe-cinema__empty { color: var(--pe-ink-soft); font-style: italic; }
.pe-cinema__edit { font-size: .85rem; color: var(--pe-accent-text); white-space: nowrap; }

@media (max-width: 560px) {
	.pe-cinema__form,
	.pe-cinema__summary { padding: 20px 18px; }
	.pe-cinema__q { font-size: 1.2rem; }
	.pe-cinema__opts { grid-template-columns: 1fr; }
	.pe-cinema__row { grid-template-columns: minmax(0, 1fr) auto; }
	.pe-cinema__row dt { grid-column: 1 / -1; }
}

.pe-cinema__summary .pe-cinema-card__pct,
.pe-cinema__form .pe-cinema-card__pct { margin: 0; font-size: .8rem; font-weight: 700; color: var(--pe-ink-soft); }

/* =====================================================================
   Reserved area dashboard: hero, section nav, tiles, cards
   ===================================================================== */

.pe-icon { display: block; flex: none; }

.pe-dash {
	max-width: 1120px;
	margin: 4px auto 48px;
	--pe-good: #1a7a3d;
	--pe-good-bg: #e7f6ec;
	--pe-warn: #9a6400;
	--pe-warn-bg: #fdf3dc;
	--pe-bad: #b5292b;
	--pe-bad-bg: #fdecec;
}
.pe-dash .pe-card { margin: 0; }

/* Hero */
.pe-dash__hero {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 20px 28px;
	margin: 0 0 22px;
	padding: 28px 30px;
	border: 1px solid var(--pe-border);
	border-radius: 20px;
	background:
		radial-gradient(90% 160% at 100% 0%, color-mix(in srgb, var(--pe-accent) 16%, transparent) 0%, transparent 60%),
		linear-gradient(135deg, var(--pe-tint) 0%, var(--pe-panel) 65%);
	box-shadow: var(--pe-shadow);
}
.pe-dash__who { display: flex; align-items: center; gap: 20px; min-width: 0; }
.pe-dash__avatar {
	position: relative;
	display: inline-flex;
	flex: none;
	line-height: 0;
	border-radius: 50%;
	box-shadow: 0 0 0 4px var(--pe-panel), 0 8px 22px rgba(20, 22, 28, .14);
}
.pe-dash__avatar-edit {
	position: absolute;
	right: -2px;
	bottom: -2px;
	display: grid;
	place-items: center;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	background: var(--pe-accent);
	color: var(--pe-on-accent);
	box-shadow: 0 0 0 3px var(--pe-panel);
	transition: transform .15s ease;
}
.pe-dash__avatar:hover .pe-dash__avatar-edit { transform: scale(1.1); }
.pe-dash__ident { min-width: 0; }
.pe-dash__hello {
	margin: 0;
	font-size: .72rem;
	font-weight: 700;
	letter-spacing: .09em;
	text-transform: uppercase;
	color: var(--pe-accent-text);
}
.pe-dash__name {
	margin: 2px 0 0;
	font-size: clamp(1.4rem, 2.4vw, 1.85rem);
	line-height: 1.15;
	letter-spacing: -.02em;
}
.pe-dash__org { margin: 4px 0 10px; font-size: .95rem; color: var(--pe-ink-soft); }
.pe-dash .pe-pill { display: inline-flex; align-items: center; gap: 6px; }

.pe-dash__quick { display: flex; flex-wrap: wrap; gap: 10px; }
.pe-dash__qbtn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 10px 16px;
	border: 1px solid var(--pe-border);
	border-radius: 12px;
	background: var(--pe-panel);
	color: var(--pe-ink);
	font-size: .9rem;
	font-weight: 600;
	text-decoration: none;
	transition: border-color .15s ease, color .15s ease, transform .15s ease, background .15s ease;
}
.pe-dash__qbtn:hover { border-color: var(--pe-accent); color: var(--pe-accent-text); transform: translateY(-1px); }
.pe-dash__qbtn--primary { background: var(--pe-accent); border-color: var(--pe-accent); color: var(--pe-on-accent); }
.pe-dash__qbtn--primary:hover { background: var(--pe-accent-dark); border-color: var(--pe-accent-dark); color: var(--pe-on-accent); }

.pe-dash__flash { display: flex; align-items: flex-start; gap: 10px; margin: 0 0 18px; }
.pe-dash__flash .pe-icon { margin-top: 1px; }

/* Layout: section nav + content */
.pe-dash__layout {
	display: grid;
	grid-template-columns: 232px minmax(0, 1fr);
	gap: 28px;
	align-items: start;
}
.pe-dash__nav { position: sticky; top: var(--pe-sticky-top, 110px); z-index: 5; }
.pe-dash__nav ul {
	margin: 0;
	padding: 8px;
	list-style: none;
	border: 1px solid var(--pe-border);
	border-radius: 16px;
	background: var(--pe-panel);
}
.pe-dash__nav li { margin: 0; }
.pe-dash__nav li > a {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 11px 14px;
	border-radius: 10px;
	color: var(--pe-ink-soft);
	font-size: .92rem;
	font-weight: 600;
	text-decoration: none;
	transition: background .15s ease, color .15s ease;
}
.pe-dash__nav li > a:hover { background: var(--pe-surface); color: var(--pe-ink); }
.pe-dash__nav li > a.is-active { background: var(--pe-tint); color: var(--pe-accent-text); }
.pe-dash__nav li > a.is-active .pe-icon { color: var(--pe-accent-fg); }
.pe-dash__help {
	margin-top: 14px;
	padding: 16px 18px;
	border-radius: 16px;
	background: var(--pe-surface);
	font-size: .85rem;
	line-height: 1.5;
	color: var(--pe-ink-soft);
}
.pe-dash__help .pe-icon { color: var(--pe-accent-fg); }
.pe-dash__help p { margin: 8px 0 10px; }
.pe-dash__help strong { display: block; color: var(--pe-ink); }
.pe-dash__help a { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: var(--pe-accent-text); text-decoration: none; }
.pe-dash__help a:hover { text-decoration: underline; }

.pe-dash { --pe-dash-gap: 28px; }
.pe-dash__main { display: flex; flex-direction: column; gap: var(--pe-dash-gap); min-width: 0; }
.pe-dash__main .pe-form--profile { display: flex; flex-direction: column; gap: var(--pe-dash-gap); }
.pe-dash__section,
.pe-dash #pe-email-change,
.pe-dash #pe-sez-panoramica-download { scroll-margin-top: calc(var(--pe-sticky-top, 110px) + 14px); }
.pe-dash__section > .pe-card + .pe-card { margin-top: var(--pe-dash-gap); }
.pe-dash .pe-card--privacy { margin-top: 0; }

/* Missing-data banner */
.pe-dash__alert {
	display: flex;
	align-items: center;
	gap: 14px;
	margin: 0 0 var(--pe-dash-gap);
	padding: 16px 18px;
	border: 1px solid #f1d9a2;
	border-radius: 16px;
	background: #fff8e8;
	color: #5f4608;
}
.pe-dash__alert > div { flex: 1; min-width: 0; }
.pe-dash__alert p { margin: 2px 0 0; font-size: .9rem; }
.pe-dash__alert-icon {
	display: grid;
	place-items: center;
	flex: none;
	width: 40px;
	height: 40px;
	border-radius: 12px;
	background: var(--pe-warn-bg);
	color: var(--pe-warn);
}

/* KPI tiles */
.pe-dash__tiles {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
	gap: 14px;
	margin: 0 0 var(--pe-dash-gap);
}
.pe-tile {
	display: flex;
	flex-direction: column;
	gap: 2px;
	padding: 18px;
	border: 1px solid var(--pe-border);
	border-radius: 16px;
	background: var(--pe-panel);
	color: var(--pe-ink);
	text-decoration: none;
	transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
a.pe-tile:hover { transform: translateY(-2px); border-color: var(--pe-tint-2); box-shadow: var(--pe-shadow); color: var(--pe-ink); }
.pe-tile__icon {
	display: grid;
	place-items: center;
	width: 40px;
	height: 40px;
	margin-bottom: 10px;
	border-radius: 12px;
	background: var(--pe-tint);
	color: var(--pe-accent-fg);
}
.pe-tile__label { font-size: .74rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--pe-ink-soft); }
.pe-tile__value { font-size: 1.9rem; font-weight: 800; line-height: 1.15; letter-spacing: -.02em; }
.pe-tile__value small { font-size: 1rem; font-weight: 700; color: var(--pe-ink-soft); }
.pe-tile__value--text { font-size: 1.25rem; line-height: 1.3; }
.pe-tile__sub { font-size: .82rem; line-height: 1.4; color: var(--pe-ink-soft); }
.pe-tile__bar { height: 6px; margin-top: 8px; border-radius: 99px; background: var(--pe-surface-2); overflow: hidden; }
.pe-tile__bar span { display: block; height: 100%; border-radius: inherit; background: var(--pe-accent); }
.pe-tile--approved .pe-tile__icon { background: var(--pe-good-bg); color: var(--pe-good); }
.pe-tile--pending .pe-tile__icon { background: var(--pe-warn-bg); color: var(--pe-warn); }
.pe-tile--rejected .pe-tile__icon { background: var(--pe-bad-bg); color: var(--pe-bad); }

/* Dashboard cards */
.pe-dcard {
	--pe-dcard-py: 22px;
	--pe-dcard-px: 24px;
	padding: var(--pe-dcard-py) var(--pe-dcard-px);
	overflow: hidden;
}
/* Heading band in the site's accent colour, so each block reads at a glance.
   Text and icon use the theme's "on accent" colour (white on dark accents,
   near-black on light ones). */
.pe-dcard__head {
	display: flex;
	align-items: center;
	gap: 14px;
	margin: calc(-1 * var(--pe-dcard-py)) calc(-1 * var(--pe-dcard-px)) 20px;
	padding: 16px var(--pe-dcard-px);
	background: var(--pe-accent);
	color: var(--pe-on-accent);
}
.pe-dcard__icon {
	display: grid;
	place-items: center;
	flex: none;
	width: 42px;
	height: 42px;
	border-radius: 12px;
	background: color-mix(in srgb, var(--pe-on-accent) 16%, transparent);
	color: var(--pe-on-accent);
}
.pe-dcard__titles { flex: 1; min-width: 0; }
.pe-dcard__title { margin: 0; font-size: 1.08rem; font-weight: 700; letter-spacing: -.01em; line-height: 1.3; color: inherit; }
.pe-dcard__sub { margin: 3px 0 0; font-size: .88rem; line-height: 1.45; color: color-mix(in srgb, var(--pe-on-accent) 82%, transparent); }
.pe-dcard__link {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	align-self: center;
	font-size: .86rem;
	font-weight: 700;
	color: var(--pe-on-accent);
	text-decoration: none;
	white-space: nowrap;
}
.pe-dcard__link:hover { color: var(--pe-on-accent); text-decoration: underline; }
.pe-dcard__link:hover .pe-icon { transform: translateX(2px); }
.pe-dcard__link .pe-icon { transition: transform .15s ease; }
.pe-dcard__foot {
	display: flex;
	justify-content: flex-end;
	gap: 12px;
	margin-top: 8px;
	padding-top: 16px;
	border-top: 1px solid var(--pe-border);
}
.pe-dcard__current { margin: 0 0 14px; font-size: .9rem; color: var(--pe-ink-soft); }
.pe-dcard__current strong { color: var(--pe-ink); word-break: break-all; }
.pe-dcard .pe-avatar-field { margin-bottom: 22px; padding-bottom: 20px; border-bottom: 1px solid var(--pe-border); }
.pe-dcard .pe-avatar-field .pe-field__label { display: block; margin-bottom: 8px; }
.pe-dcard .pe-avatar-upload__btn { display: inline-flex; align-items: center; gap: 8px; }
.pe-btn .pe-icon { display: inline-block; vertical-align: -2px; margin-right: 6px; }

/* Latest downloads */
.pe-dl-list { margin: 0; padding: 0; list-style: none; }
.pe-dl-list li { margin: 0; }
.pe-dl-list li + li { border-top: 1px solid var(--pe-border); }
.pe-dl-list__item {
	display: flex;
	align-items: center;
	gap: 14px;
	margin: 0 -8px;
	padding: 12px 8px;
	border-radius: 10px;
	color: var(--pe-ink);
	text-decoration: none;
	transition: background .15s ease;
}
.pe-dl-list__item:hover { background: var(--pe-surface); color: var(--pe-ink); }
.pe-dl-list__icon {
	display: grid;
	place-items: center;
	flex: none;
	width: 38px;
	height: 38px;
	border-radius: 10px;
	background: var(--pe-surface);
	color: var(--pe-accent-text);
}
.pe-dl-list__item:hover .pe-dl-list__icon { background: var(--pe-panel); }
.pe-dl-list__text { display: flex; flex: 1; flex-direction: column; min-width: 0; }
.pe-dl-list__text strong,
.pe-dl-list__text span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.pe-dl-list__text strong { font-size: .94rem; }
.pe-dl-list__text span { font-size: .82rem; color: var(--pe-ink-soft); }
.pe-dl-list__date { font-size: .8rem; font-weight: 600; color: var(--pe-ink-soft); white-space: nowrap; }

.pe-dash__empty { padding: 10px 10px 4px; text-align: center; }
.pe-dash__empty-icon {
	display: inline-grid;
	place-items: center;
	width: 56px;
	height: 56px;
	border-radius: 50%;
	background: var(--pe-tint);
	color: var(--pe-accent-fg);
}
.pe-dash__empty p { max-width: 44ch; margin: 12px auto 16px; color: var(--pe-ink-soft); line-height: 1.5; }

/* Upcoming releases */
.pe-upcoming {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 16px;
	margin: 0;
	padding: 0;
	list-style: none;
}
.pe-upcoming li { margin: 0; }
.pe-upcoming a { display: flex; flex-direction: column; gap: 3px; color: var(--pe-ink); text-decoration: none; }
.pe-upcoming__poster {
	display: grid;
	place-items: center;
	aspect-ratio: 2 / 3;
	margin-bottom: 8px;
	border-radius: 12px;
	overflow: hidden;
	background: var(--pe-surface);
	color: var(--pe-ink-soft);
	box-shadow: 0 6px 18px rgba(20, 22, 28, .12);
	transition: transform .2s ease, box-shadow .2s ease;
}
.pe-upcoming__poster img { display: block; width: 100%; height: 100%; object-fit: cover; }
.pe-upcoming a:hover .pe-upcoming__poster { transform: translateY(-3px); box-shadow: 0 12px 26px rgba(20, 22, 28, .16); }
.pe-upcoming strong { font-size: .9rem; line-height: 1.3; }
.pe-upcoming strong + span { font-size: .8rem; font-weight: 700; color: var(--pe-accent-text); }

/* Toggle switches */
.pe-switches { display: flex; flex-direction: column; }
.pe-switch { position: relative; display: flex; align-items: flex-start; gap: 14px; padding: 14px 0; cursor: pointer; }
.pe-switch + .pe-switch { border-top: 1px solid var(--pe-border); }
.pe-switch:first-child { padding-top: 0; }
.pe-switch input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.pe-switch__ui {
	position: relative;
	flex: none;
	width: 44px;
	height: 26px;
	margin-top: 1px;
	border-radius: 99px;
	background: var(--pe-surface-2);
	transition: background .2s ease;
}
.pe-switch__ui::after {
	content: "";
	position: absolute;
	top: 3px;
	left: 3px;
	width: 20px;
	height: 20px;
	border-radius: 50%;
	background: #fff;
	box-shadow: 0 1px 3px rgba(0, 0, 0, .25);
	transition: transform .2s ease;
}
.pe-switch input:checked + .pe-switch__ui { background: var(--pe-accent); }
.pe-switch input:checked + .pe-switch__ui::after { transform: translateX(18px); }
.pe-switch input:focus-visible + .pe-switch__ui { outline: 2px solid var(--pe-accent); outline-offset: 2px; }
.pe-switch__text { display: flex; flex-direction: column; gap: 2px; }
.pe-switch__text strong { font-size: .95rem; }
.pe-switch__text small { font-size: .85rem; line-height: 1.45; color: var(--pe-ink-soft); }

/* "Il tuo cinema" card */
.pe-cinema-card__body { display: flex; align-items: center; gap: 20px; }
.pe-cinema-card__ring {
	--pct: 0;
	display: grid;
	place-items: center;
	flex: none;
	width: 78px;
	height: 78px;
	border-radius: 50%;
	background: conic-gradient(var(--pe-accent) calc(var(--pct) * 1%), var(--pe-surface-2) 0);
}
.pe-cinema-card__ring span {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 1px;
	line-height: 1;
	width: 62px;
	height: 62px;
	border-radius: 50%;
	background: var(--pe-panel);
	font-size: 1.15rem;
	font-weight: 800;
}
.pe-cinema-card__ring small { margin-top: 3px; font-size: .7rem; }
.pe-cinema-card.is-complete .pe-cinema-card__ring { background: var(--pe-good); }
.pe-cinema-card.is-complete .pe-cinema-card__ring span { color: var(--pe-good); }
.pe-cinema-card__main { flex: 1; min-width: 0; }
.pe-cinema-card__text { margin: 0 0 4px; line-height: 1.5; }
.pe-cinema-card__pct { margin: 0; font-size: .82rem; font-weight: 600; color: var(--pe-ink-soft); }
.pe-cinema-card .pe-btn { flex: none; }

@media (prefers-reduced-motion: reduce) {
	.pe-dash *,
	.pe-dash *::after { transition: none !important; }
}

/* Tablet / phone: the section nav becomes a sticky, scrollable pill bar. */
@media (max-width: 900px) {
	.pe-dash { --pe-dash-gap: 22px; }
	.pe-dash__layout { grid-template-columns: minmax(0, 1fr); gap: 14px; }
	.pe-dash__nav {
		top: var(--pe-sticky-top, 70px);
		z-index: 20;
		margin: 0 -18px;
		padding: 8px 18px;
		background: color-mix(in srgb, var(--pet-bg, #f7f9fc) 90%, transparent);
		-webkit-backdrop-filter: blur(10px);
		backdrop-filter: blur(10px);
	}
	.pe-dash__nav ul {
		display: flex;
		gap: 8px;
		padding: 0;
		overflow-x: auto;
		border: 0;
		border-radius: 0;
		background: none;
		scrollbar-width: none;
		-webkit-overflow-scrolling: touch;
	}
	.pe-dash__nav ul::-webkit-scrollbar { display: none; }
	.pe-dash__nav li { flex: none; }
	.pe-dash__nav li > a {
		gap: 8px;
		padding: 8px 14px;
		border: 1px solid var(--pe-border);
		border-radius: 99px;
		background: var(--pe-panel);
		font-size: .85rem;
		white-space: nowrap;
	}
	.pe-dash__nav li > a.is-active { border-color: var(--pe-accent); background: var(--pe-accent); color: var(--pe-on-accent); }
	.pe-dash__nav li > a.is-active .pe-icon { color: var(--pe-on-accent); }
	.pe-dash__nav .pe-icon { width: 16px; height: 16px; }
	.pe-dash__help { display: none; }
	.pe-dash__section,
	.pe-dash #pe-email-change,
	.pe-dash #pe-sez-panoramica-download { scroll-margin-top: calc(var(--pe-sticky-top, 70px) + 66px); }
	.pe-upcoming { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
	.pe-dash__hero { gap: 18px; padding: 20px 18px; border-radius: 16px; }
	.pe-dash__who { gap: 16px; }
	.pe-dash__avatar .pe-avatar { width: 64px !important; height: 64px !important; font-size: 1.3rem; }
	.pe-dash__quick { width: 100%; gap: 8px; }
	.pe-dash__qbtn { flex: 1 1 0; justify-content: center; gap: 6px; padding: 10px 8px; font-size: .82rem; }
	.pe-dash__tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
	.pe-tile { padding: 14px; border-radius: 14px; }
	.pe-tile__icon { width: 34px; height: 34px; margin-bottom: 8px; border-radius: 10px; }
	.pe-tile__icon .pe-icon { width: 18px; height: 18px; }
	.pe-tile__value { font-size: 1.5rem; }
	.pe-tile__value--text { font-size: 1.05rem; }
	.pe-tile__sub { font-size: .76rem; }
	.pe-dcard { --pe-dcard-py: 18px; --pe-dcard-px: 16px; }
	.pe-dcard__head { gap: 12px; padding-top: 14px; padding-bottom: 14px; }
	.pe-dcard__icon { width: 38px; height: 38px; border-radius: 10px; }
	.pe-dcard__head { flex-wrap: wrap; row-gap: 8px; }
	.pe-dcard__titles { flex-basis: calc(100% - 50px); }
	.pe-dcard__link { margin-left: 50px; align-self: flex-start; }
	.pe-dcard__foot .pe-btn { width: 100%; text-align: center; }
	.pe-dash__alert { flex-wrap: wrap; }
	.pe-dash__alert .pe-btn { width: 100%; text-align: center; }
	.pe-cinema-card__body { flex-wrap: wrap; gap: 16px; }
	.pe-cinema-card__body .pe-btn { width: 100%; text-align: center; }
	.pe-dl-list__date { display: none; }
	.pe-upcoming { gap: 12px; }
}

/* =====================================================================
   Invite to fill "Il tuo cinema": one-off window + closable reminder card
   ===================================================================== */

.pe-cprompt__icon {
	display: grid;
	place-items: center;
	flex: none;
	width: 44px;
	height: 44px;
	border-radius: 12px;
	background: var(--pe-tint);
	color: var(--pe-accent-fg);
}
.pe-cprompt__icon--lg { width: 60px; height: 60px; margin: 0 auto 14px; border-radius: 16px; }
.pe-cprompt__x {
	position: absolute;
	top: 8px;
	right: 8px;
	display: grid;
	place-items: center;
	width: 32px;
	height: 32px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: var(--pe-ink-soft);
	font-size: 1.4rem;
	line-height: 1;
	cursor: pointer;
}
.pe-cprompt__x:hover { background: var(--pe-surface); color: var(--pe-ink); }

/* Reminder card, bottom-left (the theme's "back to top" sits bottom-right). */
.pe-cprompt {
	position: fixed;
	left: clamp(16px, 3vw, 32px);
	bottom: clamp(16px, 3vw, 32px);
	z-index: 90;
	display: flex;
	align-items: center;
	gap: 14px;
	max-width: 440px;
	padding: 16px 44px 16px 16px;
	border: 1px solid var(--pe-border);
	border-radius: 16px;
	background: var(--pe-panel);
	box-shadow: 0 16px 40px rgba(20, 22, 28, .18);
	font-family: var(--pet-font, "Helvetica Neue", Helvetica, Arial, sans-serif);
	color: var(--pe-ink);
	animation: pe-cprompt-in .35s ease both;
}
.pe-cprompt.is-leaving { animation: pe-cprompt-out .25s ease both; }
@keyframes pe-cprompt-in { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes pe-cprompt-out { to { opacity: 0; transform: translateY(16px); } }
.pe-cprompt__text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pe-cprompt__text strong { font-size: .95rem; }
.pe-cprompt__text span { font-size: .84rem; line-height: 1.4; color: var(--pe-ink-soft); }
.pe-cprompt .pe-btn { flex: none; }

/* One-off window */
.pe-cprompt-modal {
	position: fixed;
	inset: 0;
	z-index: 1000;
	display: grid;
	place-items: center;
	padding: 20px;
	font-family: var(--pet-font, "Helvetica Neue", Helvetica, Arial, sans-serif);
	color: var(--pe-ink);
}
.pe-cprompt-modal[hidden] { display: none; }
.pe-cprompt-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(15, 18, 26, .5);
	-webkit-backdrop-filter: blur(3px);
	backdrop-filter: blur(3px);
	animation: pe-fade .25s ease both;
}
.pe-cprompt-modal__card {
	position: relative;
	width: 100%;
	max-width: 440px;
	padding: 34px 30px 26px;
	border-radius: 20px;
	background: var(--pe-panel);
	box-shadow: 0 24px 60px rgba(15, 18, 26, .3);
	text-align: center;
	animation: pe-cprompt-in .3s ease both;
}
@keyframes pe-fade { from { opacity: 0; } to { opacity: 1; } }
.pe-cprompt-modal__card h2 { margin: 0 0 8px; font-size: 1.35rem; letter-spacing: -.01em; }
.pe-cprompt-modal__card p { margin: 0 0 10px; line-height: 1.55; color: var(--pe-ink-soft); }
.pe-cprompt__small { font-size: .85rem; }
.pe-cprompt-modal__actions { display: flex; flex-direction: column; gap: 10px; margin-top: 20px; }
.pe-cprompt-modal__actions .pe-btn { width: 100%; text-align: center; }

@media (max-width: 560px) {
	.pe-cprompt { right: 72px; left: 12px; bottom: 12px; gap: 10px; padding: 12px 40px 12px 12px; }
	.pe-cprompt__icon { width: 38px; height: 38px; }
	.pe-cprompt__text span { display: none; }
	.pe-cprompt-modal__card { padding: 30px 22px 22px; }
}
@media (prefers-reduced-motion: reduce) {
	.pe-cprompt,
	.pe-cprompt.is-leaving,
	.pe-cprompt-modal__card,
	.pe-cprompt-modal__backdrop { animation: none; }
}

/* "Il tuo cinema" still to fill: full-width banner at the top of the
   reserved area, in the accent colour. */
.pe-dash__cinema-top { margin: 0 0 var(--pe-dash-gap); }
.pe-cinema-hero {
	position: relative;
	display: flex;
	align-items: center;
	gap: 24px;
	padding: 26px 28px;
	border-radius: 20px;
	overflow: hidden;
	/* A lighter sheen over the brand colour (never darker: on yellow a dark
	   shade reads as mustard). */
	background:
		radial-gradient(110% 140% at 0% 0%, rgba(255, 255, 255, .22) 0%, transparent 60%),
		linear-gradient(135deg, var(--pe-accent) 0%, color-mix(in srgb, var(--pe-accent) 88%, #fff) 100%);
	color: var(--pe-on-accent);
	box-shadow: 0 14px 36px color-mix(in srgb, var(--pe-accent) 32%, transparent);
}
.pe-cinema-hero__art {
	position: absolute;
	right: -18px;
	bottom: -34px;
	width: 170px;
	height: 170px;
	opacity: .12;
	transform: rotate(-10deg);
	pointer-events: none;
}
.pe-cinema-hero__ring {
	--pct: 0;
	position: relative;
	display: grid;
	place-items: center;
	flex: none;
	width: 92px;
	height: 92px;
	border-radius: 50%;
	background: conic-gradient(var(--pe-on-accent) calc(var(--pct) * 1%), color-mix(in srgb, var(--pe-on-accent) 22%, transparent) 0);
}
.pe-cinema-hero__ring span {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 1px;
	width: 74px;
	height: 74px;
	border-radius: 50%;
	background: var(--pe-accent);
	font-size: 1.4rem;
	font-weight: 800;
	line-height: 1;
}
.pe-cinema-hero__ring small { margin-top: 4px; font-size: .75rem; }
.pe-cinema-hero__main { position: relative; flex: 1; min-width: 0; }
.pe-cinema-hero__eyebrow {
	margin: 0 0 4px;
	font-size: .72rem;
	font-weight: 700;
	letter-spacing: .08em;
	text-transform: uppercase;
	opacity: .85;
}
.pe-cinema-hero__title { margin: 0 0 6px; font-size: clamp(1.25rem, 2vw, 1.55rem); line-height: 1.2; letter-spacing: -.015em; color: inherit; }
.pe-cinema-hero__text { margin: 0 0 8px; max-width: 58ch; font-size: .95rem; line-height: 1.5; opacity: .92; }
.pe-cinema-hero__meta { margin: 0; font-size: .82rem; font-weight: 600; opacity: .8; }
.pe-cinema-hero__cta {
	position: relative;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	flex: none;
	padding: 14px 22px;
	border-radius: 12px;
	background: var(--pe-on-accent);
	color: var(--pe-accent);
	font-size: 1rem;
	font-weight: 800;
	text-decoration: none;
	box-shadow: 0 6px 18px rgba(0, 0, 0, .18);
	transition: transform .15s ease, box-shadow .15s ease;
}
.pe-cinema-hero__cta:hover { color: var(--pe-accent); transform: translateY(-2px); box-shadow: 0 10px 24px rgba(0, 0, 0, .22); }
.pe-cinema-hero__cta .pe-icon { transition: transform .15s ease; }
.pe-cinema-hero__cta:hover .pe-icon { transform: translateX(3px); }

/* Badge on the "Il tuo cinema" nav item while the profile is incomplete. */
.pe-dash__badge {
	margin-left: auto;
	padding: 2px 8px;
	border-radius: 99px;
	background: var(--pe-accent);
	color: var(--pe-on-accent);
	font-size: .7rem;
	font-style: normal;
	font-weight: 800;
	letter-spacing: .02em;
}
.pe-dash__nav li > a.is-active .pe-dash__badge { background: var(--pe-on-accent); color: var(--pe-accent); }

@media (max-width: 900px) {
	.pe-dash__badge { margin-left: 2px; }
	.pe-dash__nav li > a:not(.is-active) .pe-dash__badge { background: var(--pe-accent); color: var(--pe-on-accent); }
}
@media (max-width: 640px) {
	.pe-cinema-hero { flex-wrap: wrap; gap: 14px; padding: 22px 20px; border-radius: 16px; }
	.pe-cinema-hero__ring { width: 60px; height: 60px; }
	.pe-cinema-hero__ring span { width: 48px; height: 48px; font-size: 1rem; }
	.pe-cinema-hero__ring small { margin-top: 2px; font-size: .62rem; }
	.pe-cinema-hero__main { flex: 1 1 100%; }
	.pe-cinema-hero__cta { width: 100%; justify-content: center; }
	.pe-cinema-hero__art { width: 120px; height: 120px; top: -20px; bottom: auto; }
}
@media (prefers-reduced-motion: reduce) {
	.pe-cinema-hero__cta,
	.pe-cinema-hero__cta .pe-icon { transition: none; }
}

/* "Cinema o circuito" character counter */
.pe-field__count { white-space: nowrap; font-variant-numeric: tabular-nums; }
.pe-field__count.is-over { color: #b3261e; font-weight: 700; }

/* =====================================================================
   Preferiti (star) + "Aggiungi al calendario"
   ===================================================================== */

.pe-fav-form { display: inline-flex; margin: 0; }
.pe-fav {
	--pe-star: #f2b100;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 10px 16px;
	border: 1px solid var(--pe-border);
	border-radius: 99px;
	background: var(--pe-panel);
	color: var(--pe-ink);
	font: inherit;
	font-size: .9rem;
	font-weight: 700;
	line-height: 1.2;
	cursor: pointer;
	transition: border-color .15s ease, background .15s ease, transform .15s ease;
}
.pe-fav:hover { border-color: var(--pe-star); }
.pe-fav:disabled { opacity: .7; cursor: progress; }
.pe-fav .pe-icon { flex: none; color: var(--pe-ink-soft); transition: transform .2s ease; }
.pe-fav.is-on { border-color: color-mix(in srgb, var(--pe-star) 55%, var(--pe-border)); background: color-mix(in srgb, var(--pe-star) 12%, var(--pe-panel)); }
.pe-fav.is-on .pe-icon { color: #d99a00; fill: var(--pe-star); }
.pe-fav.is-on .pe-icon { animation: pe-star-pop .35s ease; }
@keyframes pe-star-pop {
	0% { transform: scale(.7); }
	60% { transform: scale(1.25); }
	100% { transform: scale(1); }
}

/* Icon-only star (catalog cards, lists). */
.pe-fav-form--icon .pe-fav {
	width: 36px;
	height: 36px;
	padding: 0;
	justify-content: center;
	border-color: transparent;
	background: rgba(255, 255, 255, .94);
	box-shadow: 0 4px 14px rgba(20, 22, 28, .18);
}
.pe-fav-form--icon .pe-fav:hover { transform: scale(1.08); }
.pe-fav-form--icon .pe-fav.is-on { background: #fff; }
.pe-fav-form--icon .pe-fav__label {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

.pe-cal { position: relative; display: inline-block; }
.pe-cal__btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 10px 16px;
	border: 1px solid var(--pe-border);
	border-radius: 99px;
	background: var(--pe-panel);
	color: var(--pe-ink);
	font-size: .9rem;
	font-weight: 700;
	line-height: 1.2;
	list-style: none;
	cursor: pointer;
	user-select: none;
	white-space: nowrap;
	transition: border-color .15s ease;
}
.pe-cal__btn::-webkit-details-marker { display: none; }
.pe-cal__btn::marker { content: ""; }
.pe-cal__btn:hover,
.pe-cal[open] .pe-cal__btn { border-color: var(--pe-accent); }
.pe-cal__btn .pe-icon { color: var(--pe-accent-fg); }
.pe-cal__menu {
	position: absolute;
	z-index: 30;
	top: calc(100% + 6px);
	left: 0;
	min-width: 210px;
	padding: 6px;
	border: 1px solid var(--pe-border);
	border-radius: 12px;
	background: var(--pe-panel);
	box-shadow: 0 14px 34px rgba(20, 22, 28, .16);
}
.pe-cal__menu a {
	display: block;
	padding: 9px 12px;
	border-radius: 8px;
	color: var(--pe-ink);
	font-size: .88rem;
	font-weight: 600;
	text-decoration: none;
	white-space: nowrap;
}
.pe-cal__menu a:hover { background: var(--pe-tint); color: var(--pe-accent-text); }
.pe-cal--compact .pe-cal__btn { padding: 6px 12px; font-size: .8rem; gap: 6px; }
.pe-cal--compact .pe-cal__btn .pe-icon { width: 15px; height: 15px; }
.pe-favlist .pe-cal__menu { left: auto; right: 0; }
@media (min-width: 561px) { .pe-favlist .pe-cal__menu { left: 0; right: auto; } }

/* "I miei preferiti" list in the reserved area. */
.pe-favlist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.pe-favlist__item {
	display: grid;
	grid-template-columns: 56px minmax(0, 1fr) auto;
	gap: 14px;
	align-items: center;
	padding: 10px;
	border: 1px solid var(--pe-border);
	border-radius: 14px;
	background: var(--pe-panel);
	transition: opacity .25s ease, transform .25s ease;
}
.pe-favlist__item.is-leaving { opacity: 0; transform: translateX(12px); }
.pe-favlist__poster {
	display: grid;
	place-items: center;
	width: 56px;
	aspect-ratio: 2 / 3;
	overflow: hidden;
	border-radius: 8px;
	background: var(--pe-surface-2);
	color: var(--pe-ink-soft);
}
.pe-favlist__poster img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pe-favlist__body { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.pe-favlist__title {
	font-weight: 700;
	color: var(--pe-ink);
	text-decoration: none;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.pe-favlist__title:hover { color: var(--pe-accent-text); }
.pe-favlist__meta { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: .82rem; color: var(--pe-ink-soft); }
.pe-favlist__new {
	padding: 1px 8px;
	border-radius: 99px;
	background: var(--pe-accent);
	color: var(--pe-on-accent);
	font-size: .7rem;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: .06em;
}
.pe-favlist__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 4px; }
.pe-favlist__actions .pe-btn .pe-icon { margin-right: 6px; vertical-align: -3px; }
.pe-favlist .pe-fav-form--icon .pe-fav { box-shadow: none; border-color: var(--pe-border); }
@media (max-width: 560px) {
	.pe-favlist__item { grid-template-columns: 48px minmax(0, 1fr) auto; gap: 10px; align-items: start; }
	.pe-favlist__poster { width: 48px; }
}

/* Transient message (e.g. demo mode, connection error). */
.pe-toast {
	position: fixed;
	left: 50%;
	bottom: 24px;
	z-index: 100000;
	max-width: min(92vw, 440px);
	padding: 12px 18px;
	border-radius: 12px;
	background: #1f232b;
	color: #fff;
	font-size: .9rem;
	line-height: 1.4;
	box-shadow: 0 14px 34px rgba(20, 22, 28, .3);
	opacity: 0;
	pointer-events: none;
	transform: translate(-50%, 12px);
	transition: opacity .2s ease, transform .2s ease;
}
.pe-toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

/* In-page notice: new materials on starred films (same corner and look as
   the "Il tuo cinema" reminder; the two never show together). */
.pe-favtoast {
	position: fixed;
	left: clamp(16px, 3vw, 32px);
	bottom: clamp(16px, 3vw, 32px);
	z-index: 90;
	display: flex;
	align-items: flex-start;
	gap: 14px;
	max-width: 400px;
	padding: 16px 44px 16px 16px;
	border: 1px solid var(--pe-border);
	border-radius: 16px;
	background: var(--pe-panel);
	box-shadow: 0 16px 40px rgba(20, 22, 28, .18);
	font-family: var(--pet-font, "Helvetica Neue", Helvetica, Arial, sans-serif);
	color: var(--pe-ink);
	opacity: 0;
	transform: translateY(16px);
	transition: opacity .3s ease, transform .3s ease;
}
.pe-favtoast[hidden] { display: none; }
.pe-favtoast.is-visible { opacity: 1; transform: none; }
/* Film poster(s): one, or up to three fanned out, with a small star. */
.pe-favtoast__posters { position: relative; flex: none; display: flex; padding: 2px 6px 6px 0; }
.pe-favtoast__poster {
	display: grid;
	place-items: center;
	width: 44px;
	aspect-ratio: 2 / 3;
	overflow: hidden;
	border-radius: 6px;
	border: 2px solid var(--pe-panel);
	background: var(--pe-surface-2);
	color: var(--pe-ink-soft);
	box-shadow: 0 4px 10px rgba(20, 22, 28, .18);
}
.pe-favtoast__poster img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pe-favtoast__posters--2 .pe-favtoast__poster,
.pe-favtoast__posters--3 .pe-favtoast__poster { width: 36px; }
.pe-favtoast__poster + .pe-favtoast__poster { margin-left: -14px; }
.pe-favtoast__posters--2 .pe-favtoast__poster:first-child,
.pe-favtoast__posters--3 .pe-favtoast__poster:first-child { transform: rotate(-6deg); }
.pe-favtoast__posters--3 .pe-favtoast__poster:nth-child(3) { transform: rotate(6deg); }
.pe-favtoast__star {
	position: absolute;
	right: 0;
	bottom: 0;
	display: grid;
	place-items: center;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	background: #fff;
	color: #d99a00;
	box-shadow: 0 2px 6px rgba(20, 22, 28, .25);
}
.pe-favtoast__star .pe-icon { fill: #f2b100; }
.pe-favtoast__text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.pe-favtoast__text strong { font-size: .95rem; }
.pe-favtoast__text span { font-size: .84rem; line-height: 1.4; color: var(--pe-ink-soft); }
.pe-favtoast__cta {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin-top: 6px;
	color: var(--pe-accent-text);
	font-size: .88rem;
	font-weight: 700;
	text-decoration: none;
}
.pe-favtoast__cta:hover { text-decoration: underline; }
.pe-favtoast__x {
	position: absolute;
	top: 8px;
	right: 8px;
	width: 30px;
	height: 30px;
	border: 0;
	border-radius: 8px;
	background: none;
	color: var(--pe-ink-soft);
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
}
.pe-favtoast__x:hover { background: var(--pe-surface); color: var(--pe-ink); }
@media (max-width: 560px) {
	.pe-favtoast { left: 12px; right: 12px; bottom: 12px; max-width: none; }
}
@media (prefers-reduced-motion: reduce) {
	.pe-favtoast { transition: none; }
}

/* Area riservata: menu delle sezioni in tema scuro (solo desktop), così
   menu e contenuto si distinguono a colpo d'occhio. Su tablet/telefono
   resta la barra a pillole chiara. */
@media (min-width: 901px) {
	.pe-dash__nav ul {
		border-color: #1d2128;
		background: #1d2128;
		box-shadow: 0 8px 24px rgba(20, 22, 26, .16);
	}
	.pe-dash__nav li { position: relative; }
	.pe-dash__nav li + li::before {
		content: "";
		position: absolute;
		left: 14px;
		right: 14px;
		top: 0;
		height: 1px;
		background: rgba(255, 255, 255, .09);
	}
	.pe-dash__nav li:has(> a.is-active)::before,
	.pe-dash__nav li:has(> a.is-active) + li::before { display: none; }
	.pe-dash__nav li > a { color: #c3c8d1; }
	.pe-dash__nav li > a .pe-icon { color: #8b919c; }
	.pe-dash__nav li > a:hover { background: rgba(255, 255, 255, .07); color: #fff; }
	.pe-dash__nav li > a:hover .pe-icon { color: #fff; }
	.pe-dash__nav li > a.is-active { background: var(--pe-accent); color: var(--pe-on-accent); }
	.pe-dash__nav li > a.is-active .pe-icon { color: var(--pe-on-accent); }
}

/* Scheda film: "Preferiti" e "Calendario" su una riga, uniti
   in un solo blocco arrotondato con una riga che li divide. */
@media all {
	/* `body` davanti: il CSS del tema (caricato dopo) imposta già gap e allineamento. */
	body .pet-film__quick {
		display: flex;
		flex-wrap: nowrap;
		align-items: stretch;
		gap: 0;
		border: 1px solid var(--pet-border, #dde3ec);
		border-radius: 14px;
		background: var(--pet-panel, #fff);
	}
	.pet-film__quick > .pe-fav-form,
	.pet-film__quick > .pe-cal { display: flex; flex: 1 1 0; min-width: 0; }
	.pet-film__quick > .pe-cal { border-left: 1px solid var(--pe-border); }
	.pet-film__quick .pe-fav,
	.pet-film__quick .pe-cal__btn {
		flex: 1 1 auto;
		justify-content: flex-start;
		gap: 10px;
		width: 100%;
		min-height: 48px;
		box-sizing: border-box;
		padding: 10px 14px;
		border: 0;
		background: transparent;
		font-size: .84rem;
		text-align: center;
		white-space: normal;
	}
	.pet-film__quick .pe-fav .pe-icon,
	.pet-film__quick .pe-cal__btn .pe-icon { flex: none; width: 24px; height: 24px; }
	/* Icona a sinistra, testo centrato nello spazio che resta. */
	.pet-film__quick .pe-fav > span,
	.pet-film__quick .pe-cal__btn > span { flex: 1 1 auto; text-align: center; }
	.pet-film__quick > .pe-fav-form .pe-fav { border-radius: 13px 0 0 13px; }
	.pet-film__quick > .pe-cal .pe-cal__btn { border-radius: 0 13px 13px 0; }
	.pet-film__quick .pe-fav:hover,
	.pet-film__quick .pe-cal__btn:hover,
	.pet-film__quick .pe-cal[open] .pe-cal__btn { background: var(--pe-surface); }
	.pet-film__quick .pe-fav.is-on { background: color-mix(in srgb, var(--pe-star) 12%, var(--pe-panel)); }
	.pet-film__quick .pe-cal { position: relative; }
	.pet-film__quick .pe-cal__menu { left: auto; right: 0; }
}
@media (min-width: 641px) {
	body .pet-film__quick { display: inline-flex; width: 100%; max-width: 460px; }
}
/* Visitatore non loggato: c'è solo "Calendario" — niente divisorio, larghezza naturale. */
body .pet-film__quick:has(> :only-child) { width: auto; max-width: 100%; }
.pet-film__quick > .pe-cal:first-child { border-left: 0; }
.pet-film__quick > .pe-cal:first-child .pe-cal__btn { border-radius: 13px; padding-left: 16px; padding-right: 20px; }
.pet-film__quick > .pe-cal:first-child .pe-cal__btn > span { flex: 0 1 auto; }

/* =====================================================================
   Area riservata su tablet/telefono: menu sezioni a tendina scura,
   scheda in alto compatta, Panoramica più corta.
   ===================================================================== */
.pe-dash__navtoggle { display: none; }
@media (max-width: 900px) {
	.pe-dash__nav { background: transparent; -webkit-backdrop-filter: none; backdrop-filter: none; }
	.pe-dash__navtoggle {
		display: flex;
		align-items: center;
		gap: 10px;
		width: 100%;
		min-height: 50px;
		padding: 0 16px;
		border: 0;
		border-radius: 12px;
		background: #1d2128;
		box-shadow: 0 8px 22px rgba(20, 22, 26, .18);
		color: #fff;
		font: inherit;
		font-size: .95rem;
		font-weight: 600;
		text-align: left;
		cursor: pointer;
	}
	.pe-dash__navtoggle .pe-icon { flex: none; width: 18px; height: 18px; color: #fff; }
	.pe-dash__navtoggle .pe-dash__badge { background: var(--pe-accent); color: var(--pe-on-accent); }
	.pe-dash__navcaret {
		margin-left: auto;
		width: 0;
		height: 0;
		border-left: 5px solid transparent;
		border-right: 5px solid transparent;
		border-top: 6px solid currentColor;
		opacity: .8;
		transition: transform .15s ease;
	}
	.pe-dash__nav.is-open .pe-dash__navcaret { transform: rotate(180deg); }
	.pe-dash__nav ul {
		display: none;
		position: absolute;
		left: 18px;
		right: 18px;
		top: calc(100% - 2px);
		flex-direction: column;
		gap: 0;
		padding: 6px;
		overflow: visible;
		border-radius: 12px;
		background: #1d2128;
		box-shadow: 0 16px 40px rgba(20, 22, 26, .3);
	}
	.pe-dash__nav.is-open ul { display: flex; }
	.pe-dash__nav li { position: relative; }
	.pe-dash__nav li + li::before {
		content: "";
		position: absolute;
		left: 14px;
		right: 14px;
		top: 0;
		height: 1px;
		background: rgba(255, 255, 255, .09);
	}
	.pe-dash__nav li > a {
		gap: 12px;
		padding: 13px 14px;
		border: 0;
		border-radius: 8px;
		background: transparent;
		color: #c3c8d1;
		font-size: .92rem;
	}
	.pe-dash__nav li > a .pe-icon { width: 18px; height: 18px; color: #8b919c; }
	.pe-dash__nav li > a.is-active { background: var(--pe-accent); color: var(--pe-on-accent); }
	.pe-dash__nav li > a.is-active .pe-icon { color: var(--pe-on-accent); }
	.pe-dash__nav li > a .pe-dash__badge { margin-left: auto; }
}

@media (max-width: 560px) {
	.pe-dash { --pe-dash-gap: 16px; }
	/* scheda in alto */
	.pe-dash__hero { gap: 14px; padding: 16px; }
	.pe-dash__who { gap: 12px; }
	.pe-dash__avatar .pe-avatar { width: 52px !important; height: 52px !important; font-size: 1.1rem; }
	.pe-dash__name { font-size: 1.25rem; }
	/* Catalogo / Assistenza / Esci in un unico blocco */
	.pe-dash__quick {
		gap: 0;
		overflow: hidden;
		border: 1px solid var(--pe-border);
		border-radius: 12px;
		background: var(--pe-panel);
	}
	.pe-dash__qbtn { min-height: 44px; border: 0; border-radius: 0; transform: none !important; }
	.pe-dash__qbtn + .pe-dash__qbtn { border-left: 1px solid var(--pe-border); }
	.pe-dash__qbtn:hover { color: var(--pe-accent-text); background: var(--pe-surface); }
	.pe-dash__qbtn--primary:hover { background: var(--pe-accent-dark); color: var(--pe-on-accent); }
	/* Panoramica più corta */
	.pe-dash__tiles { gap: 8px; }
	.pe-tile { padding: 12px; }
	.pe-tile__icon { width: 30px; height: 30px; margin-bottom: 6px; }
	.pe-dash__alert { margin-bottom: var(--pe-dash-gap); padding: 14px; }
	.pe-dcard { --pe-dcard-py: 14px; --pe-dcard-px: 14px; }
}
