/* Patch 117 - stati funzionali Post-it / Attivita: COMPLETATO e CANCELLATO. */
.postit-task-row.cancelled .postit-task-open,
.detail-task.cancelled .detail-task-title {
    color:#b42318 !important;
    text-decoration:line-through;
    text-decoration-thickness:1px;
    opacity:.9 !important;
}
.postit-task-row.cancelled .postit-task-open:hover,
.detail-task.cancelled .detail-task-main:hover .detail-task-title { color:#8f1d14 !important; }
.task-cancelled-icon {
    width:16px;
    min-width:16px;
    display:inline-grid;
    place-items:center;
    color:#b42318;
    font-weight:900;
    font-size:13px;
    line-height:1;
    margin-top:1px;
}
.task-cancelled-count { color:#a82920; font-weight:800; }
.cancelled-mark { margin-left:auto; font-weight:900; color:#b42318; }

.detail-status-badge.is-cancelled,
.app-shell .detail-status-badge.is-cancelled {
    background:#fff0ee;
    border-color:#efbbb5;
    color:#a5261c;
}
.detail-status-badge.is-pending,
.app-shell .detail-status-badge.is-pending {
    background:#fff7dc;
    border-color:#ead79b;
    color:#80621b;
}
.detail-status-badge.is-archived,
.app-shell .detail-status-badge.is-archived {
    background:#f1f2f4;
    border-color:#d3d7dc;
    color:#65707d;
}
.status-badge-picker {
    position:relative;
    display:inline-flex;
    align-items:center;
}
.status-badge-trigger {
    gap:5px;
    cursor:pointer;
    min-height:26px;
}
.status-badge-trigger:disabled { cursor:default; opacity:1; }
.status-caret { font-size:10px; line-height:1; opacity:.72; }
.status-badge-menu {
    position:absolute;
    z-index:52000;
    top:calc(100% + 5px);
    right:0;
    min-width:142px;
    padding:5px;
    display:grid;
    gap:4px;
    border:1px solid #d7dde5;
    border-radius:9px;
    background:#fff;
    box-shadow:0 12px 28px #00000026;
}
.status-badge-menu > button {
    width:100%;
    padding:3px;
    border:0;
    border-radius:7px;
    background:transparent;
    text-align:left;
    cursor:pointer;
}
.status-badge-menu > button:hover:not(:disabled) { background:#f4f6f8; }
.status-badge-menu > button:disabled { opacity:.38; cursor:not-allowed; }
.status-badge-menu .detail-status-badge { width:100%; justify-content:flex-start; min-height:25px; }

.context-status-grid {
    display:grid;
    grid-template-columns:1fr;
    gap:3px;
    padding:2px 0 4px;
}
.context-status-grid > button {
    border:0;
    background:transparent;
    padding:0;
    text-align:left;
    cursor:pointer;
}
.context-status-grid > button:disabled { opacity:.38; cursor:not-allowed; }
.context-status-grid .detail-status-badge {
    width:100%;
    min-height:24px;
    justify-content:flex-start;
    padding-left:9px;
}

/* Il picker stato nel dettaglio Post-it è un button ma deve mantenere l'aspetto del badge. */
.detail-header .status-badge-trigger {
    border:1px solid #ccd4de;
    background:#eef2f6;
    font-size:8px;
    padding:3px 7px;
    min-height:26px;
}
.detail-header .status-badge-trigger.is-open { background:#e8f6ec; border-color:#b8dcc3; color:#24643a; }
.detail-header .status-badge-trigger.is-closed { background:#edf0f3; border-color:#cfd5dc; color:#5d6672; }
.detail-header .status-badge-trigger.is-cancelled { background:#fff0ee; border-color:#efbbb5; color:#a5261c; }
.detail-header .status-badge-trigger.is-pending { background:#fff7dc; border-color:#ead79b; color:#80621b; }
.detail-header .status-badge-trigger > span {
    color:inherit;
    font-size:inherit;
    text-transform:inherit;
    letter-spacing:inherit;
}
.detail-header .status-badge-menu > button { font-size:10px; }
.task-detail-modal.is-cancelled > header h2 {
    color:#b42318;
    text-decoration:line-through;
    text-decoration-thickness:1px;
}

/* Patch 118 - menu stato attività non ritagliato e ciclo rapido Aperta > Completata > Cancellata. */
.task-status-cycle {
    width:16px;
    height:16px;
    min-width:16px;
    padding:0;
    border:1px solid #9ba7b4;
    border-radius:4px;
    background:#fff;
    color:#24643a;
    display:inline-grid;
    place-items:center;
    align-self:flex-start;
    margin-top:1px;
    line-height:1;
    cursor:pointer;
}
.task-status-cycle.done {
    background:#e8f6ec;
    border-color:#9bc6a6;
    color:#24643a;
}
.task-status-cycle.cancelled {
    background:#fff0ee;
    border-color:#efbbb5;
    color:#b42318;
}
.task-status-cycle:disabled { cursor:default; opacity:.48; }
.task-status-cycle-glyph {
    display:block;
    font-size:11px;
    font-weight:900;
    line-height:1;
    transform:translateY(-.2px);
}
.task-status-cycle.cancelled .task-status-cycle-glyph { font-size:9px; }
.task-cancelled-icon { font-size:11px; }

/* Patch 119 - menu stato attività in overlay globale: non modifica il layout e può uscire dalla modale. */
.status-badge-menu-floating {
    position:fixed;
    z-index:52000;
    top:0;
    left:0;
    right:auto;
    min-width:154px;
    margin:0;
}
.postit-task-row.done .task-status-cycle-glyph {
    text-decoration:none;
    opacity:1;
}

/* Patch 122 - disponibilità Shop, collegamenti Catalogo e resa particelle. */
.shop-upcoming-badge {
    display:inline-flex;
    align-items:center;
    min-height:18px;
    padding:2px 7px;
    border:1px solid #d9a441;
    border-radius:999px;
    background:#fff4cf;
    color:#815b0c;
    font-size:8px;
    font-weight:900;
    line-height:1;
}
.catalog-shop-card.unavailable { opacity:1; border-style:dashed; }
.catalog-shop-card.unavailable .catalog-shop-preview,
.catalog-shop-card.unavailable .catalog-shop-card-body > p { opacity:.68; }
.catalog-shop-availability.upcoming {
    width:max-content;
    max-width:100%;
    padding:4px 7px;
    border-radius:6px;
    background:#fff4cf;
    color:#815b0c;
    opacity:1;
    font-weight:800;
}
.shop-upcoming-notice {
    display:flex;
    flex-direction:column;
    gap:2px;
    padding:9px 10px;
    border:1px solid #d9a441;
    border-radius:8px;
    background:#fff4cf;
    color:#73500a;
}
.shop-upcoming-notice strong { font-size:11px; }
.shop-upcoming-notice span { font-size:9px; }

.content-catalog-object-badge {
    display:inline-flex;
    align-items:center;
    width:max-content;
    max-width:100%;
    margin-top:4px;
    padding:3px 6px;
    border-radius:999px;
    font-size:8px;
    font-weight:800;
    line-height:1.15;
    text-decoration:none;
    white-space:nowrap;
}
.content-catalog-object-badge.configured {
    border:1px solid #9fc5ab;
    background:#edf8f0;
    color:#24643a;
}
.content-catalog-object-badge.configured:hover {
    border-color:#6da47c;
    background:#e1f3e6;
}
.content-catalog-object-badge.pending {
    border:1px solid #f1c27a;
    background:#fff7e6;
    color:#9a5a00;
}

/* Le particelle restano su compositing GPU senza filtri: riduce aliasing e scatti;
   le gocce possono comunque essere ruotate lungo la direzione fisica del vento. */
.board-visual-effect > i,
.shop-effect-live-preview > span {
    -webkit-backface-visibility:hidden;
    backface-visibility:hidden;
    outline:1px solid transparent;
    will-change:transform,opacity;
}
.board-visual-effect.effect-rain > i,
.shop-effect-live-preview.effect-rain > span {
    min-width:2px;
}

.task-completed-count { color:#24643a; font-weight:800; }

/* Patch 123 - configurazione effetti, vento fisico e variazione runtime per sessione. */
.effect-config-groups {
    display:grid;
    gap:10px;
}
.effect-config-group {
    display:grid;
    gap:9px;
    padding:10px;
    border:1px solid #dce4ec;
    border-radius:10px;
    background:#f8fafc;
}
.effect-config-group > header {
    display:flex;
    align-items:baseline;
    justify-content:space-between;
    gap:12px;
    padding-bottom:7px;
    border-bottom:1px solid #e3e9ef;
}
.effect-config-group > header strong { font-size:10px; }
.effect-config-group > header small { color:#687789; font-size:8px; text-align:right; }
.effect-config-grid {
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:9px 12px;
}
.effect-config-grid > label { min-width:0; }
.effect-randomization-group { background:#f5f8fc; }
.effect-random-master {
    display:flex;
    align-items:flex-start;
    gap:7px;
    padding:8px 9px;
    border:1px solid #d5e0eb;
    border-radius:8px;
    background:#fff;
}
.effect-random-master > span,
.effect-random-setting .check-label > span { display:grid; gap:2px; }
.effect-random-master small,
.effect-random-setting small { color:#687789; font-size:8px; font-weight:400; }
.effect-random-session-row {
    display:flex;
    align-items:center;
    padding:8px 9px;
    border:1px solid #dce4ec;
    border-radius:8px;
    background:#fff;
}
.effect-random-session-row label { display:flex; align-items:center; flex-wrap:wrap; gap:6px; }
.effect-random-session-row label small { flex-basis:100%; color:#687789; font-size:8px; }
.effect-random-session-row input { width:76px; }
.effect-random-grid {
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:8px;
}
.effect-random-setting {
    display:grid;
    gap:7px;
    padding:8px 9px;
    border:1px solid #dce4ec;
    border-radius:8px;
    background:#fff;
}
.effect-random-setting > div {
    display:grid;
    grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);
    align-items:center;
    gap:6px;
}
.effect-random-setting > div > span { color:#687789; text-align:center; font-size:9px; }
.effect-random-setting input[type="number"] { width:100%; min-width:0; }
.effect-preview-group .effect-preview { width:100%; height:118px; }
.board-settings-board-save {
    display:flex;
    justify-content:flex-end;
    margin-top:10px;
    padding-top:9px;
    border-top:1px solid #e2e8ef;
}

/* Coriandoli: conservano una direzione media, ma oscillano lateralmente e ruotano in modo più irregolare. */
.board-visual-effect.effect-confetti > i { animation-name:board-effect-confetti-fall; }
@keyframes board-effect-confetti-fall {
    0% { transform:translate3d(0,-8vh,0) rotate(var(--effect-rotate)); }
    25% { transform:translate3d(calc(var(--effect-drift25) + var(--effect-sway)),28vh,0) rotate(calc(var(--effect-rotate) + 125deg)); }
    50% { transform:translate3d(calc(var(--effect-drift50) - var(--effect-sway)),56vh,0) rotate(calc(var(--effect-rotate) + 285deg)); }
    75% { transform:translate3d(calc(var(--effect-drift75) + var(--effect-sway)),84vh,0) rotate(calc(var(--effect-rotate) + 455deg)); }
    100% { transform:translate3d(var(--effect-drift),112vh,0) rotate(calc(var(--effect-rotate) + 650deg)); }
}

@media(max-width:760px){
    .effect-config-grid,
    .effect-random-grid { grid-template-columns:1fr; }
    .effect-config-group > header { align-items:flex-start; flex-direction:column; gap:3px; }
    .effect-config-group > header small { text-align:left; }
}

/* Patch 124 · Content/Catalog/Shop use one category navigation language. */
.catalog-kind-nav { grid-template-columns:repeat(auto-fit,minmax(110px,1fr)); }
.shop-kind-nav { margin-bottom:12px; }
.content-studio-tabs button { min-width:0; }

/* Board customisation: asset cards are selectors with an explicit immediate action. */
.board-settings-background-grid-tabbed .personal-background-card {
    cursor:default;
    display:grid;
    grid-template-rows:auto minmax(18px,auto) auto;
    align-content:start;
    gap:6px;
}
.board-settings-background-grid-tabbed .personal-background-card > img,
.board-settings-background-grid-tabbed .personal-background-card > .background-preview { width:100%; }
.board-settings-background-grid-tabbed .personal-background-card .background-card-label {
    display:block;
    min-width:0;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
    font-size:9px;
    font-weight:700;
}
.board-settings-background-grid-tabbed .personal-background-card > button { width:100%; justify-content:center; }
.modern-upload-button.disabled { opacity:.65; cursor:progress; pointer-events:none; }
.asset-editor-tabs{display:flex;gap:6px;padding:8px 12px 0;border-bottom:1px solid var(--border-color,#39404c);background:var(--panel-bg,#171a20)}
.asset-editor-tabs button{padding:7px 11px;border:1px solid transparent;border-bottom:0;border-radius:8px 8px 0 0;background:transparent;color:inherit;font-size:10px;font-weight:800;cursor:pointer}
.asset-editor-tabs button.active{border-color:var(--border-color,#39404c);background:var(--page-bg,#111318);color:var(--accent-color,#d99a2b)}
.asset-editor-tabs button:disabled{opacity:.45;cursor:not-allowed}
.asset-editor-shop-section{margin-top:14px;padding-top:12px;border-top:1px solid var(--border-color,#39404c)}

/* Patch 125 - palette e texture intrinseche alla Skin. */
.theme-texture-editor{display:flex;align-items:center;gap:8px;flex-wrap:wrap;padding:8px;border:1px solid var(--border-color,#39404c);border-radius:8px;background:var(--panel-bg,#171a20)}
.theme-texture-preview{width:64px;height:48px;border:1px solid var(--border-color,#39404c);border-radius:6px;background-color:#ffe77a;background-size:cover;background-position:center;display:inline-block}
.theme-style-grid label>span{display:inline-flex;align-items:center;gap:4px;font-size:9px;color:var(--muted-text,#98a2b3);font-weight:600}
.theme-style-grid label>.mini-button{margin-top:4px;width:100%}

/* Patch 126 · gestione asset unificata, lifecycle Shop e impostazioni lavagna. */
.theme-page-heading{display:flex;align-items:flex-end;justify-content:space-between;gap:14px;}
.catalog-activatable-switch{display:inline-flex;align-items:center;gap:7px;flex:0 0 auto;padding:7px 10px;border:1px solid #d8dee7;border-radius:999px;background:#fff;color:#4f5d6d;font-size:9px;font-weight:800;white-space:nowrap;cursor:pointer;}
.catalog-activatable-switch input{margin:0;}
.catalog-activatable-switch.compact{padding:6px 9px;border-radius:8px;}

/* Le tab interne agli editor asset devono restare scure indipendentemente dalla Skin applicata. */
.asset-editor-tabs{background:#171a20!important;border-bottom-color:#303744!important;color:#d7dde6!important;}
.asset-editor-tabs button{color:#bfc7d2!important;}
.asset-editor-tabs button:hover:not(:disabled){background:#222730!important;color:#fff!important;}
.asset-editor-tabs button.active{border-color:#3b4350!important;background:#0f1217!important;color:#e0a233!important;}

.theme-editor-settings-wide{width:100%;max-width:1180px;margin:0 auto;}
.theme-editor-settings-wide .theme-live-preview{min-height:150px;}
@media(min-width:1080px){
    .theme-editor-settings-wide .theme-style-grid{grid-template-columns:repeat(3,minmax(0,1fr));}
}

/* Editor Effetti: due blocchi stabili, senza salti di layout passando a fullscreen. */
.effect-config-groups{grid-template-columns:repeat(2,minmax(0,1fr));align-items:start;}
.effect-randomization-group,.effect-preview-group{grid-column:1/-1;}
@media(max-width:1050px){.effect-config-groups{grid-template-columns:1fr;}.effect-randomization-group,.effect-preview-group{grid-column:auto;}}

.catalog-lifecycle-banner{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin:0 0 10px;padding:8px 10px;border:1px solid #b8d9c1;border-radius:8px;background:#eef8f1;color:#2f6540;}
.catalog-lifecycle-banner strong{font-size:10px;}
.catalog-lifecycle-banner small{font-size:8px;line-height:1.35;text-align:right;}
.catalog-lifecycle-banner.blocked{border-color:#e5b4b4;background:#fff1f1;color:#8a3838;}
.catalog-lifecycle-banner.scheduled{border-color:#e8ca91;background:#fff8e9;color:#8a6116;}
.content-catalog-object-badge.blocked{border:1px solid #e5b4b4;background:#fff1f1;color:#8a3838;}
.content-catalog-object-badge.scheduled{border:1px solid #e8ca91;background:#fff8e9;color:#8a6116;}

.board-settings-tabs{grid-template-columns:repeat(11,minmax(0,1fr));}
.board-settings-heading-actions{display:flex;align-items:center;justify-content:flex-end;gap:8px;flex-wrap:wrap;}
.board-settings-heading-actions>b{padding:4px 8px;border:1px solid #dbe2ea;border-radius:999px;background:#f7f9fb;color:#526173;font-size:10px;}
.board-settings-report-heading{margin-top:4px;}
.board-settings-product-card.not-owned .board-settings-product-preview,.board-settings-shop-tool.not-owned .tool-catalog-icon,.board-settings-shop-background.not-owned>img,.board-settings-shop-background.not-owned>.background-preview{filter:grayscale(1);opacity:.58;transition:filter .15s ease,opacity .15s ease;}
.board-settings-product-card.not-owned:hover .board-settings-product-preview,.board-settings-shop-tool.not-owned:hover .tool-catalog-icon,.board-settings-shop-background.not-owned:hover>img,.board-settings-shop-background.not-owned:hover>.background-preview{filter:grayscale(0);opacity:1;}
.board-settings-skin-card.not-owned:hover .board-settings-skin-miniature{filter:grayscale(0);}
.board-settings-shop-tool{position:relative;display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:8px;padding-right:8px;}
.board-settings-shop-tool-main{border:0!important;background:transparent!important;cursor:default!important;}
.board-settings-shop-tool>button{white-space:nowrap;}
.board-settings-shop-background.not-owned{border-style:dashed;}
.board-settings-bundle-actions{display:flex;gap:5px;align-self:end;}
.board-settings-bundle-actions>*{flex:1;}
.board-settings-bundle-preview-button{width:100%;padding:0;cursor:pointer;}
/* Nested bundle detail sits above the admin settings backdrop (30000). */
.board-settings-bundle-detail-backdrop{z-index:30100;}
.board-settings-bundle-detail-modal{width:min(820px,94vw);max-height:min(760px,92vh);}
.board-settings-bundle-component-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;}
.board-settings-bundle-component{display:grid;grid-template-columns:44px minmax(0,1fr) auto;align-items:center;gap:8px;padding:8px;border:1px solid #dfe5ec;border-radius:8px;background:#fff;}
.board-settings-bundle-component.available{border-color:#b9dcc7;background:#f5fbf7;}
.board-settings-bundle-component-preview{display:grid;place-items:center;width:42px;height:42px;border:1px solid #dfe5ec;border-radius:7px;background:#f5f7f9;overflow:hidden;}
.board-settings-bundle-component-preview img,.board-settings-bundle-component-preview i{display:block;width:100%;height:100%;object-fit:contain;}
.board-settings-bundle-component>span:nth-child(2){display:grid;min-width:0;gap:2px;}
.board-settings-bundle-component>span:nth-child(2) strong,.board-settings-bundle-component>span:nth-child(2) small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.board-settings-bundle-component>span:nth-child(2) small{font-size:8px;color:#748091;}
.board-settings-bundle-component em{font-size:8px;font-style:normal;font-weight:800;color:#557163;white-space:nowrap;}

.catalog-shop-card.not-owned .catalog-shop-preview{filter:grayscale(1);opacity:.62;transition:filter .15s ease,opacity .15s ease;}
.catalog-shop-card.not-owned:hover .catalog-shop-preview{filter:grayscale(0);opacity:1;}

@media(max-width:1100px){.board-settings-tabs{grid-template-columns:repeat(6,minmax(0,1fr));}}
@media(max-width:760px){.theme-page-heading{align-items:stretch;flex-direction:column;}.catalog-activatable-switch{align-self:flex-start;}.board-settings-tabs{grid-template-columns:repeat(3,minmax(0,1fr));}.board-settings-bundle-component-grid{grid-template-columns:1fr;}}

/* Patch 127 · editor Asset/Catalogo: layout effetti, resize stabile e tab coerenti con il tema chiaro. */
.asset-editor-tabs {
    display:flex;
    gap:3px;
    padding:0 14px !important;
    border-bottom:1px solid #e6e9ee !important;
    background:#fafbfc !important;
    color:#364152 !important;
}
.asset-editor-tabs button {
    padding:9px 11px !important;
    border:0 !important;
    border-bottom:3px solid transparent !important;
    border-radius:0 !important;
    background:transparent !important;
    color:#566273 !important;
    font-size:10px;
    font-weight:800;
}
.asset-editor-tabs button:hover:not(:disabled) {
    background:#f1f4f7 !important;
    color:#273444 !important;
}
.asset-editor-tabs button.active {
    border-color:#4f8bd8 !important;
    background:#fff !important;
    color:#245f9f !important;
}
.asset-editor-tabs button:disabled { color:#9aa4b2 !important; }

/* La modale di libreria non si chiude più quando il drag del resize termina sul backdrop. */
.asset-editor-backdrop { cursor:default; }
.asset-library-editor-modal { min-width:min(620px,calc(100vw - 24px)); }

/* Revisioni: chip e azione restano sulla stessa riga; nessuna riga dedicata al solo pulsante Revisiona. */
.asset-revision-toolbar {
    display:flex;
    align-items:center;
    gap:8px;
    margin:7px 0 10px;
    min-width:0;
}
.asset-revision-chips {
    flex:1 1 auto;
    min-width:0;
    margin:0;
}
.asset-revision-button {
    flex:0 0 auto;
    white-space:nowrap;
}
.asset-editor-footer { padding:7px 12px; }

/* Effetti: l'editor usa realmente tutta la larghezza della modale e non dipende dal numero di colonne del form generale. */
.effect-asset-form > .span-2,
.effect-asset-form > .effect-config-groups {
    grid-column:1 / -1 !important;
}
.effect-asset-form > label.span-2 { max-width:none; }
.effect-asset-form .effect-config-groups {
    width:100%;
    min-width:0;
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:12px;
    align-items:start;
}
.effect-asset-form .effect-config-group {
    min-width:0;
    padding:12px;
}
.effect-asset-form .effect-movement-group,
.effect-asset-form .effect-randomization-group,
.effect-asset-form .effect-preview-group {
    grid-column:1 / -1;
}
.effect-asset-form .effect-config-grid {
    grid-template-columns:repeat(auto-fit,minmax(190px,1fr));
    gap:10px 14px;
}
.effect-asset-form .effect-movement-group .effect-config-grid {
    grid-template-columns:repeat(3,minmax(0,1fr));
}
.effect-asset-form .effect-random-grid {
    grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
    gap:9px;
}
.effect-asset-form .effect-config-grid > label,
.effect-asset-form .effect-random-setting,
.effect-asset-form .effect-palette-editor {
    min-width:0;
}
.effect-asset-form .effect-config-group select,
.effect-asset-form .effect-config-group input[type="range"],
.effect-asset-form .effect-config-group input[type="number"] {
    width:100%;
    min-width:0;
    box-sizing:border-box;
}
.effect-asset-form .effect-palette-head {
    align-items:flex-start;
}
.effect-asset-form .effect-palette-head small {
    max-width:360px;
    line-height:1.35;
    text-align:right;
}
.effect-asset-form .effect-preview-group .effect-preview {
    min-height:140px;
}

@media(max-width:900px) {
    .effect-asset-form .effect-config-groups { grid-template-columns:1fr; }
    .effect-asset-form .effect-behavior-group,
    .effect-asset-form .effect-appearance-group,
    .effect-asset-form .effect-movement-group,
    .effect-asset-form .effect-randomization-group,
    .effect-asset-form .effect-preview-group { grid-column:auto; }
    .effect-asset-form .effect-movement-group .effect-config-grid { grid-template-columns:1fr; }
    .asset-revision-toolbar { align-items:flex-start; flex-wrap:wrap; }
}

/* Patch 128 - PWA install */
.pwa-install-button {
    display:none;
    width:100%;
    margin-top:12px;
    align-items:center;
    gap:12px;
    min-height:54px;
    padding:9px 13px;
    border:1px solid #d7c063;
    border-radius:10px;
    background:#fff9dc;
    color:#303540;
    text-align:left;
    cursor:pointer;
}
html.pwa-install-available .pwa-install-button { display:flex; }
.pwa-install-button:hover { border-color:#b99d31; background:#fff5c1; }
.pwa-install-button .pwa-install-icon {
    flex:0 0 30px;
    width:30px;
    height:30px;
    display:grid;
    place-items:center;
    border-radius:7px;
    background:#ffdf68;
    font-size:18px;
    font-weight:900;
}
.pwa-install-button > span:last-child { display:flex; flex-direction:column; gap:2px; }
.pwa-install-button strong { font-size:12px; }
.pwa-install-button small { color:#6d7888; font-size:10px; }
html.pwa-standalone .pwa-install-button { display:none !important; }

/* Patch 129 - PWA install sempre visibile fuori dalla modalità standalone */
.pwa-install-button[hidden] { display:none !important; }
.pwa-install-button:not([hidden]) { display:flex; }
.pwa-install-button.ready { border-color:#b99d31; box-shadow:0 0 0 2px rgba(185,157,49,.12); }
.pwa-install-status { min-height:14px; margin-top:6px; color:#667085; font-size:10px; line-height:1.35; }
.pwa-install-status.error { color:#b42318; }
html.pwa-standalone .pwa-install-status { display:none; }

/* Patch 130 - installazione PWA disponibile anche dopo il login */
.account-menu-install {
    width:100%; display:flex; align-items:center; gap:8px; padding:8px 9px; border:0; border-radius:8px;
    background:transparent; color:#26303d; text-align:left; cursor:pointer; font:inherit;
}
.account-menu-install:hover { background:#f3f6f9; }
.account-menu-install > span:first-child { width:18px; text-align:center; font-size:14px; font-weight:900; color:#315d9b; }
.account-menu-install > span:last-child { display:flex; flex-direction:column; min-width:0; }
.account-menu-install strong { font-size:11px; }
.account-menu-install small { color:#778291; font-size:8px; font-weight:500; }
.board-flyout-install {
    width:100%; display:block; padding:8px 9px; border:0; border-radius:7px; background:transparent;
    color:#26303d; text-align:left; font-size:12px; cursor:pointer;
}
.board-flyout-install:hover { background:#edf0f4; }
.pwa-install-status-menu { min-height:0; margin:2px 9px 4px; font-size:8px; }
html.pwa-standalone .pwa-install-action { display:none !important; }


/* ============================================================
   Patch 131 - autosave impostazioni lavagna + zoom PWA standalone
   ============================================================ */
.board-viewport { background:var(--theme-board-color,#98704c); }

/* In modalità PWA Chromium usa transform per evitare il bordo scoperto
   prodotto dalla combinazione percentuali inverse + CSS zoom. */
html.pwa-standalone .postit-board-canvas {
    zoom:1 !important;
    transform:scale(var(--board-zoom,1));
    transform-origin:top left;
}

