:root {
    --de-accent: #ff1d2d;
    --de-accent-rgb: 255, 29, 45;
    --de-bg: #080808;
    --de-panel: #111111;
    --de-border: rgba(255, 255, 255, .12);
}

body {
    --accent-blue: #ff1d2d;
    --accent-blue-rgb: 255, 29, 45;
}

/* The home screen uses one inexpensive gradient layer; cards animate only
   their transform and border so the panel stays responsive in Premiere. */
#devilishDashboard {
    position: fixed;
    inset: 0;
    z-index: 50000;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    color: #f7f7f7;
    background:
        radial-gradient(ellipse at 78% 0%, rgba(105, 0, 10, .34), transparent 42%),
        radial-gradient(ellipse at 6% 55%, rgba(65, 0, 6, .22), transparent 46%),
        var(--de-bg);
    font-family: "Segoe UI", Arial, sans-serif;
}

body.devilish-tool-open #devilishDashboard { display: none; }

.de-header {
    min-height: 62px;
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 9px 16px;
    border-bottom: 1px solid rgba(255, 29, 45, .42);
    background: linear-gradient(100deg, rgba(24, 24, 24, .98), rgba(8, 8, 8, .94));
    box-shadow: 0 5px 24px rgba(0, 0, 0, .4);
}

.de-logo-mark {
    width: 35px;
    height: 35px;
    flex: 0 0 35px;
    display: grid;
    place-items: center;
    color: var(--de-accent);
    border: 1px solid rgba(255, 29, 45, .7);
    border-radius: 8px;
    background: #090909;
    box-shadow: 0 0 17px rgba(var(--de-accent-rgb), .15);
}

.de-logo-mark svg { width: 26px; height: 26px; }
.de-brand { min-width: 0; flex: 1; }
.de-brand-name { font-size: 19px; line-height: 1.1; font-weight: 750; letter-spacing: -.35px; }
.de-brand-name em { color: var(--de-accent); font-style: normal; }
.de-brand-tagline { margin-top: 3px; color: #a5a5a5; font-size: 8px; letter-spacing: 2.4px; }

.de-header-action,
.de-version {
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, .13);
    border-radius: 18px;
    background: rgba(255, 255, 255, .045);
    color: #f5f5f5;
}

.de-header-action { width: 36px; padding: 0; cursor: pointer; }
.de-header-action:hover { border-color: var(--de-accent); color: var(--de-accent); }
.de-header-action svg { width: 17px; height: 17px; }
.de-version { padding: 0 13px; color: var(--de-accent); border-color: var(--de-accent); font-size: 11px; font-weight: 700; }

.de-home-scroll { min-height: 0; flex: 1; overflow: auto; padding: 14px 16px 20px; }
.de-section-heading { margin: 0 0 12px; color: #d5d5d5; font-size: 12px; font-weight: 650; letter-spacing: .6px; }
.de-tool-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }

