/* Photoworld — editor fotolibri */
@font-face { font-family: 'PWF Script'; src: url('../fonts/GreatVibes-Regular.ttf') format('truetype'); font-display: swap; }
@font-face { font-family: 'PWF Serif'; src: url('../fonts/PlayfairDisplay-MediumItalic.ttf') format('truetype'); font-style: italic; font-display: swap; }
@font-face { font-family: 'PWF Sans'; src: url('../fonts/BricolageGrotesque-Bold.ttf') format('truetype'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'PWF UI'; src: url('../fonts/Figtree-SemiBold.ttf') format('truetype'); font-weight: 600; font-display: swap; }

html, body.pwf-body { margin: 0; padding: 0; background: #F3EFEA; }
.pwf-app { --ink: #1E1B18; --muted: #4A433D; --line: #E7E2DC; --soft: #F3EFEA; --accent: #e6007e; --accent-soft: #FBEDE6; --ok: #1F6B35;
	font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; color: var(--ink); font-size: 16px; line-height: 1.45; min-height: 100vh; }
.pwf-app *, .pwf-app *::before, .pwf-app *::after { box-sizing: border-box; }
.pwf-app h1, .pwf-app h2, .pwf-app h3 { font-family: 'PWF Sans', system-ui, sans-serif; letter-spacing: -0.01em; margin: 0 0 8px; color: var(--ink); }
.pwf-app h1 { font-size: clamp(26px, 3.4vw, 38px); line-height: 1.1; }
.pwf-app h2 { font-size: 18px; }
.pwf-app h3 { font-size: 15px; margin-top: 18px; }
:where(.pwf-app) button { font: inherit; color: inherit; }
.pwf-app [hidden] { display: none !important; }
.pwf-app :focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }

/* Barra in alto */
.pwf-top { position: sticky; top: 0; z-index: 30; background: #fff; border-bottom: 1px solid var(--line); display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 10px clamp(12px, 2.5vw, 24px); }
.pwf-logo { font-family: 'PWF Sans', sans-serif; font-weight: 700; font-size: 22px; color: var(--ink); text-decoration: none; letter-spacing: -0.02em; }
.pwf-logo span { color: #D85A30; }
.pwf-steps { display: flex; gap: 6px; flex-wrap: wrap; }
.pwf-steps button { border: 0; border-radius: 999px; min-height: 40px; padding: 0 14px; background: var(--soft); font-weight: 600; font-size: 14px; cursor: pointer; }
.pwf-steps button.is-on { background: var(--ink); color: #fff; }
.pwf-hist { display: flex; gap: 4px; }
.pwf-hist button { width: 40px; height: 40px; border-radius: 999px; border: 0; background: var(--soft); font-size: 20px; cursor: pointer; }
.pwf-hist button:disabled { color: #B5AAA0; cursor: not-allowed; }
.pwf-grow { flex-grow: 1; }
.pwf-status { font-size: 14px; color: var(--muted); font-weight: 600; }
.pwf-status.is-ok { color: var(--ok); }
.pwf-status.is-err { color: #A12A1A; }
.pwf-price { font-size: 15px; color: var(--muted); }
.pwf-price strong { color: var(--ink); font-size: 17px; }
.pwf-banner { background: var(--ink); color: #fff; padding: 10px clamp(12px, 2.5vw, 24px); font-weight: 600; font-size: 15px; }

/* Pulsanti */
.pwf-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 46px; padding: 0 20px; border-radius: 999px; border: 0; font-weight: 700; font-size: 15px; cursor: pointer; text-decoration: none; position: relative; }
.pwf-btn-accent { background: var(--accent); color: #fff !important; }
.pwf-btn-accent:disabled { background: var(--line); color: #6B635B !important; cursor: not-allowed; }
.pwf-btn-dark { background: var(--ink); color: #fff; }
.pwf-btn-line { background: #fff; border: 1.5px solid var(--ink); color: var(--ink); }
.pwf-wide { width: 100%; margin-top: 10px; }
.pwf-file input { position: absolute; inset: 0; opacity: 0; cursor: pointer; font-size: 0; }
.pwf-round { width: 46px; height: 46px; border-radius: 999px; border: 0; background: #fff; font-size: 24px; line-height: 1; cursor: pointer; }
.pwf-round:disabled { color: #C9C0B6; cursor: not-allowed; }

/* Struttura editor */
.pwf-main { display: grid; grid-template-columns: 280px minmax(0, 1fr) 300px; grid-template-areas: 'tray stage panel'; gap: 16px; padding: 16px clamp(10px, 2vw, 22px) 40px; align-items: start; }
.pwf-tray { grid-area: tray; }
.pwf-stage { grid-area: stage; min-width: 0; }
.pwf-panel { grid-area: panel; }
.pwf-tray, .pwf-panel { background: #fff; border-radius: 20px; padding: 16px; position: sticky; top: 80px; max-height: calc(100vh - 96px); overflow-y: auto; }
@media (max-width: 1000px) {
	.pwf-main { grid-template-columns: minmax(0, 1fr); grid-template-areas: 'stage' 'tray' 'panel'; }
	.pwf-tray, .pwf-panel { position: static; max-height: none; }
	.pwf-photos { max-height: 300px !important; }
}

/* Foto */
.pwf-trayhead { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.pwf-trayhead span { font-size: 14px; color: var(--muted); }
.pwf-trayact { display: flex; gap: 8px; margin: 10px 0 6px; }
.pwf-trayact > * { flex: 1 1 0; padding: 0 8px; font-size: 14px; white-space: nowrap; }
.pwf-check-line { display: flex; gap: 8px; align-items: center; min-height: 40px; font-size: 14px; cursor: pointer; }
.pwf-check-line input { width: 20px; height: 20px; accent-color: var(--accent); margin: 0; }
.pwf-hint { font-size: 14px; color: var(--muted); margin: 2px 0 10px; }
.pwf-photos { list-style: none; margin: 0; padding: 4px; display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 6px; max-height: 60vh; overflow-y: auto; border-radius: 12px; }
.pwf-photos.is-over { background: var(--accent-soft); }
.pwf-photos li { position: relative; margin: 0; }
.pwf-ph { display: block; width: 100%; aspect-ratio: 1; padding: 0; border: 0; border-radius: 10px; overflow: hidden; background: #EDE7E0; cursor: grab; }
.pwf-ph img { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.pwf-ph.is-used img { opacity: .5; }
.pwf-ph.is-loading { background: linear-gradient(90deg, #EDE7E0, #F7F3EE, #EDE7E0); background-size: 200% 100%; animation: pwf-load 1.2s linear infinite; }
@keyframes pwf-load { to { background-position: -200% 0; } }
.pwf-used { position: absolute; top: 4px; right: 4px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px; background: var(--ok); color: #fff; font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.pwf-del { position: absolute; top: 3px; right: 3px; width: 24px; height: 24px; border-radius: 999px; border: 0; background: rgba(30, 27, 24, .75); color: #fff; font-size: 15px; line-height: 24px; padding: 0; cursor: pointer; opacity: 0; }
.pwf-photos li:hover .pwf-del, .pwf-del:focus { opacity: 1; }
@media (hover: none) { .pwf-del { opacity: 1; } }
.pwf-ok { color: var(--ok); font-weight: 600; font-size: 14px; }

/* Palco */
.pwf-app { --ar: 1; }
.pwf-stagehead { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.pwf-stagebox { padding: 6px 0 4px; }
.pwf-spread, .pwf-cover-spread { display: flex; justify-content: center; filter: drop-shadow(0 10px 22px rgba(30, 27, 24, .16)); }
.pwf-page { position: relative; flex: 0 0 auto; width: min(48%, calc(60vh * var(--ar))); container-type: inline-size; overflow: hidden; }
.pwf-spread .pwf-page + .pwf-page { border-left: 1px solid rgba(0, 0, 0, .08); }
.pwf-page.is-sel { box-shadow: inset 0 0 0 3px var(--accent); }
.pwf-slot { position: absolute; overflow: hidden; cursor: pointer; }
.pwf-slot.is-empty { border: 1.5px dashed #BDB3A8; background: rgba(243, 239, 234, .6); display: flex; align-items: center; justify-content: center; }
.pwf-slot.is-sel { outline: 3px solid var(--accent); outline-offset: 2px; z-index: 2; }
.pwf-slot.is-over, .pwf-window.is-over { outline: 3px dashed var(--accent); outline-offset: 2px; }
.pwf-slot.is-low::after { content: '!'; position: absolute; left: 4px; bottom: 4px; width: 20px; height: 20px; border-radius: 999px; background: #FFD34D; color: #4A3500; font-weight: 800; font-size: 13px; display: flex; align-items: center; justify-content: center; }
.pwf-slot img, .pwf-window img { position: absolute; max-width: none !important; max-height: none !important; margin: 0 !important; display: block; pointer-events: none; }
.pwf-plus { color: #8C847C; font-size: 26px; line-height: 1; }
.pwf-x { position: absolute; top: 4px; right: 4px; width: 26px; height: 26px; border-radius: 999px; border: 0; background: rgba(30, 27, 24, .78); color: #fff; font-size: 16px; line-height: 26px; padding: 0; cursor: pointer; z-index: 3; }
.pwf-cap { position: absolute; display: flex; align-items: center; justify-content: center; font-family: 'PWF Serif', Georgia, serif; font-style: italic; white-space: nowrap; overflow: hidden; }
.pwf-pagelabels { display: flex; justify-content: center; gap: 0; margin-top: 10px; }
.pwf-pagelabels button { width: min(48%, calc(60vh * var(--ar))); border: 0; background: none; font-size: 13px; font-weight: 600; color: var(--muted); padding: 6px; cursor: pointer; border-radius: 999px; }
.pwf-pagelabels button.is-on { background: var(--ink); color: #fff; }
.pwf-note { text-align: center; color: var(--muted); font-size: 14px; margin: 12px 0 0; }

/* Copertina */
.pwf-back, .pwf-front { position: relative; flex: 0 0 auto; width: min(44%, calc(56vh * var(--ar))); }
.pwf-back { border-radius: 6px 0 0 6px; display: flex; align-items: flex-end; justify-content: center; padding-bottom: 5%; }
.pwf-back span { font-family: 'PWF Sans', sans-serif; font-size: 12px; color: rgba(255, 255, 255, .35); mix-blend-mode: overlay; }
.pwf-spine { flex: 0 0 auto; box-shadow: inset 3px 0 6px rgba(0, 0, 0, .25), inset -3px 0 6px rgba(0, 0, 0, .25); }
.pwf-front { border-radius: 0 6px 6px 0; }
.pwf-window { position: relative; width: 100%; height: 100%; overflow: hidden; background: #EDE7E0; container-type: inline-size; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.pwf-window.is-sel { outline: 3px solid var(--accent); outline-offset: 3px; }
.pwf-cover-hint { color: #6B635B; font-size: 14px; text-align: center; padding: 12px; }
.pwf-ctitle, .pwf-csub { position: absolute; left: 4%; right: 4%; text-align: center; line-height: 1.05; pointer-events: none; white-space: nowrap; overflow: hidden; }
.pwf-f-script { font-family: 'PWF Script', cursive; }
.pwf-f-serif { font-family: 'PWF Serif', Georgia, serif; font-style: italic; }
.pwf-f-sans { font-family: 'PWF Sans', sans-serif; font-weight: 700; }
.pwf-csub { font-family: 'PWF UI', sans-serif; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; }

/* Striscia pagine */
.pwf-strip { margin-top: 18px; background: #fff; border-radius: 18px; padding: 10px; display: flex; gap: 10px; overflow-x: auto; align-items: flex-end; }
.pwf-mini { flex: none; border: 0; border-radius: 12px; padding: 6px; background: transparent; cursor: pointer; }
.pwf-mini.is-on { background: var(--accent-soft); box-shadow: inset 0 0 0 2px var(--accent); }
.pwf-minibox { display: block; height: 46px; pointer-events: none; }
.pwf-minibox .pwf-spread, .pwf-minibox .pwf-cover-spread { filter: none; height: 46px; }
.pwf-minibox .pwf-page, .pwf-minibox .pwf-back, .pwf-minibox .pwf-front { width: calc(46px * var(--ar)); box-shadow: 0 0 0 1px #DCD3C9; }
.pwf-minibox .pwf-spine { width: 3px !important; }
.pwf-minibox .pwf-back span, .pwf-minibox .pwf-cover-hint { display: none; }
.pwf-minilabel { display: block; font-size: 12px; color: var(--muted); margin-top: 4px; white-space: nowrap; }
.pwf-pagebtns { flex: none; display: flex; flex-direction: column; gap: 6px; }
.pwf-addpages { min-height: 40px; padding: 0 12px; border-radius: 12px; border: 1.5px dashed var(--accent); background: var(--accent-soft); color: #8F3416; font-weight: 700; font-size: 13px; cursor: pointer; white-space: nowrap; }
.pwf-rempages { min-height: 32px; padding: 0 12px; border-radius: 12px; border: 1px solid #DCD3C9; background: #fff; color: var(--muted); font-size: 13px; cursor: pointer; }
.pwf-rempages:disabled { opacity: .5; cursor: not-allowed; }

/* Pannello */
.pwf-sub { color: var(--muted); font-size: 14px; margin: 0 0 12px; }
.pwf-lbl { display: block; font-weight: 600; font-size: 14px; margin: 12px 0 4px; }
.pwf-panel input[type="text"] { width: 100%; min-height: 46px; border: 1.5px solid #CFC6BC; border-radius: 12px; padding: 0 12px; font: inherit; font-size: 16px; background: #fff; }
.pwf-layouts { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.pwf-lay { border: 2px solid var(--line); background: #fff; border-radius: 12px; padding: 6px 2px 4px; cursor: pointer; }
.pwf-lay.is-on { border-color: var(--accent); background: var(--accent-soft); }
.pwf-lay b { display: block; font-size: 12px; margin-top: 3px; }
.pwf-licon { display: grid; width: 30px; height: 30px; margin: 0 auto; gap: 2px; padding: 3px; background: #F7F4F0; border-radius: 3px; }
.pwf-licon i { background: #A39A91; border-radius: 1px; }
.pwf-lay.is-on .pwf-licon i { background: var(--accent); }
.pwf-bgs { display: flex; flex-wrap: wrap; gap: 8px; }
.pwf-bg { width: 44px; height: 44px; border-radius: 999px; border: 1px solid #CFC6BC; cursor: pointer; }
.pwf-bg.is-on { border: 3px solid var(--accent); }
.pwf-help { margin-top: 18px; background: var(--soft); border-radius: 14px; padding: 12px 14px; font-size: 14px; color: var(--muted); }
.pwf-help strong { display: block; color: var(--ink); }
.pwf-chips3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.pwf-chips2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; margin-top: 6px; }
.pwf-chip { min-height: 42px; border: 2px solid var(--line); background: #fff; border-radius: 10px; font-weight: 600; font-size: 14px; cursor: pointer; }
.pwf-chip.is-on { border-color: var(--accent); background: var(--accent-soft); }
/* Il blocco dei temi sta in cima al pannello e si richiude, per non
   mangiare spazio a chi ha già scelto. */
.pwf-temi-box { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin: 0 0 12px; }
.pwf-temi-box > summary { cursor: pointer; font-weight: 700; font-size: 15px; list-style: none; }
.pwf-temi-box > summary::-webkit-details-marker { display: none; }
.pwf-temi-box > summary::after { content: ' ▾'; color: #8A817A; }
.pwf-temi-box[open] > summary::after { content: ' ▴'; }
.pwf-temi-box h3 { margin: 14px 0 6px; }
.pwf-bg.is-sugg { box-shadow: 0 0 0 2px rgba(30, 27, 24, .55); }

/* Temi: un riquadro per tema, con l'assaggio del fondo e dell'ecopelle. */
.pwf-temi { display: grid; gap: 8px; }
.pwf-tema { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px; border: 2px solid var(--line); background: #fff; border-radius: 12px; cursor: pointer; text-align: left; font: inherit; }
.pwf-tema.is-on { border-color: #e6007e; }
.pwf-tema-prova { position: relative; flex: none; width: 46px; height: 46px; border-radius: 8px; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .12); }
.pwf-tema-prova i { position: absolute; right: 5px; bottom: 5px; width: 16px; height: 16px; border-radius: 999px; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .18); }
.pwf-tema-testo { display: grid; gap: 2px; min-width: 0; font-size: 13px; line-height: 1.35; color: #6B635B; }
.pwf-tema-testo b { font-size: 14px; color: #1E1B18; }

.pwf-colors { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.pwf-color { display: flex; align-items: center; gap: 8px; min-height: 42px; padding: 0 10px 0 6px; border: 2px solid var(--line); background: #fff; border-radius: 999px; font-size: 14px; font-weight: 600; cursor: pointer; }
.pwf-color span { width: 24px; height: 24px; border-radius: 999px; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .15); flex: none; }
.pwf-color.is-on { border-color: var(--accent); }
.pwf-adjust { background: var(--soft); border-radius: 14px; padding: 12px 14px; margin-bottom: 12px; }
.pwf-adjust h3 { margin-top: 0; }
.pwf-adjust label { display: block; font-size: 14px; font-weight: 600; margin: 8px 0; }
.pwf-adjust input[type="range"] { width: 100%; accent-color: var(--accent); min-height: 28px; }
.pwf-quality { font-size: 14px; font-weight: 700; margin: 0 0 6px; }
.pwf-quality.is-ok { color: var(--ok); }
.pwf-quality.is-warn { color: #8A5A00; }
.pwf-quality.is-bad { color: #A12A1A; }
.pwf-panel hr { border: 0; border-top: 1px solid var(--line); margin: 16px 0; }

/* Sfoglia */
.pwf-check { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 28px; padding: clamp(16px, 3vw, 36px) clamp(12px, 3vw, 36px) 48px; max-width: 1400px; margin: 0 auto; align-items: start; }
@media (max-width: 900px) { .pwf-check { grid-template-columns: minmax(0, 1fr); } }
.pwf-viewer { background: #E9E3DB; border-radius: 24px; padding: 28px 14px 16px; }
.pwf-viewbox .pwf-page { width: min(48%, calc(62vh * var(--ar))); }
.pwf-viewbox .pwf-back, .pwf-viewbox .pwf-front { width: min(46%, calc(58vh * var(--ar))); }
.pwf-viewnav { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px; margin-top: 16px; }
.pwf-viewnav strong { min-width: 130px; text-align: center; }
.pwf-checkside { background: #fff; border-radius: 24px; padding: 22px; position: sticky; top: 84px; }
.pwf-issues { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 8px; }
.pwf-issues li { display: flex; gap: 10px; align-items: center; border-radius: 14px; padding: 12px 14px; background: #FFF4D6; color: #4A3500; font-size: 14px; }
.pwf-issues li.is-block { background: #FBE3DD; color: #7A1E10; }
.pwf-issues li.is-good { background: #E3F1E6; color: var(--ok); }
.pwf-issues li span { flex-grow: 1; }
.pwf-issues li strong { display: block; font-size: 15px; }
.pwf-issues .pwf-btn { min-height: 38px; padding: 0 14px; flex: none; }
.pwf-sum { border-top: 1px solid var(--line); padding-top: 12px; display: grid; gap: 6px; font-size: 15px; }
.pwf-sum div { display: flex; justify-content: space-between; gap: 10px; }
.pwf-total { font-size: 20px; font-weight: 700; margin-top: 4px; }
.pwf-sumline { font-size: 15px; color: var(--muted); }
.pwf-err { color: #A12A1A; font-weight: 600; font-size: 14px; }

/* Messaggi */
.pwf-toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: #fff; border-radius: 14px; padding: 12px 18px; font-size: 15px; box-shadow: 0 12px 32px rgba(0, 0, 0, .25); z-index: 50; max-width: calc(100% - 32px); }
.pwf-empty { max-width: 640px; margin: 10vh auto; padding: 24px; background: #fff; border-radius: 24px; }
.pwf-recent { padding-left: 18px; }
.pwf-recent span { color: var(--muted); font-size: 14px; }

/* Foto singola (tela, poster, Fine Art) */
.pwf-stagehead-foto { justify-content: flex-start; flex-wrap: wrap; gap: 4px 12px; }
.pwf-stagehead-foto span { color: var(--muted); font-size: 15px; }
.pwf-printwrap { display: flex; justify-content: center; padding: 8px 0; }
.pwf-print { position: relative; width: min(100%, calc(68vh * var(--par, 1))); overflow: hidden; background: #EDE7E0; box-shadow: 0 14px 30px rgba(30, 27, 24, .22), 0 0 0 1px rgba(0, 0, 0, .06); container-type: inline-size; }
.pwf-pbox { position: absolute; overflow: hidden; background: #EDE7E0; }
.pwf-printwrap-big .pwf-print { width: min(100%, calc(64vh * var(--par, 1))); }
.pwf-print.is-over { outline: 3px dashed var(--accent); outline-offset: 4px; }
.pwf-print img { position: absolute; max-width: none !important; max-height: none !important; margin: 0 !important; display: block; pointer-events: none; user-select: none; }
.pwf-pan { position: absolute; inset: 0; cursor: grab; touch-action: none; z-index: 2; }
.pwf-pan:active { cursor: grabbing; }
.pwf-wrap { position: absolute; box-shadow: 0 0 0 4000px rgba(20, 18, 16, .42); border: 1.5px dashed rgba(255, 255, 255, .9); pointer-events: none; z-index: 3; }
.pwf-wrap.is-solid { box-shadow: none; border-color: rgba(120, 110, 100, .8); }
/* Calendario */
.pwf-cal { position: absolute; inset: 0; pointer-events: none; z-index: 2; }
.pwf-cpanel { position: absolute; }
.pwf-ct { position: absolute; transform: translateX(-50%); display: flex; align-items: center; line-height: 1; white-space: nowrap; font-family: 'PWF UI', system-ui, sans-serif; font-weight: 600; }
.pwf-ct-head, .pwf-ct-month { font-family: 'PWF Sans', system-ui, sans-serif; font-weight: 700; letter-spacing: .02em; }
.pwf-chips1 { display: grid; gap: 6px; }
.pwf-select { width: 100%; min-height: 46px; border: 1.5px solid #CFC6BC; border-radius: 12px; padding: 0 10px; font: inherit; font-size: 16px; background: #fff; color: var(--ink); }
.pwf-print-empty { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; border: 2px dashed #BDB3A8; cursor: pointer; text-align: center; padding: 16px; }
.pwf-print-empty strong { font-family: 'PWF Sans', sans-serif; font-size: 20px; color: var(--accent); }
.pwf-print-empty span { color: var(--muted); font-size: 14px; }
.pwf-print-empty input { position: absolute; inset: 0; opacity: 0; cursor: pointer; font-size: 0; }
.pwf-ph.is-chosen { box-shadow: 0 0 0 3px var(--accent); }
.pwf-app-foto .pwf-trayact > * { flex: 1 1 auto; }

/* Passaggio all'invio per chi ha già impaginato */
/* La scelta fra impaginare qui e caricare le proprie tavole, per chi apre
   un fotolibro gia pagato e non e mai passato dalla scheda prodotto. */
.pwf-scelta { background: #fff; border-bottom: 1px solid var(--line); padding: 14px clamp(12px, 2.5vw, 24px); }
.pwf-scelta-t { margin: 0 0 10px; font-family: 'PWF Sans', system-ui, sans-serif; font-weight: 700; font-size: 17px; }
.pwf-scelta-b { display: flex; flex-wrap: wrap; gap: 10px; }
.pwf-scelta-n { margin: 10px 0 0; font-size: .88rem; line-height: 1.45; color: #6B635B; max-width: 62ch; }

.pwf-trayswitch {
	margin: 4px 0 10px;
	font-size: .88rem;
	line-height: 1.45;
	color: #6B635B;
}

/* «Te lo impaginiamo noi»: solo le foto, niente pagine né impaginazione. */
.pwf-solo-foto .pwf-stage, .pwf-solo-foto .pwf-panel, .pwf-solo-foto #pwf-steps, .pwf-solo-foto #pwf-hist, .pwf-solo-foto #pwf-next, .pwf-solo-foto #pwf-scelta { display: none !important; }
.pwf-solo-foto .pwf-main { display: block; max-width: 960px; margin: 0 auto; }
.pwf-solo-foto .pwf-tray { position: static; max-height: none; overflow: visible; padding: 22px; }
.pwf-solo-foto .pwf-photos { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); max-height: 55vh; min-height: 120px; border: 2px dashed #E7E2DC; }
.pwf-solo-foto .pwf-noi-box { margin-top: 18px; display: grid; gap: 10px; max-width: 520px; }

/* Calendari con grafica pronta */
.pwf-print img.pwf-tpl { left: 0; top: 0; width: 100%; height: 100%; z-index: 2; }
.pwf-graf-vuoto { display: grid; place-content: center; gap: 12px; text-align: center; background: #F7F3EE; padding: 24px; }
.pwf-graf-vuoto span { color: #6E665E; font-size: 14px; }
.pwf-graf-cur { display: flex; align-items: center; gap: 12px; width: 100%; padding: 8px; margin: 0 0 10px; border: 1px solid #E4DED4; border-radius: 10px; background: #fff; cursor: pointer; text-align: left; font: inherit; font-weight: 700; }
.pwf-graf-cur img { width: 64px; height: 64px; object-fit: contain; background: #F7F3EE; border-radius: 6px; }
.pwf-graf { position: fixed; inset: 0; z-index: 9999; background: rgba(30, 27, 24, .55); display: flex; align-items: center; justify-content: center; padding: 16px; }
.pwf-graf[hidden] { display: none; }
.pwf-graf-box { background: #fff; border-radius: 16px; width: min(1100px, 100%); max-height: calc(100vh - 32px); display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 20px 60px rgba(0, 0, 0, .3); }
.pwf-graf-head { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid #EEE8E0; }
.pwf-graf-head h2 { margin: 0; font-size: 20px; flex: 1; }
.pwf-graf-head input { font: inherit; padding: 8px 12px; border: 1px solid #D9D2C8; border-radius: 8px; width: min(260px, 45vw); }
.pwf-graf-x { font-size: 28px; line-height: 1; background: none; border: 0; cursor: pointer; padding: 4px 8px; }
.pwf-graf-list { list-style: none; margin: 0; padding: 16px 20px 24px; overflow: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.pwf-graf-list li[hidden] { display: none; }
.pwf-graf-list button { width: 100%; padding: 6px; border: 2px solid transparent; border-radius: 10px; background: #F7F3EE; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 6px; font: inherit; font-size: 13px; font-weight: 600; }
.pwf-graf-list button:hover, .pwf-graf-list button:focus-visible { border-color: #e6007e; }
.pwf-graf-list button.is-on { border-color: #e6007e; background: #FDE7F2; }
.pwf-graf-list img { width: 100%; aspect-ratio: 2 / 3; object-fit: contain; background: #fff; border-radius: 6px; }
@media (max-width: 600px) { .pwf-graf-list { grid-template-columns: repeat(2, 1fr); } .pwf-graf { padding: 0; } .pwf-graf-box { border-radius: 0; max-height: 100vh; height: 100vh; } }
.pwf-pz { display: flex; gap: 8px; flex-wrap: wrap; width: 100%; margin-bottom: 6px; }
.pwf-pz button { font: inherit; font-weight: 700; font-size: 14px; padding: 8px 14px; border-radius: 999px; border: 1px solid #D9D2C8; background: #fff; cursor: pointer; }
.pwf-pz button.is-ok { color: #1E7A44; }
.pwf-pz button.is-on { background: #1E1B18; color: #fff; border-color: #1E1B18; }
.pwf-pz-all { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 18px; width: 100%; }
.pwf-pz-all figure { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.pwf-pz-all figcaption { font-weight: 700; font-size: 14px; }
.pwf-pz-all .pwf-print { width: 100%; }
.pwf-pz-all .pwf-printwrap { width: 100%; display: flex; justify-content: center; }
.pwf-pz-all .pwf-graf-vuoto { width: 100%; }
.pwf-plast { margin: 4px 0 12px; padding: 10px 12px; border: 1px solid #E4DED4; border-radius: 10px; background: #fff; }
.pwf-print .pwf-slotmark { position: absolute; z-index: 3; pointer-events: none; outline: 3px solid #e6007e; outline-offset: -3px; box-shadow: 0 0 0 9999px rgba(255,255,255,.0); }
.pwf-pbox[data-act="slot"] { cursor: pointer; }
.pwf-slot-n { position: absolute; inset: 0; display: grid; place-items: center; font-weight: 800; font-size: 18px; color: #8A8278; background: #F1ECE5; }
.pwf-pbox .pwf-print-empty strong { font-size: clamp(11px, 2.2cqw, 18px); }
.pwf-pbox .pwf-print-empty span { font-size: clamp(9px, 1.6cqw, 14px); }
