/* ================================================================
   Activity library windows — one modern look for all (Oct 2026)
   Aura Tools, Match Mind, Insight Wall, Jigsaw, Live Poll, Sketch Solve,
   Fast Response, Interactive Sheets, and any activity window that has a
   "Create" button. Loaded after the themes; :is(#id…) gives ID weight so
   theme rules (which also name these IDs) do not win.
   ================================================================ */

/* window */
html body :is(#auraModal, #mm-dash-ov, #iw-dash-ov, #jigsaw-dash-ov, #pl-dash-ov, #ss-dash-ov, #ssv2-dash-ov, #fr-dash-ov, #isModal, .custom-modal-overlay:has(.btn-create-modern)) .premium-modal-box.premium-modal-box {
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%) !important;
    color: #0f172a !important;
    border: 1px solid rgba(15, 23, 42, .08) !important;
    border-radius: 28px !important;
    box-shadow: 0 40px 90px rgba(15, 23, 42, .35) !important;
    font-family: 'Outfit', 'Inter', 'Cairo', sans-serif !important;
}
html body :is(#auraModal, #mm-dash-ov, #iw-dash-ov, #jigsaw-dash-ov, #pl-dash-ov, #ss-dash-ov, #ssv2-dash-ov, #fr-dash-ov, #isModal, .custom-modal-overlay:has(.btn-create-modern)) .premium-modal-box::before { display: none !important; }

/* header */
html body :is(#auraModal, #mm-dash-ov, #iw-dash-ov, #jigsaw-dash-ov, #pl-dash-ov, #ss-dash-ov, #ssv2-dash-ov, #fr-dash-ov, #isModal, .custom-modal-overlay:has(.btn-create-modern)) .modal-header-modern { border-bottom: 1px solid #eef2f7 !important; }
html body :is(#auraModal, #mm-dash-ov, #iw-dash-ov, #jigsaw-dash-ov, #pl-dash-ov, #ss-dash-ov, #ssv2-dash-ov, #fr-dash-ov, #isModal, .custom-modal-overlay:has(.btn-create-modern)) .modal-title-text.modal-title-text {
    color: #0f172a !important; -webkit-text-fill-color: #0f172a !important;
    font-weight: 800 !important; letter-spacing: -.01em; display: inline-flex; align-items: center; gap: 12px;
}
html body :is(#auraModal, #mm-dash-ov, #iw-dash-ov, #jigsaw-dash-ov, #pl-dash-ov, #ss-dash-ov, #ssv2-dash-ov, #fr-dash-ov, #isModal, .custom-modal-overlay:has(.btn-create-modern)) .modal-title-text.modal-title-text > i:first-child {
    width: 40px; height: 40px; border-radius: 13px; display: inline-grid; place-items: center; font-size: 17px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6) !important; color: #fff !important; -webkit-text-fill-color: #fff !important;
    box-shadow: 0 8px 18px -6px rgba(99, 102, 241, .55);
}
html body :is(#auraModal, #mm-dash-ov, #iw-dash-ov, #jigsaw-dash-ov, #pl-dash-ov, #ss-dash-ov, #ssv2-dash-ov, #fr-dash-ov, #isModal, .custom-modal-overlay:has(.btn-create-modern)) .close-btn-modern {
    background: #f1f5f9 !important; color: #334155 !important; border: none !important; border-radius: 14px !important;
}
html body :is(#auraModal, #mm-dash-ov, #iw-dash-ov, #jigsaw-dash-ov, #pl-dash-ov, #ss-dash-ov, #ssv2-dash-ov, #fr-dash-ov, #isModal, .custom-modal-overlay:has(.btn-create-modern)) .close-btn-modern:hover { background: #fee2e2 !important; color: #dc2626 !important; }
html body :is(#auraModal, #mm-dash-ov, #iw-dash-ov, #jigsaw-dash-ov, #pl-dash-ov, #ss-dash-ov, #ssv2-dash-ov, #fr-dash-ov, #isModal, .custom-modal-overlay:has(.btn-create-modern)) .btn-create-modern {
    background: linear-gradient(135deg, #585ce8, #4f46e5) !important; color: #fff !important; -webkit-text-fill-color: #fff !important;
    border: none !important; border-radius: 14px !important; font-weight: 800 !important;
    box-shadow: 0 10px 22px -10px rgba(79, 70, 229, .7) !important;
}
html body :is(#auraModal, #mm-dash-ov, #iw-dash-ov, #jigsaw-dash-ov, #pl-dash-ov, #ss-dash-ov, #ssv2-dash-ov, #fr-dash-ov, #isModal, .custom-modal-overlay:has(.btn-create-modern)) .btn-create-modern i { color: #fff !important; -webkit-text-fill-color: #fff !important; }

/* tabs (Aura Tools) */
html body #auraModal .aura-modal-tabs {
    display: inline-flex !important; gap: 4px !important; padding: 5px !important; margin: 4px 0 6px !important;
    background: #f1f5f9 !important; border-radius: 16px !important; border: none !important;
}
html body #auraModal .aura-tab {
    border: none !important; border-radius: 12px !important; padding: 9px 16px !important;
    background: transparent !important; color: #475569 !important; -webkit-text-fill-color: #475569 !important;
    font-weight: 700 !important; box-shadow: none !important;
}
html body #auraModal .aura-tab.active {
    background: #fff !important; color: #4338ca !important; -webkit-text-fill-color: #4338ca !important;
    box-shadow: 0 2px 8px rgba(15, 23, 42, .08) !important;
}
html body #auraModal .aura-tab.active::after { display: none !important; }

/* inputs */
html body :is(#auraModal, #mm-dash-ov, #iw-dash-ov, #jigsaw-dash-ov, #pl-dash-ov, #ss-dash-ov, #ssv2-dash-ov, #fr-dash-ov, #isModal, .custom-modal-overlay:has(.btn-create-modern)) :is(.input-modern, input[type="text"], input[type="search"], textarea) {
    background: #fff !important; color: #0f172a !important; -webkit-text-fill-color: #0f172a !important;
    border: 1px solid #e2e8f0 !important; border-radius: 12px !important; box-shadow: 0 1px 2px rgba(15, 23, 42, .04) !important;
}
html body :is(#auraModal, #mm-dash-ov, #iw-dash-ov, #jigsaw-dash-ov, #pl-dash-ov, #ss-dash-ov, #ssv2-dash-ov, #fr-dash-ov, #isModal, .custom-modal-overlay:has(.btn-create-modern)) :is(.input-modern, input[type="text"], input[type="search"], textarea):focus {
    border-color: #6366f1 !important; box-shadow: 0 0 0 4px rgba(99, 102, 241, .12) !important; outline: none !important;
}
html body :is(#auraModal, #mm-dash-ov, #iw-dash-ov, #jigsaw-dash-ov, #pl-dash-ov, #ss-dash-ov, #ssv2-dash-ov, #fr-dash-ov, #isModal) :is(input, textarea)::placeholder { color: #94a3b8 !important; -webkit-text-fill-color: #94a3b8 !important; }
html body :is(#auraModal, #mm-dash-ov, #iw-dash-ov, #jigsaw-dash-ov, #pl-dash-ov, #ss-dash-ov, #ssv2-dash-ov, #fr-dash-ov, #isModal) :is(label, .label-modern) { color: #334155 !important; -webkit-text-fill-color: #334155 !important; }

/* cards */
html body :is(#auraModal, #mm-dash-ov, #iw-dash-ov, #jigsaw-dash-ov, #pl-dash-ov, #ss-dash-ov, #ssv2-dash-ov, #fr-dash-ov, #isModal, .custom-modal-overlay:has(.btn-create-modern)) :is(.aura-quiz-card, .mm-act-card, .jigsaw-card, .pl-card, .ss-card, .is-card, .fr-card) {
    --c: 245;
    position: relative; overflow: hidden;
    background: #ffffff !important; color: #0f172a !important;
    border: 1px solid #e8edf5 !important; border-radius: 22px !important;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 12px 28px -18px rgba(15, 23, 42, .28) !important;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s !important;
}
html body :is(#auraModal, #mm-dash-ov, #iw-dash-ov, #jigsaw-dash-ov, #pl-dash-ov, #ss-dash-ov, #ssv2-dash-ov, #fr-dash-ov, #isModal, .custom-modal-overlay:has(.btn-create-modern)) :is(.aura-quiz-card, .mm-act-card, .jigsaw-card, .pl-card, .ss-card, .is-card, .fr-card)::before {
    content: ''; position: absolute; left: 0; right: 0; top: 0; height: 5px;
    background: linear-gradient(90deg, hsl(var(--c) 85% 62%), hsl(calc(var(--c) + 40) 85% 62%));
}
html body :is(#auraModal, #mm-dash-ov, #iw-dash-ov, #jigsaw-dash-ov, #pl-dash-ov, #ss-dash-ov, #ssv2-dash-ov, #fr-dash-ov, #isModal, .custom-modal-overlay:has(.btn-create-modern)) :is(.aura-quiz-card, .mm-act-card, .jigsaw-card, .pl-card, .ss-card, .is-card, .fr-card):hover {
    transform: translateY(-4px) !important; border-color: hsl(var(--c) 80% 85%) !important;
    box-shadow: 0 20px 40px -18px hsl(var(--c) 60% 40% / .45) !important;
}
/* card text */
html body :is(#auraModal, #mm-dash-ov, #iw-dash-ov, #jigsaw-dash-ov, #pl-dash-ov, #ss-dash-ov, #ssv2-dash-ov, #fr-dash-ov, #isModal, .custom-modal-overlay:has(.btn-create-modern)) :is(.aura-quiz-card, .mm-act-card, .jigsaw-card, .pl-card, .ss-card, .is-card, .fr-card) :is(h3, h4, .pl-card-title, .mm-act-info b, .mm-act-info strong) {
    color: #0f172a !important; -webkit-text-fill-color: #0f172a !important; font-weight: 800 !important;
}
html body :is(#auraModal, #mm-dash-ov, #iw-dash-ov, #jigsaw-dash-ov, #pl-dash-ov, #ss-dash-ov, #ssv2-dash-ov, #fr-dash-ov, #isModal, .custom-modal-overlay:has(.btn-create-modern)) :is(.aura-quiz-card, .mm-act-card, .jigsaw-card, .pl-card, .ss-card, .is-card, .fr-card) :is(h4 + span, .jigsaw-card-info span, .ss-card-info span, .mm-act-info span, .pl-card-q, p, small) {
    color: #64748b !important; -webkit-text-fill-color: #64748b !important; opacity: 1 !important;
}
html body :is(#auraModal, #mm-dash-ov, #iw-dash-ov, #jigsaw-dash-ov, #pl-dash-ov, #ss-dash-ov, #ssv2-dash-ov, #fr-dash-ov, #isModal, .custom-modal-overlay:has(.btn-create-modern)) .mm-act-icon {
    background: linear-gradient(135deg, hsl(var(--c) 85% 62%), hsl(calc(var(--c) + 30) 80% 55%)) !important; color: #fff !important; border-radius: 14px !important;
}
html body :is(#pl-dash-ov) .pl-tag { background: #eef2ff !important; color: #4338ca !important; -webkit-text-fill-color: #4338ca !important; border: none !important; }

/* card buttons: secondary chips by default */
html body :is(#auraModal, #mm-dash-ov, #iw-dash-ov, #jigsaw-dash-ov, #pl-dash-ov, #ss-dash-ov, #ssv2-dash-ov, #fr-dash-ov, #isModal, .custom-modal-overlay:has(.btn-create-modern)) :is(.aura-quiz-card, .mm-act-card, .jigsaw-card, .pl-card, .ss-card, .is-card, .fr-card) button {
    background: #f1f5f9 !important; color: #334155 !important; -webkit-text-fill-color: #334155 !important;
    border: 1px solid #e2e8f0 !important; border-radius: 12px !important; box-shadow: none !important;
    font-weight: 700 !important; transition: background .15s, color .15s, transform .12s, border-color .15s !important;
}
html body :is(#auraModal, #mm-dash-ov, #iw-dash-ov, #jigsaw-dash-ov, #pl-dash-ov, #ss-dash-ov, #ssv2-dash-ov, #fr-dash-ov, #isModal, .custom-modal-overlay:has(.btn-create-modern)) :is(.aura-quiz-card, .mm-act-card, .jigsaw-card, .pl-card, .ss-card, .is-card, .fr-card) button:hover { background: #eef2ff !important; border-color: #c7d2fe !important; color: #4338ca !important; -webkit-text-fill-color: #4338ca !important; }
html body :is(#auraModal, #mm-dash-ov, #iw-dash-ov, #jigsaw-dash-ov, #pl-dash-ov, #ss-dash-ov, #ssv2-dash-ov, #fr-dash-ov, #isModal, .custom-modal-overlay:has(.btn-create-modern)) :is(.aura-quiz-card, .mm-act-card, .jigsaw-card, .pl-card, .ss-card, .is-card, .fr-card) button:active { transform: scale(.96) !important; }
html body :is(#auraModal, #mm-dash-ov, #iw-dash-ov, #jigsaw-dash-ov, #pl-dash-ov, #ss-dash-ov, #ssv2-dash-ov, #fr-dash-ov, #isModal, .custom-modal-overlay:has(.btn-create-modern)) :is(.aura-quiz-card, .mm-act-card, .jigsaw-card, .pl-card, .ss-card, .is-card, .fr-card) button i { -webkit-text-fill-color: currentColor !important; }
/* primary: Play / Launch */
html body :is(#auraModal, #mm-dash-ov, #iw-dash-ov, #jigsaw-dash-ov, #pl-dash-ov, #ss-dash-ov, #ssv2-dash-ov, #fr-dash-ov, #isModal, .custom-modal-overlay:has(.btn-create-modern)) :is(.btn-quest, .jigsaw-btn.primary, .pl-btn.primary, .ss-btn.primary, .mm-btn.launch, .fr-btn.primary) {
    background: linear-gradient(135deg, #585ce8, #4f46e5) !important; color: #fff !important; -webkit-text-fill-color: #fff !important;
    border: none !important; box-shadow: 0 10px 20px -10px rgba(79, 70, 229, .75) !important;
}
html body :is(#auraModal, #mm-dash-ov, #iw-dash-ov, #jigsaw-dash-ov, #pl-dash-ov, #ss-dash-ov, #ssv2-dash-ov, #fr-dash-ov, #isModal, .custom-modal-overlay:has(.btn-create-modern)) :is(.btn-quest, .jigsaw-btn.primary, .pl-btn.primary, .ss-btn.primary, .mm-btn.launch, .fr-btn.primary):hover { filter: brightness(1.07); color: #fff !important; -webkit-text-fill-color: #fff !important; }
/* share: green tint */
html body :is(#auraModal) .btn-share { background: #ecfdf5 !important; color: #047857 !important; -webkit-text-fill-color: #047857 !important; border-color: #a7f3d0 !important; }
/* delete: red tint */
html body :is(#auraModal, #mm-dash-ov, #iw-dash-ov, #jigsaw-dash-ov, #pl-dash-ov, #ss-dash-ov, #ssv2-dash-ov, #fr-dash-ov, #isModal, .custom-modal-overlay:has(.btn-create-modern)) :is(.pl-btn.danger, .ss-btn.danger, .mm-btn.del, .jigsaw-btn.danger) { background: #fef2f2 !important; color: #dc2626 !important; -webkit-text-fill-color: #dc2626 !important; border-color: #fecaca !important; }

/* empty states / scroll area */
html body :is(#auraModal, #mm-dash-ov, #iw-dash-ov, #jigsaw-dash-ov, #pl-dash-ov, #ss-dash-ov, #ssv2-dash-ov, #fr-dash-ov, #isModal) .notif-empty { color: #64748b !important; }


/* ---------- every card looks the same: one accent, same height, buttons at the bottom ---------- */
html body :is(#auraModal, #mm-dash-ov, #iw-dash-ov, #jigsaw-dash-ov, #pl-dash-ov, #ss-dash-ov, #ssv2-dash-ov, #fr-dash-ov, #isModal, .custom-modal-overlay:has(.btn-create-modern)) :is(.aura-quiz-grid, .jigsaw-grid, .pl-grid, .ss-grid) { align-items: stretch !important; grid-auto-rows: 1fr; }
html body :is(#auraModal, #jigsaw-dash-ov, #pl-dash-ov, #ss-dash-ov, #ssv2-dash-ov, #fr-dash-ov, #isModal, .custom-modal-overlay:has(.btn-create-modern)) :is(.aura-quiz-card, .jigsaw-card, .pl-card, .ss-card, .is-card, .fr-card) {
    display: flex !important; flex-direction: column !important; height: 100% !important; min-height: 196px;
}
/* buttons always sit at the bottom */
html body #auraModal .aura-quiz-card > .actions,
html body :is(#jigsaw-dash-ov) .jigsaw-card > :last-child,
html body :is(#ss-dash-ov, #ssv2-dash-ov) .ss-card > :last-child,
html body #pl-dash-ov .pl-card-actions { margin-top: auto !important; padding-top: 12px; }
/* titles: two lines max, subject one line — no card grows taller than the others */
html body :is(#auraModal, #jigsaw-dash-ov, #pl-dash-ov, #ss-dash-ov, #ssv2-dash-ov, #fr-dash-ov, #isModal) :is(.aura-quiz-card, .jigsaw-card, .pl-card, .ss-card, .is-card, .fr-card) :is(h3, h4, .pl-card-title) {
    display: -webkit-box !important; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden;
    line-height: 1.3 !important; min-height: 2.6em; margin-bottom: 4px !important; padding-inline-end: 64px;
}
html body :is(#auraModal) .aura-quiz-card h4 + span,
html body :is(#jigsaw-dash-ov) .jigsaw-card-info span,
html body :is(#ss-dash-ov, #ssv2-dash-ov) .ss-card-info span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Aura actions: Play / Share / Publish in one row, To Slide full width under them */
html body #auraModal .aura-quiz-card > .actions { display: grid !important; grid-template-columns: repeat(3, 1fr); gap: 6px !important; }
html body #auraModal .aura-quiz-card > .actions > button { width: 100% !important; justify-content: center; min-height: 38px; }
html body #auraModal .aura-quiz-card > .actions > button:nth-child(n+4) { grid-column: 1 / -1; }
/* the small edit / delete buttons: same round shape on every card */
html body #auraModal .aura-quiz-card > div:first-child button { width: 30px !important; height: 30px !important; border-radius: 10px !important; padding: 0 !important; }

/* ================================================================
   ONE CARD LAYOUT FOR EVERY ACTIVITY — modelled on the Aura Quiz card
   (title, one subtitle line, Launch first + a 3-column action row,
   edit / delete as small round buttons in the corner)
   ================================================================ */

/* grids: Match Mind / Insight Wall used full-width list rows */
html body :is(#mm-dash-ov, #iw-dash-ov) .premium-modal-box :has(> .mm-act-card) {
    display: grid !important; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)) !important;
    gap: 16px !important; align-items: stretch !important; grid-auto-rows: 1fr;
}
html #ss3t-dash .ss3t-cards { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)) !important; gap: 16px !important; grid-auto-rows: 1fr; }

/* Sketch Solve V3 window: same white window as the others */
html #ss3t-dash .ss3t-panel {
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%) !important; color: #0f172a !important;
    border: 1px solid rgba(15, 23, 42, .08) !important; border-radius: 28px !important;
    box-shadow: 0 40px 90px rgba(15, 23, 42, .35) !important; font-family: 'Outfit', 'Inter', 'Cairo', sans-serif !important;
}
html #ss3t-dash .ss3t-panel-h { border-bottom: 1px solid #eef2f7 !important; }
html #ss3t-dash .ss3t-panel-h h2 { color: #0f172a !important; -webkit-text-fill-color: #0f172a !important; font-weight: 800 !important; }
html #ss3t-dash .ss3t-panel-h p { color: #64748b !important; -webkit-text-fill-color: #64748b !important; }
html #ss3t-dash .ss3t-logo { background: linear-gradient(135deg, #6366f1, #8b5cf6) !important; color: #fff !important; border-radius: 13px !important; }
html #ss3t-dash .ss3t-search { background: #fff !important; border: 1px solid #e2e8f0 !important; color: #64748b !important; border-radius: 12px !important; }
html #ss3t-dash .ss3t-search input { color: #0f172a !important; -webkit-text-fill-color: #0f172a !important; }
html #ss3t-dash #ss3t-new { background: linear-gradient(135deg, #585ce8, #4f46e5) !important; color: #fff !important; border-radius: 14px !important; border: none !important; }
html #ss3t-dash .ss3t-x { background: #f1f5f9 !important; color: #334155 !important; border-radius: 14px !important; }

/* the card shell */
html :is(#mm-dash-ov, #iw-dash-ov, #jigsaw-dash-ov, #pl-dash-ov, #ss-dash-ov, #ssv2-dash-ov, #ss3t-dash) :is(.mm-act-card, .jigsaw-card, .ss-card, .pl-card, .ss3t-task) {
    position: relative !important; display: flex !important; flex-direction: column !important; align-items: stretch !important;
    gap: 0 !important; height: 100% !important; min-height: 196px; padding: 22px 18px 16px !important; overflow: hidden;
    background: #fff !important; color: #0f172a !important; border: 1px solid #e8edf5 !important; border-radius: 22px !important;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 12px 28px -18px rgba(15, 23, 42, .28) !important;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s !important;
}
html :is(#mm-dash-ov, #iw-dash-ov, #jigsaw-dash-ov, #pl-dash-ov, #ss-dash-ov, #ssv2-dash-ov, #ss3t-dash) :is(.mm-act-card, .jigsaw-card, .ss-card, .pl-card, .ss3t-task)::before {
    content: ''; position: absolute; left: 0; right: 0; top: 0; height: 5px; background: linear-gradient(90deg, #6366f1, #a855f7);
}
html :is(#mm-dash-ov, #iw-dash-ov, #jigsaw-dash-ov, #pl-dash-ov, #ss-dash-ov, #ssv2-dash-ov, #ss3t-dash) :is(.mm-act-card, .jigsaw-card, .ss-card, .pl-card, .ss3t-task):hover {
    transform: translateY(-4px) !important; border-color: #c7d2fe !important; box-shadow: 0 20px 40px -18px rgba(79, 70, 229, .4) !important;
}

/* what Aura cards don't have: thumbnails, icon tiles, poll options/tags, chips */
html body :is(#mm-dash-ov, #iw-dash-ov) .mm-act-icon,
html body :is(#jigsaw-dash-ov, #ss-dash-ov, #ssv2-dash-ov) :is(.jigsaw-card, .ss-card) > img,
html body #pl-dash-ov :is(.pl-card-opts, .pl-card-tags, .pl-card-img),
html #ss3t-dash :is(.ss3t-task-thumb, .ss3t-chips) { display: none !important; }

/* title (2 lines) + one subtitle line */
html :is(#mm-dash-ov, #iw-dash-ov, #jigsaw-dash-ov, #pl-dash-ov, #ss-dash-ov, #ssv2-dash-ov, #ss3t-dash) :is(.mm-act-info, .jigsaw-card-info, .ss-card-info, .ss3t-task-body) { padding: 0 !important; margin: 0 !important; min-width: 0; flex: none !important; }
html :is(#mm-dash-ov, #iw-dash-ov, #jigsaw-dash-ov, #pl-dash-ov, #ss-dash-ov, #ssv2-dash-ov, #ss3t-dash) :is(.mm-act-card, .jigsaw-card, .ss-card, .pl-card, .ss3t-task) :is(h3, h4, .pl-card-title) {
    display: -webkit-box !important; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden;
    margin: 0 0 4px !important; padding-inline-end: 72px; min-height: 2.6em; line-height: 1.3 !important;
    font-size: 1.05rem !important; font-weight: 800 !important; color: #0f172a !important; -webkit-text-fill-color: #0f172a !important;
}
html :is(#mm-dash-ov, #iw-dash-ov, #jigsaw-dash-ov, #pl-dash-ov, #ss-dash-ov, #ssv2-dash-ov, #ss3t-dash) :is(.mm-act-info > span, .jigsaw-card-info > span, .ss-card-info > span, .pl-card-q, .ss3t-task-body > p) {
    display: block !important; white-space: nowrap !important; overflow: hidden !important; text-overflow: ellipsis !important;
    -webkit-line-clamp: unset !important; margin: 0 !important; font-size: .88rem !important;
    color: #64748b !important; -webkit-text-fill-color: #64748b !important; opacity: 1 !important;
}
html body #pl-dash-ov .pl-card-q .mt-math { display: inline !important; }

/* actions: pinned to the bottom, 3 equal columns, Launch first */
html body :is(#mm-dash-ov, #iw-dash-ov) .mm-act-btns,
html body :is(#jigsaw-dash-ov) .jigsaw-card > div:last-child,
html body :is(#ss-dash-ov, #ssv2-dash-ov) .ss-card > div:last-child,
html body #pl-dash-ov .pl-card-actions,
html #ss3t-dash .ss3t-task-acts {
    margin-top: auto !important; padding: 14px 0 0 !important;
    display: grid !important; grid-template-columns: repeat(3, 1fr) !important; gap: 6px !important;
    background: transparent !important; border: none !important;
}
html :is(#mm-dash-ov, #iw-dash-ov, #jigsaw-dash-ov, #pl-dash-ov, #ss-dash-ov, #ssv2-dash-ov, #ss3t-dash) :is(.mm-act-btns, .jigsaw-card > div:last-child, .ss-card > div:last-child, .pl-card-actions, .ss3t-task-acts) > button {
    width: 100% !important; min-width: 0 !important; min-height: 38px !important; height: auto !important; margin: 0 !important;
    display: inline-flex !important; align-items: center !important; justify-content: center !important; gap: 6px !important;
    padding: 0 8px !important; border-radius: 12px !important; font-size: .82rem !important; font-weight: 700 !important;
    white-space: nowrap !important; overflow: hidden; text-overflow: ellipsis;
    background: #f1f5f9 !important; color: #334155 !important; -webkit-text-fill-color: #334155 !important; border: 1px solid #e2e8f0 !important; box-shadow: none !important;
}
html :is(#mm-dash-ov, #iw-dash-ov, #jigsaw-dash-ov, #pl-dash-ov, #ss-dash-ov, #ssv2-dash-ov, #ss3t-dash) :is(.mm-act-btns, .jigsaw-card > div:last-child, .ss-card > div:last-child, .pl-card-actions, .ss3t-task-acts) > button:hover {
    background: #eef2ff !important; border-color: #c7d2fe !important; color: #4338ca !important; -webkit-text-fill-color: #4338ca !important;
}
/* Launch = the one purple button, always first */
html :is(#mm-dash-ov, #iw-dash-ov, #jigsaw-dash-ov, #pl-dash-ov, #ss-dash-ov, #ssv2-dash-ov, #ss3t-dash) :is(.mm-btn.launch, .jigsaw-btn.primary, .ss-btn.primary, .pl-btn.primary, .ss3t-btn-primary[data-a="launch"]) {
    order: -1; background: linear-gradient(135deg, #585ce8, #4f46e5) !important; color: #fff !important; -webkit-text-fill-color: #fff !important;
    border: none !important; box-shadow: 0 10px 20px -10px rgba(79, 70, 229, .75) !important;
}
html :is(#mm-dash-ov, #iw-dash-ov, #jigsaw-dash-ov, #pl-dash-ov, #ss-dash-ov, #ssv2-dash-ov, #ss3t-dash) :is(.mm-btn.launch, .jigsaw-btn.primary, .ss-btn.primary, .pl-btn.primary, .ss3t-btn-primary[data-a="launch"]):hover {
    filter: brightness(1.07); color: #fff !important; -webkit-text-fill-color: #fff !important;
}
html :is(#mm-dash-ov, #iw-dash-ov, #jigsaw-dash-ov, #pl-dash-ov, #ss-dash-ov, #ssv2-dash-ov, #ss3t-dash) button i { -webkit-text-fill-color: currentColor !important; }

/* edit + delete (+ Sketch V3 "more") move to the top-right corner as small round buttons */
html :is(#mm-dash-ov, #iw-dash-ov, #jigsaw-dash-ov, #pl-dash-ov, #ss-dash-ov, #ssv2-dash-ov, #ss3t-dash) :is(
    .mm-btn.edit, .mm-btn.del,
    .mm-act-btns > button[onclick*="openConfigurator"], .mm-act-btns > button[onclick*="delete"],
    .jigsaw-card > div:last-child > button[onclick*="openCreator"], .jigsaw-card > div:last-child > button:last-child,
    .ss-card > div:last-child > button[onclick*="openCreator"], .ss-btn.danger,
    .pl-btn[data-a="edit"], .pl-btn.danger,
    .ss3t-ib[data-a="edit"], .ss3t-ib[data-a="more"]) {
    position: absolute !important; top: 14px !important; width: 30px !important; height: 30px !important; min-height: 30px !important;
    padding: 0 !important; border-radius: 10px !important; font-size: 0 !important; gap: 0 !important; z-index: 2;
}
html :is(#mm-dash-ov, #iw-dash-ov, #jigsaw-dash-ov, #pl-dash-ov, #ss-dash-ov, #ssv2-dash-ov, #ss3t-dash) :is(
    .mm-btn.edit, .mm-act-btns > button[onclick*="openConfigurator"],
    .jigsaw-card > div:last-child > button[onclick*="openCreator"], .ss-card > div:last-child > button[onclick*="openCreator"],
    .pl-btn[data-a="edit"], .ss3t-ib[data-a="edit"]) { right: 50px !important; inset-inline-start: auto; }
html :is(#mm-dash-ov, #iw-dash-ov, #jigsaw-dash-ov, #pl-dash-ov, #ss-dash-ov, #ssv2-dash-ov, #ss3t-dash) :is(
    .mm-btn.del, .mm-act-btns > button[onclick*="delete"], .jigsaw-card > div:last-child > button:last-child,
    .ss-btn.danger, .pl-btn.danger, .ss3t-ib[data-a="more"]) { right: 14px !important; }
html :is(#mm-dash-ov, #iw-dash-ov, #jigsaw-dash-ov, #pl-dash-ov, #ss-dash-ov, #ssv2-dash-ov, #ss3t-dash) :is(
    .mm-btn.del, .mm-act-btns > button[onclick*="delete"], .jigsaw-card > div:last-child > button:last-child,
    .ss-btn.danger, .pl-btn.danger) { background: #fef2f2 !important; color: #dc2626 !important; -webkit-text-fill-color: #dc2626 !important; border-color: #fecaca !important; }
html :is(#mm-dash-ov, #iw-dash-ov, #jigsaw-dash-ov, #pl-dash-ov, #ss-dash-ov, #ssv2-dash-ov, #ss3t-dash) :is(
    .mm-btn.edit, .mm-btn.del, .mm-act-btns > button[onclick*="openConfigurator"], .mm-act-btns > button[onclick*="delete"],
    .jigsaw-card > div:last-child > button[onclick*="openCreator"], .jigsaw-card > div:last-child > button:last-child,
    .ss-card > div:last-child > button[onclick*="openCreator"], .ss-btn.danger, .pl-btn[data-a="edit"], .pl-btn.danger,
    .ss3t-ib[data-a="edit"], .ss3t-ib[data-a="more"]) i { font-size: .8rem !important; }

/* titles: two full lines (Sketch V3 forces one nowrap line) */
html :is(#mm-dash-ov, #iw-dash-ov, #jigsaw-dash-ov, #pl-dash-ov, #ss-dash-ov, #ssv2-dash-ov, #ss3t-dash) :is(.mm-act-card, .jigsaw-card, .ss-card, .pl-card, .ss3t-task) :is(h3, h4, .pl-card-title) {
    white-space: normal !important; text-overflow: clip !important; display: -webkit-box !important;
}
/* when only Launch + one more button are left, Launch takes two columns (like Aura's Play + Share/Publish) */
html :is(#mm-dash-ov, #iw-dash-ov, #jigsaw-dash-ov, #pl-dash-ov, #ss-dash-ov, #ssv2-dash-ov, #ss3t-dash) :is(.ss3t-task-acts, .pl-card-actions) > :is(.ss3t-btn-primary[data-a="launch"], .pl-btn.primary) { grid-column: span 2; }

/* Launch must beat the generic secondary-button rule (that one carries extra weight from :last-child) */
html :is(#mm-dash-ov, #iw-dash-ov, #jigsaw-dash-ov, #pl-dash-ov, #ss-dash-ov, #ssv2-dash-ov, #ss3t-dash) :is(.mm-btn.launch, .jigsaw-btn.primary, .ss-btn.primary, .pl-btn.primary, .ss3t-btn-primary[data-a="launch"]):not(#lf-none):not(#lf-none2) {
    background: linear-gradient(135deg, #585ce8, #4f46e5) !important; color: #fff !important; -webkit-text-fill-color: #fff !important;
    border: none !important; box-shadow: 0 10px 20px -10px rgba(79, 70, 229, .75) !important;
}

/* every "New …" / Create button is the same purple (some set their own colour inline) */
html :is(#auraModal, #mm-dash-ov, #iw-dash-ov, #jigsaw-dash-ov, #pl-dash-ov, #ss-dash-ov, #ssv2-dash-ov, #fr-dash-ov, #isModal, .custom-modal-overlay:has(.btn-create-modern)) .btn-create-modern:not(#lf-none):not(#lf-none2) {
    background: linear-gradient(135deg, #585ce8, #4f46e5) !important; color: #fff !important; -webkit-text-fill-color: #fff !important;
    border: none !important; box-shadow: 0 10px 22px -10px rgba(79, 70, 229, .7) !important;
}