.de-tool-card {
    position: relative;
    min-height: 142px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 7px;
    padding: 14px 11px 13px;
    overflow: hidden;
    color: #f4f4f4;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, .13);
    border-radius: 13px;
    background:
        radial-gradient(ellipse at 0% 0%, rgba(255, 29, 45, .14), transparent 42%),
        linear-gradient(145deg, #171717, #0b0b0b 76%);
    box-shadow: inset 0 1px rgba(255, 255, 255, .035), 0 6px 17px rgba(0, 0, 0, .23);
    cursor: pointer;
    transition: transform .12s ease, border-color .12s ease, box-shadow .12s ease;
    font: inherit;
}

.de-tool-card::after {
    content: "";
    position: absolute;
    right: -24px;
    bottom: -30px;
    width: 85px;
    height: 70px;
    pointer-events: none;
    background: radial-gradient(ellipse, rgba(255, 29, 45, .14), transparent 70%);
}

.de-tool-card:hover,
.de-tool-card:focus-visible {
    transform: translateY(-2px);
    border-color: rgba(255, 29, 45, .88);
    box-shadow: inset 0 1px rgba(255, 255, 255, .05), 0 8px 20px rgba(0, 0, 0, .35), 0 0 12px rgba(var(--de-accent-rgb), .11);
    outline: none;
}

.de-tool-icon {
    width: 49px;
    height: 49px;
    flex: 0 0 49px;
    display: grid;
    place-items: center;
    color: #ff4a55;
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: 12px;
    background: linear-gradient(145deg, #242424, #111);
    box-shadow: 0 3px 10px rgba(0, 0, 0, .32);
}

.de-tool-icon svg { width: 27px; height: 27px; stroke: currentColor; }
.de-tool-title { font-size: 12px; line-height: 1.25; font-weight: 700; }
.de-tool-description { max-width: 260px; color: #a8a8a8; font-size: 10px; line-height: 1.35; }

.de-more-menu {
    position: absolute;
    top: 54px;
    right: 15px;
    z-index: 2;
    width: min(260px, calc(100vw - 30px));
    padding: 7px;
    border: 1px solid rgba(255, 29, 45, .45);
    border-radius: 12px;
    background: #141414;
    box-shadow: 0 12px 32px rgba(0, 0, 0, .6);
}

.de-more-menu[hidden] { display: none; }
.de-more-item { width: 100%; padding: 9px 10px; border: 0; border-radius: 7px; background: transparent; color: #eee; text-align: left; cursor: pointer; font: inherit; }
.de-more-item:hover { background: rgba(var(--de-accent-rgb), .13); color: #fff; }
.de-home-notice { min-height: 18px; padding: 0 16px 8px; color: #ff737c; font-size: 10px; text-align: center; }

.de-tool-header {
    position: fixed;
    z-index: 49999;
    top: 0;
    right: 0;
    left: 0;
    height: 42px;
    display: none;
    align-items: center;
    gap: 10px;
    padding: 0 12px;
    border-bottom: 1px solid rgba(255, 29, 45, .45);
    background: rgba(12, 12, 12, .97);
}

body.devilish-tool-open .de-tool-header { display: flex; }
.de-back-button { display: inline-flex; align-items: center; gap: 6px; border: 0; background: transparent; color: #eee; font: inherit; font-size: 12px; cursor: pointer; }
.de-back-button:hover { color: var(--de-accent); }
.de-back-button svg { width: 16px; height: 16px; }
.de-tool-current-title { color: #d1d1d1; font-size: 12px; font-weight: 650; }

/* Keep the original navigation DOM for the existing tool handlers, but remove
   the old rail and the tools the user asked to retire from the interface. */
.tab-bar, .rail-resizer, .sidebar-tooltip { display: none !important; }
.tab-content { position: absolute !important; inset: 0 !important; width: 100% !important; height: 100vh !important; flex: none !important; padding: 52px 12px 12px !important; overflow: hidden !important; }
body.panel-collapsed .tab-content.active,
body.devilish-tool-open .tab-content.active { display: block !important; }
#contentSilence .sil-app { display: none !important; }
#devilishSilenceMount { display: block; width: 100%; height: 100%; overflow: auto; }

[data-tab="tour"], [data-tab="tutorial"], [data-tab="convert"],
[data-tab="onlinesfx"], [data-tab="seqimport"], [data-tab="library"],
[data-tab="blend"], [data-tab="videooverlays"], [data-tab="youtube"],
[data-tab="assemble"], [data-tab="guide"] { display: none !important; }

#contentTour, #contentTutorial, #contentConvert, #contentOnlineSfx,
#contentSeqImport, #contentLibrary, #contentBlend, #contentVideoOverlays,
#contentYoutube, #contentAssemble { display: none !important; }

.de-silence-loading { padding: 28px 14px; color: #c8c8c8; text-align: center; }
.de-silence-loading strong { display: block; margin-bottom: 5px; color: #fff; font-size: 15px; }
.de-jc-progress {
    position: fixed;
    z-index: 60000;
    right: 20px;
    bottom: 20px;
    width: min(350px, calc(100vw - 40px));
    padding: 14px;
    border: 1px solid rgba(255, 29, 45, .58);
    border-radius: 11px;
    background: #151515;
    box-shadow: 0 12px 35px rgba(0, 0, 0, .6);
}
.de-jc-progress[hidden] { display: none; }
.de-jc-progress-title { margin-bottom: 5px; font-size: 13px; font-weight: 700; }
.de-jc-progress-message { min-height: 16px; color: #bdbdbd; font-size: 11px; }
.de-jc-progress-track { height: 4px; margin-top: 10px; overflow: hidden; border-radius: 4px; background: #333; }
.de-jc-progress-fill { width: 0; height: 100%; border-radius: inherit; background: var(--de-accent); transition: width .15s linear; }
.de-jc-progress-close { float: right; border: 0; background: transparent; color: #aaa; cursor: pointer; font: inherit; }
.de-toast { position: fixed; z-index: 60001; left: 50%; bottom: 20px; max-width: calc(100vw - 32px); padding: 9px 14px; transform: translateX(-50%); border: 1px solid rgba(255, 29, 45, .55); border-radius: 18px; background: #171717; color: #f5f5f5; font-size: 11px; box-shadow: 0 8px 24px rgba(0, 0, 0, .5); }
.de-toast[hidden] { display: none; }

@media (min-width: 900px) {
    .de-header { min-height: 80px; padding: 12px 28px; gap: 15px; }
    .de-logo-mark { width: 44px; height: 44px; flex-basis: 44px; }
    .de-logo-mark svg { width: 32px; height: 32px; }
    .de-brand-name { font-size: 26px; }
    .de-brand-tagline { font-size: 9px; letter-spacing: 3.2px; }
    .de-home-scroll { padding: 18px 28px 26px; }
    .de-section-heading { margin-bottom: 15px; font-size: 14px; }
    .de-tool-grid { gap: 14px; }
    .de-tool-card { min-height: 192px; gap: 9px; padding: 18px 14px; border-radius: 15px; }
    .de-tool-icon { width: 66px; height: 66px; flex-basis: 66px; }
    .de-tool-icon svg { width: 34px; height: 34px; }
    .de-tool-title { font-size: 17px; }
    .de-tool-description { font-size: 14px; }
    .de-tool-header { height: 48px; padding: 0 20px; }
    .tab-content { padding: 60px 22px 20px !important; }
}

@media (max-width: 560px) {
    .de-header { min-height: 58px; padding: 8px 10px; gap: 8px; }
    .de-brand-name { font-size: 16px; }
    .de-brand-tagline { font-size: 7px; letter-spacing: 1.7px; }
    .de-version { height: 30px; padding: 0 9px; font-size: 10px; }
    .de-home-scroll { padding: 11px 10px 16px; }
    .de-tool-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
    .de-tool-card { min-height: 132px; padding: 10px 7px; }
}

@media (max-width: 360px) {
    .de-tool-grid { grid-template-columns: 1fr; }
}

/* Flat, low-noise surface for the Devilish dashboard. */
#devilishDashboard { background: #0b0b0c; }
.de-header { background: #101011; border-bottom-color: #29292b; box-shadow: none; }
.de-logo-mark { border-radius: 7px; background: #111; box-shadow: none; }
.de-header-action, .de-version { border-radius: 7px; background: #151516; }
.de-home-scroll { scrollbar-color: #414144 #0b0b0c; }
.de-tool-card {
    min-height: 132px;
    border-color: #28282a;
    border-radius: 8px;
    background: #141415;
    box-shadow: none;
    transition: background-color .12s ease, border-color .12s ease;
}
.de-tool-card::after { display: none; }
.de-tool-card:hover, .de-tool-card:focus-visible {
    transform: none;
    border-color: var(--de-accent);
    background: #1b1b1d;
    box-shadow: none;
}
.de-tool-icon {
    border-color: #303033;
    border-radius: 8px;
    background: #19191a;
    box-shadow: none;
}
.de-more-menu { border-color: #303033; border-radius: 8px; background: #141415; box-shadow: none; }
.de-more-item { border-radius: 5px; }
.de-tool-header { background: #101011; border-bottom-color: #29292b; }
.de-jc-progress { border-radius: 8px; background: #141415; box-shadow: none; }
.de-toast { border-radius: 7px; background: #141415; box-shadow: none; }

@media (min-width: 900px) {
    .de-tool-card { min-height: 164px; border-radius: 8px; }
}

/* The dashboard forces active tool panels to block layout; the redesigned
   caption workspace relies on a flex column so its Style pane can scroll. */
body.sm-capnew #contentTranscribe.tab-content.active {
    display: flex !important;
    flex-direction: column !important;
    min-height: 0 !important;
}
body.sm-capnew #contentTranscribe > .capx {
    display: flex;
    flex: 1 1 0%;
    min-height: 0;
    overflow: hidden;
}
body.sm-capnew #contentTranscribe .capx-pane.on {
    min-height: 0;
}
body.sm-capnew #contentTranscribe .capx-body,
body.sm-capnew #contentTranscribe .capx-scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}