/* TreeEnd Floating Workspace 0.2 / MUSIC staging: schede reali, senza copie e senza aperture automatiche. */
#treeend-next-portal{--teae-window-green:#2e4120;}
#treeend-next-portal .teae-pop-button{appearance:none;display:inline-flex;flex:none;align-items:center;justify-content:center;min-width:27px;min-height:27px;padding:2px 7px;border:1px solid #d9e4dc;border-radius:7px;background:#fff;color:#31563f;cursor:pointer;font-size:15px;font-weight:700;line-height:1;vertical-align:middle;}
#treeend-next-portal .teae-pop-button:hover,#treeend-next-portal .teae-pop-button:focus-visible{background:#f1f6ef;outline:2px solid #b9d6c3;outline-offset:1px;}
#treeend-next-portal .teae-workspace{position:relative;z-index:1200;}
#treeend-next-portal .teae-window{position:fixed;top:80px;left:48px;z-index:12000;display:flex;flex-direction:column;box-sizing:border-box;min-width:300px;min-height:200px;max-width:calc(100vw - 16px);max-height:calc(100dvh - 16px);resize:both;overflow:hidden;background:#fff;border:1px solid #bacbb8;border-radius:13px;box-shadow:0 17px 55px rgba(18,33,22,.27);color:#26332b;}
#treeend-next-portal .teae-window[hidden],#treeend-next-portal .teae-window-dock[hidden],#treeend-next-portal .teae-workspace-notice[hidden]{display:none!important;}
#treeend-next-portal .teae-window.is-maximized{inset:8px!important;width:calc(100vw - 16px)!important;height:calc(100dvh - 16px)!important;max-width:none;max-height:none;resize:none;}
#treeend-next-portal .teae-window-bar{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:8px 11px;flex:none;background:#2e4120;color:#fff;border-bottom:1px solid rgba(255,255,255,.14);cursor:grab;touch-action:none;}
#treeend-next-portal .teae-window-bar strong{font-size:13px;font-weight:700;line-height:1.3;letter-spacing:.025em;}
#treeend-next-portal .teae-window-actions{display:flex;align-items:center;gap:5px;}
#treeend-next-portal .teae-window-actions button{appearance:none;cursor:pointer;background:rgba(255,255,255,.13);color:#fff;border:1px solid rgba(255,255,255,.2);border-radius:5px;min-width:29px;min-height:26px;font-size:17px;line-height:1;}
#treeend-next-portal .teae-window-actions button:hover,#treeend-next-portal .teae-window-actions button:focus-visible{background:rgba(255,255,255,.3);outline:2px solid #fff;}
#treeend-next-portal .teae-float-body{flex:1;min-height:0;padding:15px;overflow-y:auto;overscroll-behavior:contain;}
#treeend-next-portal .teae-float-body>*{max-width:100%;}
#treeend-next-portal .teae-original-slot{margin:7px 0 13px;padding:9px 11px;border:1px dashed #b3c7b7;border-radius:9px;color:#627062;font-size:12px;}
#treeend-next-portal .teae-window-dock{position:fixed;right:18px;bottom:17px;z-index:13000;display:flex;flex-wrap:wrap;justify-content:flex-end;gap:6px;max-width:min(510px,94vw);padding:7px;background:rgba(255,255,255,.96);border:1px solid #dbe4dc;border-radius:13px;box-shadow:0 8px 28px #14241430;}
#treeend-next-portal .teae-dock-item{cursor:pointer;border:1px solid #c9dacb;border-radius:8px;background:#f4f7f3;padding:7px 10px;color:#31533c;font-size:12px;font-weight:700;}
#treeend-next-portal .teae-dock-item.is-minimized{background:#eff1ef;opacity:.73;}
#treeend-next-portal .teae-workspace-notice{position:fixed;z-index:13100;left:50%;bottom:76px;transform:translateX(-50%);max-width:min(460px,90vw);padding:11px 15px;color:#fff;background:#2e4120;border-radius:10px;box-shadow:0 8px 24px #0004;font-size:13px;text-align:center;}
#treeend-next-portal .teae-inline-button{display:inline-flex;align-items:center;justify-content:center;padding:8px 11px;border:1px solid #c9d9cb;border-radius:9px;color:#285038;background:#fff;font-size:12px;font-weight:700;cursor:pointer;text-decoration:none;}
#treeend-next-portal .teae-inline-button:hover{background:#eef5ec;}
#treeend-next-portal .teae-addon{margin:14px 0;padding:14px;border:1px solid rgba(46,65,32,.15);background:rgba(255,255,255,.88);border-radius:13px;}
#treeend-next-portal .teae-addon h3{margin:0 0 10px;color:#2e4120;font-size:16px;}
#treeend-next-portal .teae-addon .tem-muted{margin:4px 0 12px;font-size:13px;}
#treeend-next-portal .teae-inline-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin:12px 0 4px;}
#treeend-next-portal #tem-create .teae-ai-form{display:grid;gap:9px;}
#treeend-next-portal .teae-ai-form textarea,#treeend-next-portal #teae-social-block textarea{width:100%;min-height:90px;box-sizing:border-box;resize:vertical;padding:9px;border:1px solid #c4d3c6;border-radius:9px;background:#fff;color:#25372b;}
#treeend-next-portal .teae-ai-response{white-space:pre-wrap;line-height:1.5;overflow-wrap:anywhere;}
#treeend-next-portal .teae-ai-response:empty{display:none;}
#treeend-next-portal #tem-lab{--teae-lab-color:#f1f7ef;--teae-lab-image:none;background-image:linear-gradient(0deg,rgba(255,255,255,.83),rgba(255,255,255,.83)),var(--teae-lab-image);background-color:var(--teae-lab-color);background-position:center;background-size:cover;border:1px solid #d1dfd0;border-radius:16px;padding:16px!important;}
#treeend-next-portal .teae-lab-settings{font-size:12px;margin-bottom:15px;}
#treeend-next-portal .teae-lab-settings>summary,#treeend-next-portal .teae-social-settings>summary{cursor:pointer;color:#244d31;font-weight:750;margin:6px 0;}
#treeend-next-portal .teae-lab-form{display:flex;flex-wrap:wrap;align-items:center;gap:10px;padding:9px 0;}
#treeend-next-portal .teae-lab-form label{display:flex;align-items:center;gap:5px;}
#treeend-next-portal .teae-tools-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(125px,1fr));gap:10px;margin:10px 0;}
#treeend-next-portal .teae-tool{display:flex;align-items:center;gap:8px;padding:10px;background:#fff;border:1px solid #dce4da;border-radius:10px;color:#244936;text-decoration:none;font-size:13px;overflow:hidden;}
#treeend-next-portal .teae-tool img{width:24px;height:24px;object-fit:contain;flex:none;}
#treeend-next-portal .teae-tool span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
#treeend-next-portal .teae-social-icons{display:flex;gap:8px;flex-wrap:wrap;padding:10px 0;}
#treeend-next-portal .teae-social-link{cursor:pointer;padding:9px 11px;border-radius:9px;border:1px solid #d2ddd6;background:#fff;color:#345240;font-size:12px;font-weight:700;}
#treeend-next-portal .teae-social-link.is-connected{border-color:#7ab68e;background:#eef9f0;}
#treeend-next-portal .teae-social-form{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:10px;align-items:end;padding:12px 0;}
#treeend-next-portal .teae-social-form label{display:grid;gap:4px;font-size:12px;}
#treeend-next-portal .teae-social-form input{width:100%;box-sizing:border-box;min-height:35px;border:1px solid #cbdace;border-radius:7px;padding:7px;}
#treeend-next-portal .teae-followed-feed{display:grid;gap:9px;max-height:650px;overflow:auto;}
#treeend-next-portal.teae-split-suggestions [data-tem-suggestions-list]>.tem-event--followed[data-event-type="news"],#treeend-next-portal.teae-split-suggestions [data-tem-suggestions-list]>.tem-event--followed[data-event-type="release"]{display:none;}
@media(max-width:800px){
 #treeend-next-portal .teae-window{top:0!important;left:0!important;width:100vw!important;height:100dvh!important;max-width:none;max-height:none;border-radius:0;min-width:0;resize:none;}
 #treeend-next-portal .teae-window-bar{cursor:default;touch-action:auto;min-height:42px;}
 #treeend-next-portal .teae-float-body{padding:12px;}
 #treeend-next-portal .teae-window-dock{bottom:8px;right:7px;left:7px;max-width:none;}
}
@media(prefers-reduced-motion:reduce){#treeend-next-portal .teae-pop-button{transition:none;}}

/* ================================================================
   0.2.2 · UNA SCHEDA PER RIGA, POPUP FEDELE, SCEGLI, SOCIAL
   Tutto confinato all'Engine attivo, senza modificare Next o Music.
   ================================================================ */
#treeend-next-portal.teae-on #treeend-music .teae-full-row-grid{
  display:grid;grid-template-columns:minmax(0,1fr)!important;gap:16px;
}
#treeend-next-portal.teae-on #treeend-music .teae-full-row-grid>#tem-artists,
#treeend-next-portal.teae-on #treeend-music .teae-full-row-grid>#tem-create{
  grid-column:1 / -1;min-width:0;width:100%;box-sizing:border-box;
}
/* SCEGLI mantiene in alto le due aree ufficiali e sotto la selezione personale. */
#treeend-next-portal.teae-on #treeend-music #teae-choose-uploads{
  grid-column:1 / -1;width:100%;box-sizing:border-box;
}
#treeend-next-portal .teae-personal-videos{display:grid;grid-template-columns:repeat(auto-fit,minmax(230px,1fr));gap:12px;margin:12px 0;}
#treeend-next-portal .teae-video-item{display:grid;grid-template-columns:95px minmax(0,1fr);gap:11px;padding:10px;border:1px solid #dce5d8;border-radius:12px;background:#fff;align-items:start;}
#treeend-next-portal .teae-video-item>img{width:95px;aspect-ratio:16/9;object-fit:cover;border-radius:7px;}
#treeend-next-portal .teae-video-item>div{min-width:0;display:grid;gap:5px;}
#treeend-next-portal .teae-video-item strong{font-size:13px;overflow-wrap:anywhere;}
#treeend-next-portal .teae-video-item small{color:#6d7468;font-size:11px;}
#treeend-next-portal .teae-video-item a{font-size:12px;color:#2e4120;}
#treeend-next-portal .teae-video-item button{grid-column:1/-1;justify-self:end;}
#treeend-next-portal .teae-choice-form{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:14px 0 0;}
#treeend-next-portal .teae-choice-form>input,#treeend-next-portal .teae-choice-form>select{box-sizing:border-box;width:100%;min-width:0;}
#treeend-next-portal .teae-choice-form>p{grid-column:1/-1;margin:0;}
#treeend-next-portal .teae-choice-form>button{justify-self:start;}
/* News lette da archivio, senza copie HTML e senza polling. */
#treeend-next-portal .teae-followed-feed{max-height:none;overflow:visible;margin:12px 0 2px;}
#treeend-next-portal .teae-news-card{display:flex;gap:12px;align-items:flex-start;padding:12px;border:1px solid #dee6da;border-radius:12px;background:#fff;}
#treeend-next-portal .teae-news-card>img{width:86px;height:86px;border-radius:9px;object-fit:cover;flex:none;}
#treeend-next-portal .teae-news-card>div{display:grid;gap:5px;min-width:0;}
#treeend-next-portal .teae-news-card strong{font-size:14px;line-height:1.4;}
#treeend-next-portal .teae-news-card small,#treeend-next-portal .teae-news-card p{font-size:12px;color:#586858;margin:0;}
#treeend-next-portal .teae-news-card a{font-size:12px;color:#275d3a;}
/* Nel popup: nessun layout alternativo. Lo stesso nodo, le stesse schede. */
#treeend-next-portal .teae-window .teae-float-body{
  width:100%;max-width:none;min-width:0;box-sizing:border-box;margin:0!important;
  padding:12px!important;background:#fafbf9;overflow:auto;
}
#treeend-next-portal .teae-window .teae-float-body>*{max-width:none;width:100%;box-sizing:border-box;}
#treeend-next-portal .teae-window .teae-section-heading{padding-top:8px;color:#2e4120;}
#treeend-next-portal .teae-window .teae-section-heading .teae-pop-button{display:none!important;}
#treeend-next-portal .teae-window .tem-now>.teae-section-heading{color:#fff;}
#treeend-next-portal .teae-window .tem-discovery-columns{display:grid;grid-template-columns:1fr 1fr;gap:16px;}
#treeend-next-portal .teae-window .tem-discovery-columns>.teae-addon{grid-column:1/-1;}
#treeend-next-portal .teae-window .tem-grid-2{grid-template-columns:minmax(0,1fr);}
#treeend-next-portal .teae-window .teae-choice-form{grid-template-columns:1fr 1fr;}
#treeend-next-portal .teae-window .tem-track-grid{grid-template-columns:repeat(auto-fit,minmax(150px,1fr));}
#treeend-next-portal .teae-window .tem-ideas{grid-template-columns:repeat(auto-fit,minmax(165px,1fr));}
#treeend-next-portal .teae-window{animation:teae-window-extract .17s ease-out;}
@keyframes teae-window-extract{from{opacity:.86;transform:scale(.985)}to{opacity:1;transform:scale(1)}}
/* Modale I MIEI STRUMENTI: piu' in basso rispetto al menu sticky. */
#treeend-next-portal.teae-on #tem-production.tem-modal.is-open{
  align-items:flex-start!important;justify-content:center!important;
  padding:calc(var(--teae-toolbar-height) + var(--teae-admin-offset) + 30px) 14px 20px!important;
  overflow:auto;box-sizing:border-box;z-index:2147482500!important;
}
#treeend-next-portal.teae-on #tem-production .tep-panel{margin:0 auto;max-height:calc(100dvh - var(--teae-toolbar-height) - var(--teae-admin-offset) - 54px);overflow-y:auto;}
/* Condividi: un social alla volta, anteprima esplicita e modificabile. */
#treeend-next-portal .teae-social-settings{border-bottom:1px solid #e5ebe2;margin-bottom:12px;padding-bottom:8px;}
#treeend-next-portal .teae-social-form{display:grid;grid-template-columns:1fr;gap:8px;}
#treeend-next-portal .teae-social-setting-row{display:grid!important;grid-template-columns:22px minmax(100px,140px) minmax(0,1fr);gap:9px;align-items:center;margin:0!important;padding:7px 0;border-bottom:1px solid #eef1ee;font-weight:500;}
#treeend-next-portal .teae-social-setting-row input[type=checkbox]{margin:0;width:18px;height:18px;accent-color:#2e4120;}
#treeend-next-portal .teae-social-setting-row input[type=url]{margin:0;}
#treeend-next-portal #teae-social-block>select{width:100%;max-width:580px;margin:8px 0 12px;}
#treeend-next-portal .teae-social-tabs{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:12px;}
#treeend-next-portal .teae-social-link[aria-pressed=true]{border:2px solid #2e4120;background:#eef5ed;}
#treeend-next-portal .teae-share-preview{padding:13px;background:#fff;border:1px solid #dbe5dc;border-radius:13px;display:grid;gap:10px;}
#treeend-next-portal .teae-share-preview[hidden]{display:none!important;}
#treeend-next-portal .teae-preview-header{display:flex;justify-content:space-between;flex-wrap:wrap;gap:8px;align-items:center;}
#treeend-next-portal .teae-preview-header small{color:#6a7769;}
#treeend-next-portal .teae-share-preview>img{width:100%;max-width:300px;max-height:180px;object-fit:contain;background:#f7f7f7;border-radius:9px;}
#treeend-next-portal .teae-share-preview>img[hidden]{display:none!important;}
#treeend-next-portal .teae-share-preview textarea{max-width:100%;}
#treeend-next-portal .teae-share-preview .teae-inline-actions{margin:0;}
@media(max-width:650px){
  #treeend-next-portal .teae-choice-form,#treeend-next-portal .teae-window .teae-choice-form{grid-template-columns:1fr;}
  #treeend-next-portal .teae-social-setting-row{grid-template-columns:22px 1fr;}
  #treeend-next-portal .teae-social-setting-row input[type=url]{grid-column:1/-1;}
  #treeend-next-portal .teae-window .tem-discovery-columns{grid-template-columns:1fr;}
  #treeend-next-portal .teae-window .teae-float-body{padding:10px!important;}
  #treeend-next-portal.teae-on #tem-production.tem-modal.is-open{padding:calc(var(--teae-toolbar-height) + var(--teae-admin-offset) + 15px) 6px 9px!important;}
}
@media(prefers-reduced-motion:reduce){#treeend-next-portal .teae-window{animation:none;}}

/* 0.2.4 — stesso contenuto Design quando la scheda viene estratta. */
#treeend-next-portal .teae-window[data-teae-window-agenda="design"]{--ted-green:#2e4120;--ted-olive:#686f49;--ted-paper:#f9f6ee;--ted-fuchsia:#e90070;}
#treeend-next-portal .teae-window[data-teae-window-agenda="design"] .teae-float-body{color:#263021;}
#treeend-next-portal .teae-window[data-teae-window-agenda="design"] .teae-section-heading .teae-pop-button{display:none!important;}
#treeend-next-portal .teae-window[data-teae-window-agenda="design"] .ted-card,
#treeend-next-portal .teae-window[data-teae-window-agenda="design"] .ted-suggestions-section,
#treeend-next-portal .teae-window[data-teae-window-agenda="design"] .ted-selected-section{width:100%;max-width:none;min-width:0;box-sizing:border-box;}
