/* TreeEnd Personal Media — solo interfaccia. Nessuna immagine esterna viene scaricata dal server. */
.treeend-next-event-tools .tepm-add-external{border:1px solid #6d9b62!important;background:#edf9e8!important;color:#24452c!important;font-weight:700!important}
.tepm-overlay{position:fixed!important;inset:0!important;z-index:2147483646!important;background:rgba(12,20,15,.93)!important;display:flex;align-items:center;justify-content:center;box-sizing:border-box;padding:64px 16px 80px;color:#fff;font-family:system-ui,-apple-system,sans-serif}
.tepm-overlay *{box-sizing:border-box}
.tepm-panel{max-width:100%;max-height:100%;position:relative;display:flex;align-items:center;justify-content:center}
.tepm-photo{display:block;max-width:min(1200px,95vw);max-height:calc(100dvh - 175px);object-fit:contain;border-radius:6px;box-shadow:0 4px 40px #0009}
.tepm-toolbar{position:fixed;top:max(12px,env(safe-area-inset-top));left:12px;right:12px;display:flex;gap:8px;justify-content:flex-end;flex-wrap:wrap;z-index:1}
.tepm-toolbar button{border:1px solid #ffffff70;border-radius:8px;min-height:42px;padding:8px 14px;background:#22372f;color:white;cursor:pointer;font:600 15px/1.3 system-ui,-apple-system,sans-serif}
.tepm-toolbar button:hover,.tepm-toolbar button:focus-visible{background:#43634c;outline:2px solid #abd879;outline-offset:1px}
.tepm-toolbar button.tepm-remove{background:#702d31}
.tepm-title{position:fixed;left:20px;right:20px;bottom:max(17px,env(safe-area-inset-bottom));text-align:center;color:#f0f8eb;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;pointer-events:none}
.tepm-dialog-backdrop{position:fixed;inset:0;z-index:2147483647;background:#0d190ece;display:flex;justify-content:center;align-items:center;padding:16px;font-family:system-ui,-apple-system,sans-serif}
.tepm-dialog{width:min(540px,100%);max-height:90dvh;overflow-y:auto;background:#fff;color:#253626;border-radius:18px;padding:23px;box-shadow:0 10px 38px #0007}
.tepm-dialog h2{font-size:22px;line-height:1.3;color:#31523b;margin:0 0 8px}
.tepm-dialog p{font-size:14px;line-height:1.5}
.tepm-dialog label{display:block;font-weight:600;margin:15px 0 5px;font-size:14px}
.tepm-dialog input{display:block;width:100%;border:1px solid #9eb39e;border-radius:8px;padding:11px;font:16px system-ui,sans-serif}
.tepm-dialog .tepm-actions{display:flex;gap:9px;flex-wrap:wrap;margin-top:15px}
.tepm-dialog button{min-height:40px;border:1px solid #97ab95;background:#eef5e9;border-radius:9px;padding:8px 14px;font:600 14px system-ui,sans-serif;cursor:pointer;color:#223a28}
.tepm-dialog button.tepm-main{background:#305b3c;color:#fff}
.tepm-dialog button:disabled{opacity:.6;cursor:wait}
.tepm-dialog .tepm-status{font-size:13px;margin-top:10px;color:#516753;min-height:1.3em}
.tepm-dialog .tepm-warning{color:#745429;background:#fff7df;border-left:3px solid #d7a744;padding:9px 11px;border-radius:5px}
.tepm-dialog .tepm-error{color:#9d2929;font-weight:650}
@media(max-width:600px){.tepm-overlay{padding:78px 8px 62px}.tepm-photo{max-width:96vw;max-height:calc(100dvh - 175px)}.tepm-toolbar{gap:5px;justify-content:center}.tepm-toolbar button{font-size:13px;padding:7px 10px}}
