#mainchart {
    position: relative;
}

#startbar {
    display: flex;
    height: 38px;
    align-items: center;
    gap: 2px;
    direction: rtl;
}

#technical-chart-site-trigger {
    display: inline-flex;
    flex: 0 0 36px;
    width: 36px;
    height: 38px;
    padding: 0;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: inherit;
    font-size: 20px;
    cursor: pointer;
}

#technical-chart-site-trigger[aria-expanded="true"] {
    background: #737fea26;
}

#technical-chart-site-menu {
    --site-menu-background: #202830;
    --site-menu-color: #edf1f5;
    --site-menu-border: #ffffff24;
    position: fixed;
    z-index: 10100;
    top: calc(var(--technical-chart-mobile-topbar-height, 40px) + 6px);
    right: max(8px, env(safe-area-inset-right, 0px));
    box-sizing: border-box;
    width: 350px;
    max-width: calc(100vw - 16px);
    max-height: calc(100dvh - var(--technical-chart-mobile-topbar-height, 40px) - 16px);
    margin: 0;
    padding: 0 12px 12px;
    overflow: auto;
    overscroll-behavior: contain;
    border: 1px solid var(--site-menu-border);
    border-radius: 10px;
    background: var(--site-menu-background);
    color: var(--site-menu-color);
    box-shadow: 0 10px 28px #0005;
    direction: rtl;
    text-align: right;
    font: 13px/1.7 iransansx, Tahoma, sans-serif;
}

body[data-technical-chart-theme="light"] #technical-chart-site-menu {
    --site-menu-background: #fff;
    --site-menu-color: #26323d;
    --site-menu-border: #26323d26;
}

#technical-chart-site-menu[hidden],
#technical-chart-site-menu [hidden] {
    display: none !important;
}

#technical-chart-site-menu .technical-chart-site-menu-heading {
    position: sticky;
    z-index: 1;
    top: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 48px;
    border-bottom: 1px solid var(--site-menu-border);
    background: var(--site-menu-background);
}

#technical-chart-site-close {
    width: 40px;
    height: 40px;
    padding: 0;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: inherit;
    font-size: 26px;
    cursor: pointer;
}

#technical-chart-site-menu > .dropdown {
    position: static;
    display: block;
    float: none;
    width: auto;
    margin: 0;
    border-bottom: 1px solid var(--site-menu-border);
}

#technical-chart-site-menu .dropbtn {
    display: flex;
    width: 100%;
    min-height: 46px;
    padding: 8px 4px;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    border: 0;
    background: transparent;
    color: inherit;
    text-align: right;
    font: inherit;
    cursor: pointer;
}

#technical-chart-site-menu .dropbtn[aria-expanded="true"] .arrow-icon {
    transform: rotate(180deg);
}

#technical-chart-site-menu .dropdown-content {
    position: static;
    display: block;
    min-width: 0;
    width: auto;
    margin: 0;
    padding: 0 6px 8px;
    border: 0;
    background: transparent;
    box-shadow: none;
}

#technical-chart-site-menu a {
    display: flex;
    float: none;
    min-height: 40px;
    box-sizing: border-box;
    padding: 8px;
    align-items: center;
    border-radius: 6px;
    color: inherit;
    text-decoration: none;
    white-space: normal;
    overflow-wrap: anywhere;
    font: inherit;
}

#technical-chart-site-menu a:hover,
#technical-chart-site-menu button:hover {
    background: #737fea20;
}

#technical-chart-site-menu :is(a, button):focus-visible,
#technical-chart-site-trigger:focus-visible {
    outline: 2px solid #858ff0;
    outline-offset: -2px;
}

#technical-chart-site-menu .menu-row {
    padding: 8px 0;
    border-top: 1px solid var(--site-menu-border);
}

#technical-chart-site-menu .menu-actions {
    display: flex;
    gap: 6px;
    margin-top: 4px;
}

#technical-chart-site-menu .menu-link {
    justify-content: center;
    min-width: 68px;
    padding: 6px 12px;
    background: #737fea18;
}

#technical-chart-site-menu.technical-chart-symbol-concealed :is([data-tour="symbols"], .sublist),
#technical-chart-site-menu.technical-chart-symbol-concealed #money-flow-content .menu-row:first-child {
    display: none !important;
}

@media (max-width: 600px) {
    body.technical-chart-mobile #topbar #homepage { width: 36px; }
    body.technical-chart-mobile #topbar #logo { width: 30px !important; height: 24px !important; }
    body.technical-chart-mobile #topbar #startbar > span { width: 34px; }
    body.technical-chart-mobile #topbar #startbar .symbol { max-width: 60px; }
    body.technical-chart-mobile #topbar .technical-chart-mobile-top-actions button { width: 36px; }
    body.technical-chart-mobile #topbar .technical-chart-mobile-top-actions button.technical-chart-text-mobile-action {
        min-width: 32px;
        padding: 0 5px;
    }
}

@media (max-width: 360px) {
    body.technical-chart-mobile #topbar #startbar { gap: 0; }
    body.technical-chart-mobile #topbar #startbar .symbol { max-width: 34px; }
    body.technical-chart-mobile #topbar #homepage,
    body.technical-chart-mobile #topbar #startbar > span { width: 30px; }
    body.technical-chart-mobile #topbar #technical-chart-site-trigger { flex-basis: 32px; width: 32px; }
    body.technical-chart-mobile #topbar .technical-chart-mobile-top-actions { gap: 0; }
    body.technical-chart-mobile #topbar .technical-chart-mobile-top-actions button { width: 32px; }
    body.technical-chart-mobile #topbar .technical-chart-mobile-top-actions button.technical-chart-text-mobile-action {
        padding: 0 3px;
        font-size: 10px;
    }
}

.prediction-question[hidden], .prediction-zones[hidden], .prediction-zone[hidden], .prediction-practice-toggle[hidden], #prediction-notebook[hidden], .paper-mode-switch[hidden], #paper-trading-report[hidden], .paper-trading-panel[hidden], .paper-trading-content[hidden] { display: none !important; }
.prediction-practice-toggle { gap: 5px; cursor: pointer; white-space: nowrap; }
.prediction-practice-toggle input { accent-color: #278bc9; }
.technical-chart-prediction-awaiting #analysis-selector { visibility: hidden !important; }
.technical-chart-prediction-awaiting #replay-selector { min-width: 0 !important; width: auto !important; }
.technical-chart-prediction-awaiting #replay-selector > div > :not(#forward) { display: none !important; }
.technical-chart-prediction-awaiting #replay-selector [aria-disabled="true"] { opacity: .4; cursor: not-allowed; }
.technical-chart-prediction-awaiting .private { top: 48px; }
.private { top: 48px; left: 52px; right: auto; z-index: 10054; box-sizing: border-box; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: min(320px, calc(100vw - 24px)); max-width: calc(100vw - 24px); gap: 3px; padding: 5px; font-size: 10px; max-height: calc(100dvh - 64px); overflow: auto; }
.paper-guide-handle { grid-column: 1 / -1; cursor: grab; touch-action: none; user-select: none; min-height: 24px; text-align: right; }
.paper-guide-handle:focus-visible { outline: 2px solid #6dbbff; }
.private > .help { min-width: 0; justify-content: center; text-align: center; padding: 3px !important; border: 0 !important; }
.private .paper-mode-switch { flex-wrap: wrap; }
.private .paper-mode-switch select { max-width: 100%; width: 140px; }
@media (max-width: 1024px) and (orientation: portrait) { .private { left: 8px; } }
@media (max-width: 1024px) and (orientation: landscape) { .private { left: 76px; } }
.prediction-zones { position: absolute; inset: 0; z-index: 24; pointer-events: none; overflow: hidden; }
.prediction-zone { position: absolute; display: flex; align-items: center; justify-content: center; border: 1px solid; box-sizing: border-box; overflow: hidden; font: 12px iransansx, Tahoma, sans-serif; direction: rtl; }
.prediction-zone span { display: none; }
.prediction-zone.prediction-up { background: transparent; border-color: #2bd68b; }
.prediction-zone.prediction-down { background: transparent; border-color: #ff6565; }
.prediction-zone.prediction-flat { background: transparent; border-color: #aab5c4; }
.prediction-zone[data-selected="true"] { border-width: 3px; box-shadow: inset 0 0 0 1px #fff; }
.prediction-zone[data-resolved="true"] > .prediction-verdict { display: flex; flex-direction: column; align-items: center; color: #6c7787; line-height: 1; }
.prediction-verdict b { font: bold 19px Tahoma, sans-serif; }
.prediction-verdict small { font-size: 9px; margin-top: 2px; }
.prediction-zone[data-actual="true"] > .prediction-verdict { color: #16833b; }
.prediction-zone[data-selected="true"][data-actual="false"] > .prediction-verdict { color: #e05252; }
.prediction-stop-line { position: absolute; top: 0; border-left: 1px dashed #788da5; width: 0; }
.prediction-stop-line[hidden], .prediction-return-label[hidden] { display: none !important; }
.prediction-stop-line > span { display: block; position: absolute; top: 4px; left: 3px; color: #788da5; font-size: 10px; }
.prediction-move-line { position: absolute; inset: 0; width: 100%; height: 100%; overflow: hidden; }
.prediction-return-label { position: absolute; padding: 3px 5px; border: 1px solid #6f8296; border-radius: 4px; background: #1b2532ed; color: #edf2f7; font-size: 10px; direction: rtl; text-align: center; max-width: 200px; line-height: 1.7; }
body[data-technical-chart-theme="light"] .prediction-return-label { background: #fffffff0; color: #17212b; }
.technical-chart-prediction-regions .private { box-sizing: border-box; max-width: min(440px, calc(100vw - 140px)); right: auto; }
.technical-chart-prediction-regions #message { left: 12px; right: auto; bottom: 64px; max-width: min(420px, calc(100vw - 140px)); }
body.technical-chart-mobile.technical-chart-prediction-regions #message { left: 12px; right: auto; max-width: min(420px, calc(100vw - 140px)); }
body[data-technical-chart-theme="light"] .prediction-zone.prediction-up { border-color: #006400; }
body[data-technical-chart-theme="light"] .prediction-zone.prediction-down { border-color: #ff0000; }
body[data-technical-chart-theme="light"] .prediction-zone.prediction-flat { border-color: #555; }
.paper-mode-switch { display: inline-flex; align-items: center; gap: 5px; }
.private .paper-mode-switch select { font: inherit; box-sizing: border-box; width: 100%; max-width: 100%; padding: 3px; }
.technical-chart-paper-trading :is(.prediction-practice-toggle, #prediction-notebook) { display: none !important; }
.technical-chart-paper-trading :is(#replay-selector, .timeframe, .floating-timeframe) [aria-disabled="true"], .technical-chart-paper-trading :is(.timeframe, .floating-timeframe)[aria-disabled="true"] { opacity: .4; cursor: not-allowed; }
.paper-trading-panel, .paper-trading-report { box-sizing: border-box; background: #1b2532; color: #edf2f7; border: 1px solid #64748b; border-radius: 10px; box-shadow: 0 8px 30px #0005; font: 12px iransansx, Tahoma, sans-serif; text-align: right; }
.paper-trading-panel { position: fixed; z-index: 10051; left: 52px; top: 50%; transform: translateY(-50%); width: 360px; max-height: calc(100dvh - 110px); overflow: auto; }
.paper-trading-panel header, .paper-trading-report header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 12px; border-bottom: 1px solid #788da544; }
.paper-trading-panel header { position: sticky; top: 0; background: inherit; z-index: 1; }
.paper-trading-panel header strong { font-size: 14px; }
.paper-drag-handle { flex: 1; display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 34px; cursor: grab; touch-action: none; user-select: none; }
.paper-drag-handle > span { font: 22px Tahoma, sans-serif; opacity: .65; }
.paper-drag-handle.is-dragging { cursor: grabbing; }
.paper-drag-handle:focus-visible { outline: 2px solid #6dbbff; outline-offset: 2px; border-radius: 4px; }
.paper-trading-content { padding: 10px 12px; }
.paper-trading-candle { line-height: 1.9; }
.paper-trading-stats, .paper-comparison-stats, .paper-report-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 10px 0; }
.paper-comparison-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.paper-trading-stats > div, .paper-comparison-stats > div, .paper-report-stats > div { padding: 7px; border: 1px solid #788da544; border-radius: 6px; }
.paper-trading-stats dt, .paper-comparison-stats dt, .paper-report-stats dt { opacity: .8; font-size: 11px; }
.paper-trading-stats dd, .paper-comparison-stats dd, .paper-report-stats dd { margin: 5px 0 0; font-size: 14px; overflow-wrap: anywhere; }
.paper-trading-stats .paper-share-count { font-size: 12px; line-height: 1.8; }
.paper-trading-panel button, .paper-trading-report button { font: inherit; color: inherit; background: #354457; border: 1px solid #788da5; border-radius: 5px; padding: 6px 9px; min-height: 34px; cursor: pointer; }
.paper-trading-panel button:disabled { opacity: .4; cursor: not-allowed; }
.paper-order-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px; margin: 10px 0; }
.paper-order-row label { display: grid; gap: 4px; }
.paper-order-row select { box-sizing: border-box; min-width: 0; width: 100%; height: 36px; font: inherit; color: inherit; background: #354457; border: 1px solid #788da5; border-radius: 5px; padding: 5px; }
.paper-start-note, .paper-drawdown-status { line-height: 1.9; }
.paper-drawdown-status[data-warning="true"] { color: #f6b955; }
body[data-technical-chart-theme="light"] .paper-drawdown-status[data-warning="true"] { color: #9b5900; }
.paper-income-note { line-height: 1.9; margin: 8px 0; font-size: 11px; }
.paper-trading-panel .paper-buy { background: #14794f; color: white; }
.paper-trading-panel .paper-sell { background: #b43636; color: white; }
.paper-trading-gate, .paper-trading-status { line-height: 1.9; margin: 8px 0; }
.paper-trading-status[data-error="true"] { color: #ef7070; }
.paper-trading-status[data-error="false"] { color: #35bb86; }
.paper-trading-actions { display: flex; flex-wrap: wrap; gap: 5px; margin: 10px 0; }
.paper-trading-content small { display: block; line-height: 1.9; opacity: .75; }
.paper-trading-report { width: min(860px, calc(100vw - 24px)); max-height: calc(100dvh - 32px); padding: 12px; }
.paper-trading-report::backdrop { background: #0008; }
.paper-trading-report > p { line-height: 1.9; }
.paper-report-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.paper-report-scroll { overflow: auto; max-height: 42dvh; }
.paper-report-scroll table { width: 100%; min-width: 520px; border-collapse: collapse; direction: rtl; }
.paper-report-scroll :is(th, td) { padding: 9px; border: 1px solid #788da544; white-space: nowrap; }
body[data-technical-chart-theme="light"] :is(.paper-trading-panel, .paper-trading-report) { background: white; color: #17212b; }
body[data-technical-chart-theme="light"] :is(.paper-trading-panel, .paper-trading-report) button:not(.paper-buy, .paper-sell) { background: #edf2f7; }
body[data-technical-chart-theme="light"] .paper-order-row select { background: #edf2f7; }
@media (max-width: 1024px) {
    .paper-trading-panel { left: 12px; top: auto; bottom: 64px; transform: none; width: min(360px, calc(100vw - 24px)); max-height: 48dvh; }
    .paper-trading-panel button { min-height: 40px; }
    .paper-report-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1024px) and (orientation: landscape) {
    .paper-trading-panel { left: 76px; bottom: 12px; width: min(320px, calc(100vw - 100px)); max-height: calc(100dvh - 72px); }
}
.prediction-question, .prediction-notebook { box-sizing: border-box; color: #edf2f7; background: #1b2532; border: 1px solid #64748b; border-radius: 10px; box-shadow: 0 8px 30px #0005; font: 13px iransansx, Tahoma, sans-serif; text-align: right; }
.prediction-question { position: fixed; z-index: 10050; bottom: 64px; left: 50%; transform: translateX(-50%); padding: 14px; width: min(440px, calc(100vw - 24px)); max-height: calc(65dvh - 24px); overflow: auto; }
@media (min-width: 1025px) {
    .prediction-question { left: 52px; top: 50%; bottom: auto; transform: translateY(-50%); }
}
.prediction-question p { margin: 8px 0; line-height: 1.9; }
.prediction-drag-handle { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 28px; margin: -4px -4px 4px; padding: 2px 4px; cursor: grab; touch-action: none; user-select: none; }
.prediction-drag-handle > span { font: 22px Tahoma, sans-serif; opacity: .65; }
.prediction-drag-handle.is-dragging { cursor: grabbing; }
.prediction-drag-handle:focus-visible { outline: 2px solid #6dbbff; outline-offset: 2px; border-radius: 4px; }
.prediction-question small { display: block; opacity: .85; }
.prediction-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.prediction-choices button { min-height: 42px; border: 1px solid transparent; border-radius: 5px; color: #fff; font: inherit; cursor: pointer; padding: 6px; }
.prediction-choices .prediction-up { background: #14794f; }
.prediction-choices .prediction-down { background: #b43636; }
.prediction-choices .prediction-flat { background: #555f6d; }
.prediction-choices .prediction-skip { background: #253449; border-color: #8b9bb0; }
.prediction-choices button:focus-visible, .prediction-notebook button:focus-visible { outline: 3px solid #6dbbff; outline-offset: 2px; }
.prediction-notebook { padding: 16px; width: min(780px, calc(100vw - 24px)); max-height: calc(100dvh - 40px); }
.prediction-notebook::backdrop { background: #0009; }
.prediction-notebook header { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.prediction-notebook header button { font: inherit; color: inherit; background: transparent; border: 1px solid #94a3b8; border-radius: 4px; padding: 4px 12px; cursor: pointer; }
.prediction-summary { line-height: 2; }
.prediction-notebook-note { font-size: 11px; line-height: 1.9; opacity: .85; }
.prediction-notebook-scroll { overflow: auto; max-height: 55dvh; }
.prediction-notebook table { width: 100%; border-collapse: collapse; font: inherit; }
.prediction-notebook th, .prediction-notebook td { padding: 8px; border-bottom: 1px solid #64748b; white-space: nowrap; text-align: right; }
.prediction-notebook [data-result="correct"] td:last-child { color: #61e0a5; }
.prediction-notebook [data-result="wrong"] td:last-child { color: #ffa0a0; }
body[data-technical-chart-theme="light"] :is(.prediction-question, .prediction-notebook) { background: #fff; color: #17212b; }
body[data-technical-chart-theme="light"] .prediction-notebook [data-result="correct"] td:last-child { color: #14794f; }
body[data-technical-chart-theme="light"] .prediction-notebook [data-result="wrong"] td:last-child { color: #b43636; }
@media (max-width: 600px) { .prediction-zone { font-size: 10px; } .prediction-question { padding: 10px; font-size: 12px; } .prediction-notebook { padding: 12px; } }
@media (max-width: 1024px) { .private { gap: 5px; } .private > .help { padding-inline: 5px; } }
@media (orientation: portrait) and (max-width: 1024px) {
    .prediction-question { left: 12px; transform: none; width: min(440px, calc(100vw - 140px)); }
}
@media (orientation: landscape) and (max-width: 1024px) {
    .prediction-question { left: 76px; bottom: 12px; transform: none; width: min(300px, 44vw); max-height: calc(100dvh - 64px); }
    .technical-chart-prediction-regions .private { max-width: min(300px, 44vw); }
    .technical-chart-prediction-regions #message { left: 76px; max-width: min(300px, 44vw); }
    body.technical-chart-mobile.technical-chart-prediction-regions #message { left: 76px; max-width: min(300px, 44vw); }
}

.private,
.private .help,
.private .help a,
.private .technical-chart-incognito-action {
    color: #eef2f6;
}

.private .technical-chart-incognito-action {
    padding: 0;
    border: 0;
    background: transparent;
    font: inherit;
    cursor: pointer;
}

.private > .help,
.private > .technical-chart-incognito-control {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    padding-inline: 10px;
}

.private > :first-child {
    padding-inline-start: 0;
}

.private > :last-child {
    padding-inline-end: 0;
}

.private > .help + .help,
.private > .help + .technical-chart-incognito-control,
.private > .technical-chart-incognito-control + .help {
    border-inline-start: 1px solid #526170;
}

.private .technical-chart-incognito-usage {
    opacity: 0.78;
}

.private .technical-chart-incognito-action:disabled {
    opacity: 0.72;
    cursor: default;
}

body[data-technical-chart-theme="light"] .private {
    border-color: #b8c1ca;
    background: #f4f6f8;
}

body[data-technical-chart-theme="light"] .private > .help + .help,
body[data-technical-chart-theme="light"] .private > .help + .technical-chart-incognito-control,
body[data-technical-chart-theme="light"] .private > .technical-chart-incognito-control + .help {
    border-inline-start-color: #b8c1ca;
}

body[data-technical-chart-theme="light"] .private,
body[data-technical-chart-theme="light"] .private .help,
body[data-technical-chart-theme="light"] .private .help a,
body[data-technical-chart-theme="light"] .private .technical-chart-incognito-action {
    color: #26323d;
}

#message {
    position: fixed;
    top: auto;
    right: 18px;
    bottom: 18px;
    left: auto;
    z-index: 10030;
    display: none;
    box-sizing: border-box;
    width: auto;
    min-width: 0;
    min-height: 0;
    max-width: min(360px, calc(100vw - 36px));
    height: auto;
    margin: 0;
    padding: 8px 14px;
    transform: none;
    border: 1px solid #5a6b7b;
    border-radius: 6px;
    background: #243140;
    color: #fff;
    text-align: right;
    line-height: 1.8;
    box-shadow: 0 3px 14px #0004;
}

#message[data-message-type="success"] {
    border-color: #16833b;
    background: #135d31;
}

#message[data-message-type="warning"] {
    border-color: #c48a16;
    background: #735313;
}

#message[data-message-type="error"] {
    border-color: #c43d3d;
    background: #7e2929;
}

.technical-chart-active {
    border-radius: 4px;
    outline: 2px solid #8e44ad;
    outline-offset: 2px;
}

:is(#volume, #navchart, #mobile-volume-trigger, #mobile-nav-trigger).technical-chart-active {
    outline: none;
}
:is(#volume, #navchart, #mobile-volume-trigger, #mobile-nav-trigger):focus-visible {
    outline: 2px solid #6dbbff;
}

.technical-chart-drawing-layer {
    z-index: 20;
    user-select: none;
}

/* Keep only the main price scale above the drawing canvas. The time scale
   deliberately stays below it so selected-drawing dates remain visible. */
#mainchart > div.tv-lightweight-charts > table > tr:nth-child(1) > td:nth-child(3) > div {
    position: relative;
    z-index: 21 !important;
}

.technical-chart-indicator-cloud-layer {
    position: absolute;
    inset: 0;
    z-index: 4;
    pointer-events: none;
}

.technical-chart-price-legend {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 3px 10px;
    max-width: calc(100% - 110px);
    padding: 2px 5px;
    border-radius: 4px;
    background: color-mix(in srgb, Canvas 72%, transparent);
    direction: rtl;
    text-align: right;
}

.technical-chart-price-legend-item {
    display: inline-flex;
    align-items: baseline;
    gap: 3px;
    white-space: nowrap;
}

.technical-chart-price-legend-label {
    opacity: 0.78;
}

.technical-chart-price-legend-value {
    direction: ltr;
    unicode-bidi: isolate;
    font-weight: 600;
}

.technical-chart-overlay-legend {
    position: absolute;
    top: 30px;
    right: 70px;
    left: auto;
    z-index: 1000;
    display: flex;
    flex-wrap: wrap;
    gap: 5px 12px;
    align-items: center;
    max-width: calc(100% - 110px);
    color: #666;
    font: 12px iransansx, Tahoma, sans-serif;
    direction: rtl;
    pointer-events: auto;
}

.technical-chart-overlay-legend-item {
    display: inline-flex;
    gap: 3px;
    align-items: center;
    padding: 2px 6px;
    border: 1px solid rgba(80, 90, 100, 0.24);
    border-radius: 4px;
    background: rgba(248, 249, 250, 0.86);
    color: #374151;
}

.technical-chart-overlay-legend-item[hidden] {
    display: none !important;
}

.technical-chart-overlay-legend button {
    padding: 3px;
    border: 0;
    background: transparent;
    color: inherit;
    cursor: pointer;
}

#mainchart[data-chart-theme="dark"] .technical-chart-overlay-legend {
    color: #e4e9ef;
}

#mainchart[data-chart-theme="dark"] .technical-chart-overlay-legend-item {
    border-color: #465364;
    background: rgba(30, 38, 48, 0.9);
    color: #e4e9ef;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.28);
}

.technical-chart-oscillator-legend {
    position: absolute;
    top: 6px;
    right: 70px;
    left: auto;
    z-index: 1000;
    display: flex;
    gap: 6px;
    align-items: center;
    width: calc(100% - 110px);
    height: 20px;
    padding: 0 5px;
    color: #666;
    font: 11px iransansx, Tahoma, sans-serif;
    direction: rtl;
    pointer-events: auto;
}

#mainchart[data-chart-theme="dark"] .technical-chart-oscillator-legend {
    color: #d9e0e7;
}

.technical-chart-oscillator-title {
    margin-left: 4px;
    font-size: 14px;
}

.technical-chart-oscillator-summary {
    display: flex;
    gap: 6px;
    align-items: center;
    margin-right: auto;
    direction: ltr;
}

.technical-chart-oscillator-legend button {
    padding: 5px;
    border: 0;
    background: transparent;
    color: inherit;
    cursor: pointer;
}

#mini-settings {
    position: fixed;
    z-index: 10040;
    min-width: 220px;
    max-height: calc(100vh - 16px);
    overflow: visible;
    border: 1px solid #465364;
    border-radius: 7px;
    background: #1e2630;
    box-shadow: 0 7px 24px rgba(0, 0, 0, 0.42);
    color: #f4f7fa;
    direction: rtl;
    overflow: visible !important;
}

body.technical-chart-mobile #mainchart {
    -webkit-touch-callout: none;
}

#mini-settings > div {
    position: relative;
    box-sizing: border-box;
    color: #f4f7fa;
}

#mini-settings > div:hover {
    background: #135d31;
    color: #fff;
}

#mini-settings .floating {
    right: 100%;
    left: auto;
    z-index: 10041;
    box-sizing: border-box;
    border-color: #465364;
    background: #151c24;
    color: #f4f7fa;
    white-space: nowrap;
    min-width: 150px;
}

#mini-settings .floating-parent.technical-chart-context-submenu-open {
    z-index: 10042;
}

#mini-settings .floating-parent.technical-chart-context-submenu-open > .floating {
    z-index: 10043;
}

.technical-chart-custom-color-picker {
    box-sizing: border-box;
    width: 32px;
    min-width: 32px;
    height: 26px;
    padding: 3px;
    border: 1px solid #526170;
    border-radius: 4px;
    background: #1b232c;
    cursor: pointer;
}

.technical-chart-custom-color-picker:hover,
.technical-chart-custom-color-picker:focus-visible {
    border-color: #65a6d8;
    outline: none;
}

.technical-chart-custom-color-preview {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 2px;
    box-shadow: inset 0 0 0 1px rgb(255 255 255 / 18%);
}

.technical-chart-custom-color-palette {
    position: fixed;
    z-index: 10150;
    display: grid;
    grid-template-columns: repeat(12, 18px);
    gap: 3px;
    width: max-content;
    padding: 8px;
    direction: ltr;
    border: 1px solid #526170;
    border-radius: 6px;
    background: #151c24;
    box-shadow: 0 8px 24px rgb(0 0 0 / 45%);
}

.technical-chart-custom-color-cell {
    width: 18px;
    height: 18px;
    padding: 0;
    border: 1px solid rgb(255 255 255 / 25%);
    border-radius: 2px;
    cursor: pointer;
}

.technical-chart-custom-color-cell:hover,
.technical-chart-custom-color-cell:focus-visible {
    z-index: 1;
    outline: 2px solid #fff;
    transform: scale(1.2);
}

body[data-technical-chart-theme="light"] .technical-chart-custom-color-picker,
body[data-technical-chart-theme="light"] .technical-chart-custom-color-palette {
    border-color: #aeb9c5;
    background: #f7f9fb;
}

.technical-chart-menu-check {
    display: inline-grid;
    width: 18px;
    min-width: 18px;
    margin-inline-end: 6px;
    color: #35c777;
    font-size: 15px;
    font-weight: 800;
    line-height: 1;
    place-items: center;
}

#mini-settings #floating-volume,
#mini-settings #floating-grid {
    position: relative;
    padding-left: 34px;
}

#mini-settings #floating-volume > .technical-chart-menu-check,
#mini-settings #floating-grid > .technical-chart-menu-check {
    position: absolute;
    left: 8px;
    margin: 0;
}

#mini-settings .floating:hover {
    background: #176b3b;
    color: #fff;
}

#style-panel {
    direction: rtl;
    background: #fff;
    color: #333;
}

#style-panel .technical-chart-panel-drag-handle {
    font-size: 24px;
    line-height: 24px;
    cursor: move;
    user-select: none;
}

#style-panel .technical-chart-color-selector {
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
}

#style-panel .technical-chart-color-selector .color-preview-btnx {
    display: block;
}

#style-panel button,
#style-panel select,
#style-panel input {
    color: #333;
}

#style-panel.technical-chart-drawing-settings {
    position: absolute;
    z-index: 10070;
    box-sizing: border-box;
    display: grid;
    grid-template-rows: auto;
    width: min(630px, calc(100vw - 24px));
    min-width: 560px;
    max-width: calc(100vw - 24px);
    padding: 0;
    overflow: visible;
    border: 1px solid #465364;
    border-radius: 9px;
    background: #1e2630;
    color: #eef2f6;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.42);
    font: 13px iransansx, Tahoma, sans-serif;
    cursor: move;
}

.technical-chart-drawing-settings-body {
    display: grid;
    gap: 7px;
    padding: 7px;
    overflow: visible;
}

.technical-chart-drawing-settings-section {
    box-sizing: border-box;
    padding: 0;
    border: 0;
    background: transparent;
}

.technical-chart-drawing-toolbar {
    display: grid;
    grid-template-columns: 42px 82px 96px minmax(180px, 1fr) 140px;
    gap: 8px;
    align-items: center;
    min-height: 34px;
}

#style-panel .technical-chart-color-selector {
    box-sizing: border-box;
    width: 38px;
    height: 32px;
    padding: 3px;
    border: 1px solid #526170;
    border-radius: 5px;
    background: #17202a;
}

#style-panel .technical-chart-color-selector img {
    display: none;
}

#style-panel .technical-chart-color-selector .color-preview-btnx {
    width: 100%;
    height: 100%;
    border-radius: 3px;
}

#style-panel select,
#style-panel input[type="text"] {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    height: 32px;
    margin: 0;
    padding: 3px 7px;
    border: 1px solid #526170;
    border-radius: 5px;
    background: #17202a;
    color: #f2f5f8;
    font: inherit;
    cursor: default;
}

#style-panel .technical-chart-special-controls {
    display: grid;
    grid-template-columns: minmax(125px, 1fr) 34px;
    gap: 6px;
    align-items: center;
}

#style-panel .technical-chart-volume-profile-controls {
    grid-template-columns: minmax(62px, 0.8fr) minmax(56px, 0.7fr) minmax(88px, 1.2fr);
}

#style-panel .technical-chart-fibonacci-controls {
    grid-template-columns: 69px minmax(88px, 1fr) 34px;
    grid-template-rows: 32px;
    white-space: nowrap;
}

#style-panel .technical-chart-fibonacci-controls > .dual {
    flex-wrap: nowrap;
}

#style-panel .dual,
#style-panel .thriple {
    display: flex;
    gap: 5px;
    align-items: center;
}

#style-panel .quadeq {
    display: flex;
    gap: 4px;
    justify-content: flex-end;
}

#style-panel .fabtn,
#style-panel .dual button,
#style-panel .thriple button {
    box-sizing: border-box;
    width: 32px;
    min-width: 32px;
    height: 32px;
    padding: 0;
    border: 1px solid #526170;
    border-radius: 5px;
    background: #17202a;
    color: #d6dee6;
    cursor: pointer;
}

#style-panel .fabtn:hover,
#style-panel .fabtn.active,
#style-panel .dual button:hover,
#style-panel .thriple button:hover {
    border-color: #3c92d0;
    background: #23435b;
    color: #ffffff;
}

#style-panel .fabtn.red:hover {
    border-color: #d76565;
    background: #5b2a2a;
}

.technical-chart-drawing-text-fields {
    display: grid;
    grid-template-columns: minmax(180px, 1.3fr) minmax(130px, 1fr);
    gap: 8px;
}

#style-panel #label-style {
    min-width: 0 !important;
}

#style-panel #user-input {
    max-height: none !important;
    margin: 0 !important;
}

#style-panel #fill-section {
    display: flex;
    gap: 10px;
    align-items: center;
}

#style-panel #fill-section > div:first-child {
    display: none;
}

#style-panel #fill-toggle {
    width: 18px;
    height: 18px;
    margin: 0;
}

#style-panel #fill-color-selector {
    display: flex;
    gap: 4px;
    align-items: center;
    width: 38px;
    height: 30px;
    margin: 0 !important;
    padding: 3px;
    border: 1px solid #526170;
    border-radius: 5px;
    background: #17202a;
    cursor: pointer;
}

#style-panel #fill-color-selector > div:first-child {
    display: none;
}

#style-panel #fill-color-preview {
    width: 100%;
    height: 100%;
    border-radius: 3px;
}

#style-panel #fill-opacity {
    flex: 1;
    width: auto !important;
    min-width: 130px;
    height: 18px !important;
    margin: 0 !important;
}

#style-panel .color-palette-grid,
#style-panel .fibo-levels-grid {
    top: 8px;
    right: 10px;
    left: 10px;
    box-sizing: border-box;
    width: auto;
    max-height: none;
    min-height: 0;
    padding: 10px;
    overflow: visible;
    border-color: #526170;
    border-radius: 7px;
    background: #1b242e;
    z-index: 10072;
}

#style-panel .color-palette-grid {
    grid-template-columns: repeat(12, minmax(18px, 1fr));
}

#style-panel .color-cell {
    width: 100%;
    min-width: 18px;
    height: 20px;
}

#style-panel .fibo-levels-grid > div {
    display: grid;
    grid-template-columns: 30px minmax(90px, 1fr) 44px;
    gap: 8px;
    align-items: center;
}

#style-panel .fibo-levels-grid input[type="number"] {
    width: 100%;
}

#style-panel .fibo-levels-grid .technical-chart-custom-color-picker {
    width: 42px;
    height: 30px;
    padding: 2px;
    border: 1px solid #526170;
    border-radius: 5px;
    background: #17202a;
}

@media (max-width: 620px) {
    #style-panel.technical-chart-drawing-settings {
        right: 12px;
        left: 12px !important;
        width: auto;
        min-width: 0;
    }

    .technical-chart-drawing-toolbar {
        grid-template-columns: 42px repeat(2, minmax(0, 1fr));
        width: 100%;
    }

    .technical-chart-drawing-toolbar > * {
        min-width: 0;
    }

    .technical-chart-drawing-toolbar > :nth-child(4),
    .technical-chart-drawing-toolbar > :nth-child(5) {
        grid-column: 1 / -1;
        width: 100%;
    }

    #style-panel .technical-chart-special-controls,
    #style-panel .dual,
    #style-panel .thriple {
        min-width: 0;
        max-width: 100%;
    }

    #style-panel .quadeq {
        flex-wrap: wrap;
        justify-content: flex-end;
    }

    #style-panel .technical-chart-volume-profile-controls,
    #style-panel .technical-chart-fibonacci-controls {
        width: 100%;
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    #style-panel .technical-chart-fibonacci-controls > .dual {
        justify-content: flex-start;
    }
}

@media (max-width: 380px) {
    #style-panel.technical-chart-drawing-settings {
        right: 6px;
        left: 6px !important;
    }

    .technical-chart-drawing-settings-body {
        gap: 6px;
        padding: 6px;
    }
}

#indicators-settings,
.technical-chart-overlay-settings-panel {
    z-index: 10060 !important;
    margin: 0 !important;
    max-width: min(560px, calc(100vw - 24px));
    box-shadow: 0 8px 26px rgba(0, 0, 0, 0.42);
}

#indicators-settings.technical-chart-indicator-settings {
    box-sizing: border-box;
    width: min(620px, calc(100vw - 24px));
    min-width: 0;
    max-width: min(620px, calc(100vw - 24px));
    max-height: calc(100vh - 94px);
    overflow: hidden;
    border: 1px solid #465364;
    border-radius: 9px;
    background: #1e2630;
    color: #eef2f6;
    font: 13px iransansx, Tahoma, sans-serif;
}

#indicators-settings .technical-chart-settings-header {
    padding: 8px 12px !important;
    background: #18202a;
    cursor: default;
}

#indicators-settings .technical-chart-settings-header > div {
    display: flex;
    gap: 8px;
    align-items: baseline;
}

#indicators-settings .technical-chart-settings-header strong {
    color: #fff;
    font-size: 16px;
}

#indicators-settings .technical-chart-settings-header small {
    color: #aeb8c2;
    font-size: 11px;
}

#indicators-settings .technical-chart-indicator-settings-body {
    display: grid;
    gap: 10px;
    max-height: calc(100vh - 148px);
    padding: 10px;
    overflow: auto;
    cursor: default;
}

.technical-chart-settings-section {
    padding: 10px;
    border: 1px solid #3c4855;
    border-radius: 7px;
    background: #242e39;
}

.technical-chart-settings-section h3 {
    margin: 0 0 9px;
    color: #f5f7fa;
    font-size: 13px;
    font-weight: 700;
}

.technical-chart-period-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 14px;
}

.technical-chart-period-grid label {
    display: grid;
    grid-template-columns: minmax(90px, 1fr) 86px;
    gap: 8px;
    align-items: center;
}

#indicators-settings input[type="number"],
#indicators-settings select {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    height: 31px;
    margin: 0;
    padding: 3px 7px;
    border: 1px solid #526170;
    border-radius: 5px;
    background: #17202a;
    color: #f2f5f8;
    font: inherit;
}

#indicators-settings input[type="number"] {
    width: 86px;
}

#indicators-settings .technical-chart-custom-color-picker {
    width: 38px;
    height: 28px;
    padding: 2px;
    border: 1px solid #526170;
    border-radius: 5px;
    background: #17202a;
}

.technical-chart-line-setting {
    display: grid;
    grid-template-columns: minmax(90px, 1fr) 30px 42px minmax(82px, 100px) minmax(100px, 130px);
    gap: 8px;
    align-items: center;
    padding: 7px 0;
    border-bottom: 1px solid rgba(94, 108, 122, 0.38);
}

.technical-chart-line-setting:last-of-type {
    border-bottom: 0;
}

.technical-chart-line-setting .vis {
    width: 28px;
    height: 28px;
    padding: 0;
    border: 0;
    border-radius: 4px;
    background: transparent;
    color: #c8d1da;
    cursor: pointer;
}

.technical-chart-line-setting .vis:hover {
    background: #344252;
    color: #fff;
}

.technical-chart-histogram-setting {
    display: grid;
    grid-template-columns: minmax(150px, 1fr) auto auto;
    gap: 14px;
    align-items: center;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #3c4855;
}

.technical-chart-histogram-setting label,
.technical-chart-background-setting,
.technical-chart-section-title-row {
    display: flex;
    gap: 7px;
    align-items: center;
}

.technical-chart-section-title-row {
    justify-content: space-between;
    margin-bottom: 8px;
}

.technical-chart-section-title-row h3 {
    margin: 0;
}

.technical-chart-background-setting {
    color: #cbd3dc;
    font-size: 12px;
}

#levels-parent {
    grid-template-columns: minmax(72px, auto) 32px minmax(70px, 1fr) 42px minmax(100px, 140px);
    gap: 8px;
    align-items: center;
}

#levels-parent > * {
    margin: 3px 0;
}

.technical-chart-automatic-level-value {
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    padding: 3px 8px;
    border: 1px solid #465364;
    border-radius: 4px;
    background: rgba(110, 124, 138, 0.12);
    color: inherit;
    font-weight: 600;
}

.technical-chart-automatic-level-value::after {
    content: "خودکار";
    opacity: 0.65;
    font-size: 10px;
}

.technical-chart-level-name {
    white-space: nowrap;
    font-size: 11px;
    font-weight: 600;
}

.technical-chart-overlay-settings-panel {
    position: absolute;
    top: 62px;
    right: 64px;
    left: auto;
    box-sizing: border-box;
    width: min(700px, calc(100% - 88px));
    max-height: calc(100% - 84px);
    overflow: auto;
    border: 1px solid #465364;
    border-radius: 7px;
    background: #f8f9fa;
    color: #20252a;
    direction: rtl;
}

#mainchart[data-chart-theme="dark"] .technical-chart-overlay-settings-panel {
    background: #1e2630;
    color: #f4f7fa;
}

.technical-chart-overlay-settings-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(150px, 1fr));
    gap: 9px 12px;
    padding: 12px;
}

.technical-chart-overlay-settings-heading {
    grid-column: 1 / -1;
    margin-top: 3px;
    padding: 7px 9px;
    border: 1px solid #7c8792;
    border-radius: 5px;
    background: rgba(110, 124, 138, 0.12);
    font-weight: 700;
}

.technical-chart-overlay-settings-row {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: minmax(108px, 132px) minmax(0, 1fr);
    gap: 8px;
    align-items: center;
    min-height: 42px;
    padding: 6px 9px;
    border-radius: 5px;
    background: rgba(110, 124, 138, 0.08);
}

.technical-chart-overlay-settings-row-title {
    white-space: nowrap;
}

.technical-chart-overlay-settings-row-controls {
    display: grid;
    grid-template-columns: 92px 72px 72px 105px;
    gap: 7px;
    align-items: center;
    justify-content: flex-start;
    min-width: 0;
}

.technical-chart-overlay-settings-inline-field {
    display: inline-flex;
    gap: 4px;
    align-items: center;
    justify-content: flex-start;
    min-width: 0;
    white-space: nowrap;
}

.technical-chart-overlay-settings-inline-field input[type="number"],
.technical-chart-overlay-settings-inline-field select {
    box-sizing: border-box;
    width: 52px;
    min-width: 44px;
    max-width: 58px;
}

.technical-chart-overlay-settings-inline-field .technical-chart-custom-color-picker {
    width: 40px;
    min-width: 40px;
    height: 30px;
    padding: 2px;
}

.technical-chart-overlay-settings-fields[data-indicator="ichimoku"] {
    display: block;
    padding: 7px 10px 10px;
}

.technical-chart-ichimoku-settings-table {
    width: 100%;
    border-spacing: 0 6px;
    table-layout: fixed;
    direction: rtl;
    font-size: 12px;
    text-align: center;
}

.technical-chart-ichimoku-settings-table th,
.technical-chart-ichimoku-settings-table td {
    box-sizing: border-box;
    height: 35px;
    padding: 4px 6px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.technical-chart-ichimoku-settings-table thead th {
    height: 25px;
    padding-top: 0;
    padding-bottom: 1px;
    background: transparent;
    color: #68717c;
    font-size: 10px;
    font-weight: 500;
}

.technical-chart-ichimoku-settings-table tbody th,
.technical-chart-ichimoku-settings-table tbody td {
    background: rgba(110, 124, 138, 0.08);
}

.technical-chart-ichimoku-settings-table tbody th {
    padding-right: 10px;
    font-size: 12px;
    font-weight: 700;
    text-align: right;
}

.technical-chart-ichimoku-settings-table tbody tr > :first-child {
    border-radius: 0 5px 5px 0;
}

.technical-chart-ichimoku-settings-table tbody tr > :last-child {
    border-radius: 5px 0 0 5px;
}

.technical-chart-ichimoku-settings-table tr > :nth-child(1) {
    width: 30%;
}

.technical-chart-ichimoku-settings-table tr > :nth-child(2) {
    width: 12%;
}

.technical-chart-ichimoku-settings-table tr > :nth-child(3) {
    width: 18%;
}

.technical-chart-ichimoku-settings-table tr > :nth-child(4),
.technical-chart-ichimoku-settings-table tr > :nth-child(5) {
    width: 20%;
}

.technical-chart-ichimoku-settings-table input[type="number"],
.technical-chart-ichimoku-settings-table select {
    box-sizing: border-box;
    width: 56px;
    max-width: 100%;
    height: 27px;
    font-size: 11px;
    text-align: center;
}

.technical-chart-ichimoku-settings-table .technical-chart-custom-color-picker {
    box-sizing: border-box;
    width: 42px;
    max-width: 100%;
    height: 28px;
    padding: 2px;
}

.technical-chart-overlay-visibility-button {
    width: 29px;
    height: 29px;
    padding: 0;
    border: 0;
    border-radius: 4px;
    background: transparent;
    color: inherit;
    font-size: 14px;
    cursor: pointer;
}

.technical-chart-overlay-visibility-button:hover,
.technical-chart-overlay-visibility-button:focus-visible {
    background: rgba(90, 105, 120, 0.14);
}

#mainchart[data-chart-theme="dark"] .technical-chart-ichimoku-settings-table thead th {
    color: #aeb8c3;
}

body input[type="checkbox"] {
    width: 18px;
    min-width: 18px;
    height: 18px;
    margin: 0;
    accent-color: #5965e8;
    cursor: pointer;
}

.technical-chart-overlay-setting-field,
.technical-chart-overlay-checkbox-field {
    display: grid;
    grid-template-columns: minmax(80px, 1fr) minmax(64px, 110px);
    gap: 8px;
    align-items: center;
    min-height: 34px;
    padding: 4px 7px;
    border-radius: 5px;
    background: rgba(110, 124, 138, 0.08);
}

.technical-chart-overlay-setting-field input,
.technical-chart-overlay-setting-field select {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
}

.technical-chart-overlay-checkbox-field input {
    justify-self: end;
}

.technical-chart-overlay-settings-fields[data-indicator="rangeFilter"] .technical-chart-overlay-select-field {
    grid-column: 1 / -1;
    grid-template-columns: minmax(80px, 1fr) minmax(0, 210px);
}

.technical-chart-overlay-settings-reset {
    grid-column: 1 / -1;
    justify-self: end;
    min-height: 40px;
    padding: 6px 12px;
    border: 1px solid #7c8792;
    border-radius: 5px;
    background: rgba(110, 124, 138, 0.1);
    color: inherit;
    font: inherit;
    cursor: pointer;
}

@media (max-width: 640px) {
    .technical-chart-overlay-settings-panel {
        right: 12px;
        width: calc(100% - 24px);
    }

    .technical-chart-overlay-settings-fields {
        grid-template-columns: 1fr;
    }

    .technical-chart-overlay-settings-heading {
        grid-column: 1;
    }

    .technical-chart-overlay-settings-row {
        grid-column: 1;
        grid-template-columns: 1fr;
        gap: 6px;
    }

    .technical-chart-overlay-settings-row-controls {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        justify-content: stretch;
    }

    .technical-chart-period-grid {
        grid-template-columns: 1fr;
    }

    .technical-chart-line-setting {
        grid-template-columns: minmax(75px, 1fr) 28px 38px minmax(65px, 82px) minmax(82px, 100px);
        gap: 5px;
    }
}

.technical-chart-settings-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 32px !important;
    padding: 4px 10px !important;
    border-bottom: 1px solid #465364;
}

.technical-chart-settings-header button {
    border: 0;
    background: transparent;
    color: inherit;
    font-size: 24px;
    cursor: pointer;
}

.technical-chart-background-setting {
    align-items: center;
}

#settingsmodal {
    z-index: 10070 !important;
    max-width: none !important;
}

#settingsmodal .modal-content {
    box-sizing: border-box;
    width: min(780px, calc(100vw - 30px));
    max-height: calc(100vh - 40px);
    margin: 20px auto;
    padding: 0;
    overflow: hidden;
    border: 1px solid #8d99a6;
    border-radius: 9px;
    background: #f8f9fa;
    color: #202a34;
    box-shadow: 0 12px 36px rgba(15, 23, 31, 0.28);
}

#settingsclose {
    color: inherit !important;
    cursor: pointer;
}

.technical-chart-general-settings-dialog .technical-chart-settings-header {
    padding: 9px 12px !important;
    border-bottom-color: #8d99a6;
    background: #edf1f4;
}

.technical-chart-general-settings-dialog .technical-chart-settings-header > div {
    display: grid;
    gap: 2px;
}

.technical-chart-general-settings-dialog .technical-chart-settings-header strong {
    font-size: 16px;
}

.technical-chart-general-settings-dialog .technical-chart-settings-header small {
    color: #5f6d79;
    font-size: 11px;
}

.technical-chart-general-settings-body {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    max-height: calc(100vh - 102px);
    padding: 10px;
    overflow: auto;
}

.technical-chart-general-settings-section {
    box-sizing: border-box;
    min-width: 0;
    padding: 9px;
    border: 1px solid #aab4bd;
    border-radius: 7px;
    background: #f0f3f5;
}

.technical-chart-general-chart-section,
.technical-chart-shortcut-reference-section {
    grid-column: 1 / -1;
}

.technical-chart-general-settings-section h3 {
    margin: 0 0 8px;
    color: inherit;
    font-size: 13px;
}

.technical-chart-general-settings-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
}

.technical-chart-general-setting-field {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    align-items: center;
    min-height: 34px;
    padding: 4px 7px;
    border-radius: 5px;
    background: rgba(110, 124, 138, 0.08);
    font-size: 11px;
}

.technical-chart-general-setting-field .technical-chart-custom-color-picker {
    box-sizing: border-box;
    width: 44px;
    height: 29px;
    padding: 2px;
}

.technical-chart-general-setting-field select {
    box-sizing: border-box;
    width: min(190px, 100%);
    min-width: 125px;
    height: 30px;
    font-size: 11px;
}

.technical-chart-shortcut-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px 10px;
}

.technical-chart-shortcut-grid > div {
    display: grid;
    grid-template-columns: minmax(56px, auto) minmax(0, 1fr);
    gap: 8px;
    align-items: center;
    min-height: 28px;
    font-size: 11px;
}

.technical-chart-shortcut-grid kbd {
    direction: ltr;
    padding: 3px 6px;
    border: 1px solid #9da8b2;
    border-radius: 4px;
    background: #fff;
    color: #26323d;
    font: 10px Consolas, monospace;
    text-align: center;
}

body[data-technical-chart-theme="dark"] #settingsmodal .technical-chart-general-settings-dialog {
    border-color: #465364;
    background: #1e2630;
    color: #eef2f6;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.48);
}

body[data-technical-chart-theme="dark"] .technical-chart-general-settings-dialog .technical-chart-settings-header {
    border-bottom-color: #526170;
    background: #18202a;
}

body[data-technical-chart-theme="dark"] .technical-chart-general-settings-dialog .technical-chart-settings-header small {
    color: #aeb8c2;
}

body[data-technical-chart-theme="dark"] .technical-chart-general-settings-section {
    border-color: #526170;
    background: #17202a;
}

body[data-technical-chart-theme="dark"] .technical-chart-general-setting-field {
    background: rgba(130, 145, 160, 0.1);
}

body[data-technical-chart-theme="dark"] .technical-chart-general-setting-field select,
body[data-technical-chart-theme="dark"] .technical-chart-shortcut-grid kbd {
    border-color: #526170;
    background: #26313d;
    color: #eef2f6;
}

@media (max-width: 640px) {
    .technical-chart-general-settings-body,
    .technical-chart-general-settings-grid,
    .technical-chart-shortcut-grid {
        grid-template-columns: 1fr;
    }

    .technical-chart-general-chart-section,
    .technical-chart-shortcut-reference-section {
        grid-column: 1;
    }
}

/* Symbol search dialog */
#searchModal {
    z-index: 10080;
}

#searchModal .technical-chart-search-dialog {
    box-sizing: border-box;
    width: min(620px, calc(100vw - 30px));
    max-height: min(680px, calc(100vh - 40px));
    margin: 40px auto;
    padding: 0;
    overflow: hidden;
    border: 1px solid #8d99a6;
    border-radius: 9px;
    background: #f8f9fa;
    color: #202a34;
    box-shadow: 0 10px 32px rgba(15, 23, 31, 0.25);
}

.technical-chart-search-dialog .technical-chart-settings-header {
    padding: 9px 12px !important;
    border-bottom-color: #8d99a6;
    background: #edf1f4;
}

.technical-chart-search-dialog .technical-chart-settings-header > div {
    display: grid;
    gap: 2px;
}

.technical-chart-search-dialog .technical-chart-settings-header strong {
    font-size: 16px;
}

.technical-chart-search-dialog .technical-chart-settings-header small {
    color: #5f6d79;
    font-size: 11px;
}

.technical-chart-search-body {
    display: grid;
    gap: 12px;
    padding: 14px;
}

.technical-chart-search-field {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr);
    gap: 6px;
    align-items: center;
    padding: 4px 8px;
    border: 1px solid #8795a2;
    border-radius: 7px;
    background: #fff;
    color: #5d6a76;
}

#searchModal #searching {
    box-sizing: border-box;
    width: 100%;
    height: 38px;
    margin: 0;
    padding: 4px 6px;
    border: 0;
    outline: 0;
    background: transparent;
    color: #202a34;
    text-align: right;
    font: 13px iransansx, Tahoma, sans-serif;
}

.technical-chart-search-field:focus-within {
    border-color: #1769aa;
    box-shadow: 0 0 0 2px rgba(23, 105, 170, 0.16);
}

.technical-chart-search-results {
    min-height: 90px;
    max-height: min(480px, calc(100vh - 190px));
    overflow: auto;
    border: 1px solid #a2adb7;
    border-radius: 7px;
    background: #fff;
}

#searchModal #searchResult {
    position: static;
    box-sizing: border-box;
    width: 100%;
    margin: 0;
    border-collapse: collapse;
    background: transparent;
    direction: rtl;
    text-align: right;
}

#searchModal #searchResult td {
    width: auto;
    padding: 0;
    border-bottom: 1px solid #c4ccd3;
}

#searchModal #searchResult tr:last-child td {
    border-bottom: 0;
}

#searchModal #searchResult a {
    display: block;
    padding: 10px 12px;
    color: #26333e;
    text-decoration: none;
}

#searchModal #searchResult tr:hover {
    background: #e9f2f8;
}

#searchModal .technical-chart-empty-search-result td {
    padding: 28px 12px;
    color: #66737e;
    text-align: center;
}

body[data-technical-chart-theme="dark"] #searchModal .technical-chart-search-dialog {
    border-color: #465364;
    background: #1e2630;
    color: #eef2f6;
    box-shadow: 0 10px 32px rgba(0, 0, 0, 0.45);
}

body[data-technical-chart-theme="dark"] .technical-chart-search-dialog .technical-chart-settings-header {
    border-bottom-color: #526170;
    background: #18202a;
}

body[data-technical-chart-theme="dark"] .technical-chart-search-dialog .technical-chart-settings-header small,
body[data-technical-chart-theme="dark"] #searchModal .technical-chart-empty-search-result td {
    color: #aeb8c2;
}

body[data-technical-chart-theme="dark"] .technical-chart-search-field,
body[data-technical-chart-theme="dark"] .technical-chart-search-results {
    border-color: #526170;
    background: #17202a;
    color: #b9c4ce;
}

body[data-technical-chart-theme="dark"] #searchModal #searching,
body[data-technical-chart-theme="dark"] #searchModal #searchResult a {
    color: #eef2f6;
}

body[data-technical-chart-theme="dark"] #searchModal #searchResult td {
    border-bottom-color: #3c4855;
}

body[data-technical-chart-theme="dark"] #searchModal #searchResult tr:hover {
    background: #293746;
}

/* Drawing toolbar and properties follow the chart theme. */
#xchart[data-chart-theme="light"] #sidebar {
    border-right-color: #7f8c98;
    background: #f3f6f8;
    box-shadow: 1px 0 0 #c3cbd2;
}

#xchart[data-chart-theme="dark"] #sidebar {
    border-right-color: #526170;
    background: #17202a;
    box-shadow: 1px 0 0 #0e151d;
}

#xchart[data-chart-theme="light"] #sidebar .drawing.fa {
    color: #4c5965 !important;
}

#xchart[data-chart-theme="dark"] #sidebar .drawing.fa {
    color: #d5dde5 !important;
}

#xchart[data-chart-theme="light"] #sidebar img.drawing {
    filter: none;
}

#xchart[data-chart-theme="dark"] #sidebar img.drawing:not(#btnClear) {
    filter: brightness(0) saturate(100%) invert(88%) sepia(7%) saturate(245%) hue-rotate(169deg) brightness(93%) contrast(88%);
}

#sidebar .drawing {
    box-sizing: border-box;
    border-radius: 4px;
}

#sidebar .drawing:hover {
    background: rgba(23, 105, 170, 0.18);
}

#xchart[data-chart-theme="light"] #style-panel {
    border-color: #8d99a6;
    background: #f8f9fa;
    color: #202a34;
}

#xchart[data-chart-theme="dark"] #style-panel {
    border-color: #465364;
    background: #1e2630;
    color: #eef2f6;
}

#xchart[data-chart-theme="dark"] #style-panel button,
#xchart[data-chart-theme="dark"] #style-panel select,
#xchart[data-chart-theme="dark"] #style-panel input {
    color: #eef2f6;
}

#xchart[data-chart-theme="light"] #style-panel .technical-chart-drawing-settings-section {
    border: 0;
    background: transparent;
}

#xchart[data-chart-theme="light"] #style-panel select,
#xchart[data-chart-theme="light"] #style-panel input[type="text"],
#xchart[data-chart-theme="light"] #style-panel .fabtn,
#xchart[data-chart-theme="light"] #style-panel .dual button,
#xchart[data-chart-theme="light"] #style-panel .thriple button,
#xchart[data-chart-theme="light"] #style-panel .technical-chart-color-selector,
#xchart[data-chart-theme="light"] #style-panel #fill-color-selector {
    border-color: #9ba7b2;
    background: #f5f7f9;
    color: #26323d;
}

#xchart[data-chart-theme="light"] #style-panel .color-palette-grid,
#xchart[data-chart-theme="light"] #style-panel .fibo-levels-grid {
    border-color: #8d99a6;
    background: #ffffff;
}


/* Stronger section boundaries when the chart uses the light theme. */
body[data-technical-chart-theme="light"] #indicators-settings.technical-chart-indicator-settings {
    border-color: #7f8c98;
    background: #f8f9fa;
    color: #202a34;
}

body[data-technical-chart-theme="light"] #indicators-settings .technical-chart-settings-header {
    border-bottom-color: #7f8c98;
    background: #e9eef2;
}

body[data-technical-chart-theme="light"] #indicators-settings .technical-chart-settings-header strong,
body[data-technical-chart-theme="light"] .technical-chart-settings-section h3 {
    color: #202a34;
}

body[data-technical-chart-theme="light"] #indicators-settings .technical-chart-settings-header small,
body[data-technical-chart-theme="light"] .technical-chart-background-setting {
    color: #53616d;
}

body[data-technical-chart-theme="light"] .technical-chart-settings-section {
    border-color: #8d99a6;
    background: #f0f3f5;
}

body[data-technical-chart-theme="light"] .technical-chart-line-setting {
    border-bottom-color: #aab4bd;
}

body[data-technical-chart-theme="light"] #indicators-settings input[type="number"],
body[data-technical-chart-theme="light"] #indicators-settings select,
body[data-technical-chart-theme="light"] #indicators-settings .technical-chart-custom-color-picker {
    border-color: #8d99a6;
    background: #fff;
    color: #202a34;
}

/* Automatic-analysis menu uses the chart theme and exposes every active choice. */
#analysis-selector {
    box-sizing: border-box;
    padding: 9px 9px 10px;
    direction: ltr;
}

#analysis-selector > div {
    margin-top: 6px;
}

#analysis-selector .technical-chart-analysis-header {
    display: flex;
    direction: ltr;
    align-items: center;
    gap: 6px;
    margin-top: 0;
}

#analysis-selector .technical-chart-analysis-close {
    display: grid;
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
    margin: 0;
    padding: 0;
    place-items: center;
    border: 1px solid currentColor;
    border-radius: 5px;
    background: transparent;
    color: inherit;
    cursor: pointer;
    opacity: 0.75;
}

#analysis-selector .technical-chart-analysis-close:hover {
    border-color: #b63838;
    background: rgba(182, 56, 56, 0.14);
    color: #d84a4a;
    opacity: 1;
}

#analysis-selector .technical-chart-analysis-channel-count {
    display: inline-flex;
    min-height: 28px;
    direction: rtl;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    white-space: nowrap;
}

#analysis-selector .technical-chart-analysis-channel-count select {
    width: 48px;
    min-width: 48px;
    height: 28px;
    padding: 2px 4px;
    border: 1px solid currentColor;
    border-radius: 5px;
    background: transparent;
    color: inherit;
    font: inherit;
}

#analysis-selector .technical-chart-analysis-pivot {
    display: inline-flex;
    min-height: 28px;
    direction: rtl;
    align-items: center;
    justify-content: center;
}

#analysis-selector .technical-chart-analysis-row,
#analysis-selector .technical-chart-analysis-actions {
    display: flex;
    direction: ltr;
    align-items: stretch;
}

#analysis-selector .technical-chart-analysis-actions > .btxx {
    display: flex !important;
    direction: rtl;
    align-items: center;
    justify-content: center;
}

#analysis-selector .btxx {
    box-sizing: border-box;
    margin: 1px;
    border: 1px solid transparent;
    border-radius: 5px;
    background: transparent;
    color: inherit !important;
    text-align: center;
    transition: background-color 120ms ease, border-color 120ms ease, opacity 120ms ease;
}

#analysis-selector .btxx:hover {
    border-color: #5c93bd;
    background: rgba(23, 105, 170, 0.14);
    color: inherit !important;
}

#analysis-selector .grayx {
    color: inherit !important;
    opacity: 0.5;
}

#analysis-selector .technical-chart-analysis-disabled {
    cursor: not-allowed;
    filter: grayscale(1);
    opacity: 0.28;
    pointer-events: none;
}

#analysis-selector .technical-chart-active {
    outline: none;
    color: #fff !important;
    opacity: 1;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.24);
}

#analysis-selector #pivotx.technical-chart-active {
    border-color: #1769aa;
    background: #1769aa;
}

/* Match each horizon button to its corresponding automatic-channel series. */
#analysis-selector #up1 {
    --technical-chart-channel-color: #338BC6;
}

#analysis-selector #up2 {
    --technical-chart-channel-color: #204CAB;
}

#analysis-selector #up3 {
    --technical-chart-channel-color: #046A41;
}

#analysis-selector #down1 {
    --technical-chart-channel-color: #AF80B1;
}

#analysis-selector #down2 {
    --technical-chart-channel-color: #BB2FA6;
}

#analysis-selector #down3 {
    --technical-chart-channel-color: #800B3A;
}

#analysis-selector :is(#up1, #up2, #up3, #down1, #down2, #down3) {
    border-color: var(--technical-chart-channel-color);
    color: var(--technical-chart-channel-color) !important;
}

#analysis-selector :is(#up1, #up2, #up3, #down1, #down2, #down3).technical-chart-active {
    border-color: var(--technical-chart-channel-color);
    background: var(--technical-chart-channel-color);
    color: #fff !important;
}

#analysis-selector :is(#upTrendLine, #upMidLinesVis, #upParaLinesVis).technical-chart-active {
    border-color: #16833b;
    background: #16833b;
}

#analysis-selector :is(#downTrendLine, #downMidLinesVis, #downParaLinesVis).technical-chart-active {
    border-color: #b63838;
    background: #b63838;
}

#xchart[data-chart-theme="light"] #analysis-selector {
    border-color: #8d99a6;
    background: #f8f9fa;
    color: #26323d;
}

#xchart[data-chart-theme="dark"] #analysis-selector {
    border-color: #465364;
    background: #1e2630;
    color: #eef2f6;
}

/* Mobile and tablet workspace -------------------------------------------
   The desktop chart remains the default. JavaScript adds
   `technical-chart-mobile` only at phone and tablet widths. */
.technical-chart-mobile-only {
    display: none !important;
}

body.technical-chart-mobile {
    --technical-chart-mobile-safe-top: env(safe-area-inset-top, 0px);
    --technical-chart-mobile-safe-bottom: env(safe-area-inset-bottom, 0px);
    --technical-chart-mobile-safe-left: env(safe-area-inset-left, 0px);
    --technical-chart-mobile-safe-right: env(safe-area-inset-right, 0px);
    --technical-chart-mobile-topbar-height: calc(48px + var(--technical-chart-mobile-safe-top));
    --technical-chart-mobile-controls-height: calc(58px + var(--technical-chart-mobile-safe-bottom));
    --technical-chart-mobile-controls-width: 0px;
    overflow: hidden;
}

body.technical-chart-mobile #topbar {
    box-sizing: border-box;
    height: var(--technical-chart-mobile-topbar-height);
    padding: var(--technical-chart-mobile-safe-top) 6px 0;
    border-bottom-width: 1px;
    gap: 4px;
}

body.technical-chart-mobile #top-left-bar {
    position: static !important;
    display: block !important;
    width: 0 !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
}

body.technical-chart-mobile #top-left-bar .top-left-items {
    position: static !important;
    display: block !important;
    width: 0 !important;
    height: 0 !important;
    overflow: visible !important;
}

body.technical-chart-mobile #top-left-bar .top-left-items > * {
    display: none !important;
}

body.technical-chart-mobile #top-left-bar .top-left-items > .technical-chart-mobile-menu-host {
    display: contents !important;
}

body.technical-chart-mobile .technical-chart-mobile-menu-host > :not(#timeframe-selector, #scale-selector, #indicators-selector, #analysis-selector, #index-selector, #replay-selector) {
    display: none !important;
}

body.technical-chart-mobile #startbar {
    display: flex;
    width: auto;
    min-width: 0;
    height: 47px;
    align-items: center;
    gap: 2px;
    direction: rtl;
}

body.technical-chart-mobile #homepage {
    display: grid !important;
    width: 44px;
    height: 44px;
    margin: 0;
    place-items: center;
}

body.technical-chart-mobile #logo {
    width: 36px !important;
    height: 27px !important;
}

body.technical-chart-mobile #startbar .symbol {
    max-width: 92px;
    margin: 0 !important;
    overflow: hidden;
    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.technical-chart-mobile #startbar > span {
    display: grid;
    width: 42px;
    height: 44px;
    margin: 0 !important;
    place-items: center;
}

body.technical-chart-mobile .technical-chart-mobile-top-actions {
    display: flex !important;
    height: 44px;
    margin-inline-end: 0;
    margin-right: auto;
    align-items: center;
    justify-content: flex-end;
    gap: 2px;
    direction: rtl;
}

body.technical-chart-mobile .technical-chart-wide-mobile-action {
    display: none !important;
}

body.technical-chart-mobile .technical-chart-mobile-top-actions button {
    display: grid;
    width: 44px;
    height: 44px;
    padding: 0;
    place-items: center;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: inherit;
    font-size: 17px;
    cursor: pointer;
}

body.technical-chart-mobile .technical-chart-mobile-top-actions button.technical-chart-text-mobile-action {
    display: inline-flex;
    width: auto;
    min-width: 44px;
    padding: 0 9px;
    align-items: center;
    justify-content: center;
    font: 11px iransansx, Tahoma, sans-serif;
    white-space: nowrap;
}

@media (orientation: portrait) and (max-width: 1024px) {
    body.technical-chart-mobile #topbar:has(#mobile-nav-trigger) #startbar .symbol {
        display: none !important;
    }
}

body.technical-chart-mobile .technical-chart-mobile-top-actions button:is(.technical-chart-active, [aria-expanded="true"], [aria-pressed="true"]) {
    background: rgba(89, 101, 232, 0.16);
    color: inherit;
    outline: 1px solid rgba(118, 128, 239, 0.72);
    outline-offset: -2px;
}

body.technical-chart-mobile .technical-chart-overlay-legend-item:is(
    [data-indicator="movingAverages"],
    [data-indicator="bollinger"],
    [data-indicator="ichimoku"],
    [data-indicator="rangeFilter"]
) {
    display: none !important;
}

body.technical-chart-mobile .technical-chart-oscillator-legend {
    top: 2px;
    right: 78px;
    width: calc(100% - 83px);
    height: 24px;
    padding: 0;
    gap: 2px;
    color: #68737d !important;
    font-size: 9px;
}

body.technical-chart-mobile .technical-chart-oscillator-summary {
    order: 0;
    margin: 0;
    margin-right: auto;
    gap: 4px;
}

body.technical-chart-mobile .technical-chart-oscillator-title {
    margin-left: 2px;
    font-size: 11px;
    font-weight: 600;
}

body.technical-chart-mobile .technical-chart-oscillator-legend button {
    box-sizing: border-box;
    width: 32px;
    height: 32px;
    padding: 0;
}

body.technical-chart-mobile .technical-chart-oscillator-legend :is(
    .technical-chart-oscillator-title,
    .technical-chart-oscillator-summary,
    .technical-chart-oscillator-summary > span,
    button,
    i
) {
    color: #68737d !important;
}

body.technical-chart-mobile .technical-chart-oscillator-legend button:is(
    [data-role="visibility"],
    [data-role="move-up"],
    [data-role="move-down"]
) {
    display: none !important;
}

body.technical-chart-mobile #mainchart[data-chart-theme="dark"] .technical-chart-oscillator-legend,
body.technical-chart-mobile #mainchart[data-chart-theme="dark"] .technical-chart-oscillator-legend :is(
    .technical-chart-oscillator-title,
    .technical-chart-oscillator-summary,
    .technical-chart-oscillator-summary > span,
    button,
    i
) {
    color: #bdc6ce !important;
}

body.technical-chart-mobile #mainchart {
    position: absolute !important;
    top: var(--technical-chart-mobile-topbar-height);
    right: 0;
    bottom: var(--technical-chart-mobile-controls-height);
    left: 0;
    width: 100%;
    height: auto !important;
}

body.technical-chart-mobile #mobile-chart-controls {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 10050;
    box-sizing: border-box;
    display: grid !important;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    height: var(--technical-chart-mobile-controls-height);
    padding: 3px 4px var(--technical-chart-mobile-safe-bottom);
    border-top: 1px solid #526170;
    background: #17202a;
    color: #dce4eb;
    box-shadow: 0 -4px 18px rgba(0, 0, 0, 0.26);
    direction: rtl;
}

body.technical-chart-mobile #mobile-chart-controls button {
    display: grid;
    min-width: 0;
    min-height: 52px;
    padding: 3px 2px 2px;
    grid-template-rows: 24px 16px;
    place-items: center;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: inherit;
    font: 10px iransansx, Tahoma, sans-serif;
    cursor: pointer;
}

body.technical-chart-mobile #mobile-chart-controls button > i {
    font-size: 18px;
}

body.technical-chart-mobile #mobile-chart-controls button > img {
    width: 22px;
    height: 22px;
    filter: brightness(0) invert(1);
    opacity: 0.88;
}

body.technical-chart-mobile #mobile-chart-controls button:is(.technical-chart-active, [aria-expanded="true"], [aria-pressed="true"]) {
    background: rgba(89, 101, 232, 0.22);
    color: #fff;
    outline: 1px solid #7680ef;
    outline-offset: -1px;
}

body.technical-chart-mobile:not(.technical-chart-mobile-drawing-unlocked) .technical-chart-drawing-layer,
body.technical-chart-mobile.technical-chart-mobile-panel-open .technical-chart-drawing-layer {
    pointer-events: none !important;
}

body.technical-chart-mobile #sidebar {
    display: none !important;
}

body.technical-chart-mobile.technical-chart-mobile-drawing-sheet-open #sidebar {
    position: absolute;
    top: auto;
    right: 8px;
    bottom: calc(var(--technical-chart-mobile-controls-height) + 8px);
    left: 8px;
    z-index: 10055;
    box-sizing: border-box;
    display: grid !important;
    grid-template-columns: repeat(5, minmax(48px, 1fr));
    width: auto;
    height: auto;
    max-height: min(58dvh, 460px);
    padding: 8px;
    overflow-x: hidden;
    overflow-y: auto;
    border: 1px solid #526170;
    border-radius: 12px;
    background: #17202a;
    box-shadow: 0 12px 34px rgba(0, 0, 0, 0.48);
    direction: rtl;
    overscroll-behavior: contain;
}

body.technical-chart-mobile .technical-chart-mobile-drawing-header {
    grid-column: 1 / -1;
    display: flex !important;
    min-height: 52px;
    padding: 0 2px 8px;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    border-bottom: 1px solid #465364;
    color: #eef2f6;
    text-align: right;
}

body.technical-chart-mobile .technical-chart-mobile-drawing-header > div:first-child {
    display: grid;
    gap: 2px;
}

body.technical-chart-mobile .technical-chart-mobile-drawing-header strong {
    font-size: 14px;
}

body.technical-chart-mobile .technical-chart-mobile-drawing-header small {
    color: #aeb8c2;
    font-size: 10px;
}

body.technical-chart-mobile .technical-chart-mobile-drawing-header-actions {
    display: flex;
    align-items: center;
    gap: 5px;
}

body.technical-chart-mobile .technical-chart-mobile-drawing-header button {
    display: inline-flex;
    min-height: 44px;
    padding: 0 10px;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border: 1px solid #596879;
    border-radius: 7px;
    background: #222e3a;
    color: #eef2f6;
    font: 11px iransansx, Tahoma, sans-serif;
    cursor: pointer;
}

body.technical-chart-mobile #mobile-drawing-sheet-close {
    width: 44px;
    padding: 0;
    font-size: 16px;
}

body.technical-chart-mobile #sidebar .drawing {
    box-sizing: border-box;
    display: grid;
    width: 48px;
    height: 48px;
    margin: 2px auto;
    padding: 9px;
    place-items: center;
    border: 1px solid transparent;
    border-radius: 8px;
    font-size: 22px;
    cursor: pointer;
}

body.technical-chart-mobile #sidebar .drawing:focus-visible {
    border-color: #8d98ff;
    outline: 2px solid #8d98ff;
    outline-offset: 1px;
}

body.technical-chart-mobile #sidebar #btnClear {
    border-color: rgba(216, 74, 74, 0.35);
    background: rgba(216, 74, 74, 0.08);
}

body.technical-chart-mobile #scale-selector,
body.technical-chart-mobile #timeframe-selector,
body.technical-chart-mobile #indicators-selector {
    position: fixed !important;
    top: auto !important;
    right: 8px !important;
    bottom: calc(var(--technical-chart-mobile-controls-height) + 8px) !important;
    left: 8px !important;
    box-sizing: border-box;
    width: auto;
    min-width: 0;
    max-height: calc(100dvh - var(--technical-chart-mobile-topbar-height) - var(--technical-chart-mobile-controls-height) - 24px);
    margin: 0;
    overflow-y: auto;
    border-color: #526170;
    border-radius: 12px;
    background: #17202a;
    box-shadow: 0 12px 34px rgba(0, 0, 0, 0.48);
    overscroll-behavior: contain;
}

body.technical-chart-mobile #timeframe-selector[style*="display: block"] {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    padding: 8px;
}

body.technical-chart-mobile #scale-selector {
    z-index: 10055;
    border: 1px solid #526170;
}
body.technical-chart-mobile #scale-selector[style*="display: block"] {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 8px;
}
body.technical-chart-mobile #scale-selector > div {
    box-sizing: border-box;
    display: flex;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    padding: 7px 10px;
    border-radius: 7px;
}

body.technical-chart-mobile #indicators-selector[style*="display: block"] {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 8px;
}

body.technical-chart-mobile #index-selector,
body.technical-chart-mobile #replay-selector {
    position: fixed !important;
    top: calc(var(--technical-chart-mobile-topbar-height) + 4px) !important;
    right: auto !important;
    bottom: auto !important;
    z-index: 10055;
    box-sizing: border-box;
    min-width: 0 !important;
    max-height: calc(100dvh - var(--technical-chart-mobile-topbar-height) - 12px);
    margin: 0;
    overflow: auto;
    border: 1px solid #526170;
    border-radius: 10px;
    background: #17202a;
    box-shadow: 0 12px 34px rgba(0, 0, 0, 0.48);
    color: #dce4eb;
    overscroll-behavior: contain;
}

body.technical-chart-mobile #index-selector {
    width: min(320px, calc(100vw - var(--technical-chart-mobile-controls-width) - 16px));
}

body.technical-chart-mobile #index-selector[style*="display: block"] {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 8px;
}

body.technical-chart-mobile #index-selector > div {
    box-sizing: border-box;
    display: flex;
    min-height: 44px;
    padding: 7px 10px;
    align-items: center;
    justify-content: center;
    border-radius: 7px;
}

body.technical-chart-mobile #replay-selector {
    width: min(620px, calc(100vw - var(--technical-chart-mobile-controls-width) - 16px));
    padding: 8px;
}

body.technical-chart-mobile #replay-selector[style*="display: block"] {
    display: block !important;
}

body.technical-chart-mobile #replay-selector > div {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

body.technical-chart-mobile #replay-selector :is(.bt, .tooltip) {
    box-sizing: border-box;
    display: inline-flex;
    min-width: 44px;
    min-height: 44px;
    margin: 0;
    align-items: center;
    justify-content: center;
    border-radius: 7px;
}

body.technical-chart-mobile #replay-selector select {
    min-height: 44px;
    margin: 0;
}

body.technical-chart-mobile :is(#timeframe-selector, #indicators-selector) > div {
    box-sizing: border-box;
    min-height: 48px;
    padding: 8px 10px;
    justify-content: center;
    border-radius: 7px;
    font-size: 12px;
    text-align: center;
}

body.technical-chart-mobile #analysis-selector {
    position: fixed !important;
    top: auto !important;
    right: 8px !important;
    bottom: calc(var(--technical-chart-mobile-controls-height) + 8px) !important;
    left: 8px !important;
    z-index: 10055;
    box-sizing: border-box;
    width: auto !important;
    min-width: 0 !important;
    max-width: none;
    max-height: calc(100dvh - var(--technical-chart-mobile-topbar-height) - var(--technical-chart-mobile-controls-height) - 24px);
    padding: 10px;
    overflow: auto;
    border: 1px solid #526170;
    border-radius: 12px;
    box-shadow: 0 12px 34px rgba(0, 0, 0, 0.48);
    zoom: 1 !important;
    overscroll-behavior: contain;
}

body.technical-chart-mobile #analysis-selector .technical-chart-analysis-header {
    display: flex;
    min-width: 0;
    direction: rtl;
    flex-wrap: wrap;
    gap: 7px;
}

body.technical-chart-mobile #analysis-selector .technical-chart-analysis-title {
    display: flex !important;
    min-height: 44px;
    flex: 1 1 calc(100% - 52px);
    align-items: center;
    font-size: 14px;
    font-weight: 700;
}

body.technical-chart-mobile #analysis-selector .technical-chart-analysis-close {
    order: -1;
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
}

body.technical-chart-mobile #analysis-selector .technical-chart-analysis-pivot,
body.technical-chart-mobile #analysis-selector .technical-chart-analysis-channel-count {
    min-height: 44px;
    flex: 1 1 140px;
}

body.technical-chart-mobile #analysis-selector .technical-chart-analysis-channel-count select {
    width: 64px;
    min-width: 64px;
    height: 38px;
}

body.technical-chart-mobile #analysis-selector .technical-chart-analysis-row {
    display: block !important;
    width: 100%;
}

body.technical-chart-mobile #analysis-selector .technical-chart-analysis-actions {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
    gap: 5px;
}

body.technical-chart-mobile #analysis-selector .technical-chart-analysis-actions > .btxx {
    box-sizing: border-box;
    width: auto !important;
    min-width: 0;
    min-height: 44px;
    margin: 0;
    padding: 5px;
    line-height: 1.7;
}

body.technical-chart-mobile #technical-chart-overlay-settings,
body.technical-chart-mobile #indicators-settings {
    position: fixed !important;
    top: auto !important;
    right: 8px !important;
    bottom: calc(var(--technical-chart-mobile-controls-height) + 8px) !important;
    left: 8px !important;
    box-sizing: border-box;
    width: auto !important;
    min-width: 0 !important;
    max-width: none;
    max-height: calc(100dvh - var(--technical-chart-mobile-topbar-height) - var(--technical-chart-mobile-controls-height) - 24px);
    overflow: auto;
    border-radius: 12px;
}

body.technical-chart-mobile #style-panel.technical-chart-drawing-settings {
    position: fixed;
    top: auto !important;
    right: 8px !important;
    bottom: calc(var(--technical-chart-mobile-controls-height) + 8px) !important;
    left: 8px !important;
    width: auto;
    min-width: 0;
    max-width: none;
    max-height: calc(100dvh - var(--technical-chart-mobile-topbar-height) - var(--technical-chart-mobile-controls-height) - 24px);
    overflow: auto;
    cursor: default;
}

body.technical-chart-mobile #message {
    right: 10px;
    bottom: calc(var(--technical-chart-mobile-controls-height) + 10px);
    left: 10px;
    max-width: none;
}

body.technical-chart-mobile #settingsmodal .technical-chart-general-settings-dialog {
    width: calc(100vw - 16px);
    max-height: calc(100dvh - 16px);
    margin: 8px auto;
    border-radius: 12px;
}

body.technical-chart-mobile .technical-chart-general-settings-dialog .technical-chart-settings-header {
    min-height: 50px !important;
}

body.technical-chart-mobile .technical-chart-general-settings-dialog .technical-chart-settings-header button {
    width: 44px;
    height: 44px;
    padding: 0;
}

body.technical-chart-mobile .technical-chart-general-settings-body {
    grid-template-columns: 1fr;
    max-height: calc(100dvh - 76px);
    padding-bottom: calc(12px + var(--technical-chart-mobile-safe-bottom));
}

body.technical-chart-mobile .technical-chart-general-chart-section,
body.technical-chart-mobile .technical-chart-shortcut-reference-section {
    grid-column: 1;
}

body.technical-chart-mobile .technical-chart-mobile-overlay-section {
    display: block !important;
    order: -1;
}

body.technical-chart-mobile .technical-chart-mobile-overlay-section > p {
    margin: -2px 0 9px;
    color: #66737e;
    font-size: 10px;
    line-height: 1.9;
}

body.technical-chart-mobile .technical-chart-mobile-overlay-section .technical-chart-overlay-settings-fields {
    padding: 0;
    gap: 7px;
}

body.technical-chart-mobile .technical-chart-mobile-overlay-section[data-indicator="movingAverages"] .technical-chart-overlay-settings-fields {
    grid-template-columns: 1fr;
}

body.technical-chart-mobile .technical-chart-mobile-overlay-section[data-indicator="movingAverages"] .technical-chart-overlay-settings-row {
    grid-template-columns: 1fr;
    min-height: 0;
    padding: 7px;
    gap: 6px;
}

body.technical-chart-mobile .technical-chart-mobile-overlay-section[data-indicator="movingAverages"] .technical-chart-overlay-settings-row-title {
    padding: 0 2px 5px;
    border-bottom: 1px solid rgba(110, 124, 138, 0.18);
    font-size: 12px;
}

body.technical-chart-mobile .technical-chart-mobile-overlay-section[data-indicator="movingAverages"] .technical-chart-overlay-settings-row-controls {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 5px;
    justify-content: stretch;
}

body.technical-chart-mobile .technical-chart-mobile-overlay-section[data-indicator="movingAverages"] .technical-chart-overlay-settings-inline-field {
    display: flex;
    min-height: 52px;
    padding: 4px 2px;
    flex-direction: column;
    justify-content: space-between;
    gap: 3px;
    border-radius: 5px;
    background: rgba(110, 124, 138, 0.07);
    font-size: 9px;
    text-align: center;
}

body.technical-chart-mobile .technical-chart-mobile-overlay-section[data-indicator="movingAverages"] .technical-chart-overlay-settings-inline-field > span {
    overflow: hidden;
    max-width: 100%;
    text-overflow: ellipsis;
}

body.technical-chart-mobile .technical-chart-mobile-overlay-section :is(input[type="number"], select) {
    min-height: 40px;
    text-align: center;
}

body.technical-chart-mobile .technical-chart-mobile-overlay-section .technical-chart-custom-color-picker {
    min-height: 40px;
}

body.technical-chart-mobile .technical-chart-mobile-overlay-section input[type="checkbox"] {
    width: 24px;
    height: 24px;
}

body.technical-chart-mobile .technical-chart-mobile-overlay-section[data-indicator="bollinger"] .technical-chart-overlay-settings-fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

body.technical-chart-mobile .technical-chart-mobile-overlay-section[data-indicator="bollinger"] :is(
    .technical-chart-overlay-setting-field,
    .technical-chart-overlay-checkbox-field
) {
    display: flex;
    min-height: 68px;
    padding: 7px;
    flex-direction: column;
    align-items: stretch;
    justify-content: space-between;
    gap: 5px;
    font-size: 10px;
    text-align: center;
}

body.technical-chart-mobile .technical-chart-mobile-overlay-section[data-indicator="bollinger"] :is(
    .technical-chart-overlay-setting-field,
    .technical-chart-overlay-checkbox-field
) > span {
    line-height: 1.65;
    white-space: normal;
}

body.technical-chart-mobile .technical-chart-mobile-overlay-section[data-indicator="bollinger"] :is(
    input[type="number"],
    select
) {
    width: 100%;
}

body.technical-chart-mobile .technical-chart-mobile-overlay-section[data-indicator="bollinger"] .technical-chart-custom-color-picker,
body.technical-chart-mobile .technical-chart-mobile-overlay-section[data-indicator="bollinger"] input[type="checkbox"] {
    align-self: center;
}

body.technical-chart-mobile .technical-chart-mobile-overlay-section[data-indicator="bollinger"] .technical-chart-overlay-checkbox-field:last-child {
    grid-column: 1 / -1;
    min-height: 44px;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    text-align: right;
}

body.technical-chart-mobile .technical-chart-mobile-overlay-section[data-indicator="ichimoku"] .technical-chart-overlay-settings-fields {
    display: block;
}

body.technical-chart-mobile .technical-chart-mobile-overlay-section[data-indicator="ichimoku"] .technical-chart-ichimoku-settings-table {
    border-spacing: 0;
}

body.technical-chart-mobile .technical-chart-mobile-overlay-section[data-indicator="ichimoku"] .technical-chart-ichimoku-settings-table thead {
    display: none;
}

body.technical-chart-mobile .technical-chart-mobile-overlay-section[data-indicator="ichimoku"] .technical-chart-ichimoku-settings-table tbody {
    display: grid;
    gap: 7px;
}

body.technical-chart-mobile .technical-chart-mobile-overlay-section[data-indicator="ichimoku"] .technical-chart-ichimoku-settings-table tbody tr {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 5px;
    padding: 7px;
    border-radius: 6px;
    background: rgba(110, 124, 138, 0.08);
}

body.technical-chart-mobile .technical-chart-mobile-overlay-section[data-indicator="ichimoku"] .technical-chart-ichimoku-settings-table tbody tr > th {
    grid-column: 1 / -1;
    width: auto;
    height: auto;
    padding: 0 2px 5px;
    border-bottom: 1px solid rgba(110, 124, 138, 0.18);
    border-radius: 0;
    background: transparent;
    font-size: 11px;
}

body.technical-chart-mobile .technical-chart-mobile-overlay-section[data-indicator="ichimoku"] .technical-chart-ichimoku-settings-table tbody td {
    display: grid;
    width: auto;
    height: auto;
    min-width: 0;
    padding: 0;
    justify-items: center;
    gap: 3px;
    border-radius: 0;
    background: transparent;
    overflow: visible;
}

body.technical-chart-mobile .technical-chart-mobile-overlay-section[data-indicator="ichimoku"] .technical-chart-ichimoku-settings-table tbody td::before {
    content: attr(data-label);
    color: #66737e;
    font-size: 9px;
}

body.technical-chart-mobile .technical-chart-mobile-overlay-section[data-indicator="ichimoku"] .technical-chart-ichimoku-settings-table :is(
    input[type="number"],
    select,
    .technical-chart-custom-color-picker,
    .technical-chart-overlay-visibility-button
) {
    box-sizing: border-box;
    width: 100%;
    max-width: 58px;
    min-height: 40px;
}

body.technical-chart-mobile .technical-chart-mobile-overlay-section[data-indicator="ichimoku"] .technical-chart-ichimoku-empty-cell {
    visibility: hidden;
}

body.technical-chart-mobile .technical-chart-shortcut-reference-section {
    display: none !important;
}

body.technical-chart-mobile #xchart[data-chart-theme="light"] #mobile-chart-controls,
body.technical-chart-mobile #xchart[data-chart-theme="light"] #sidebar,
body.technical-chart-mobile[data-technical-chart-theme="light"] #mobile-chart-controls,
body.technical-chart-mobile[data-technical-chart-theme="light"] #sidebar {
    border-color: #aab4bd;
    background: #f3f6f8;
    color: #26323d;
}

body.technical-chart-mobile #xchart[data-chart-theme="light"] #mobile-chart-controls button > img,
body.technical-chart-mobile[data-technical-chart-theme="light"] #mobile-chart-controls button > img {
    filter: none;
}

body.technical-chart-mobile[data-technical-chart-theme="dark"] .technical-chart-mobile-overlay-section > p,
body.technical-chart-mobile[data-technical-chart-theme="dark"] .technical-chart-mobile-overlay-section[data-indicator="ichimoku"] .technical-chart-ichimoku-settings-table tbody td::before {
    color: #aeb8c2;
}

@media (orientation: landscape) and (max-width: 1024px) {
    body.technical-chart-mobile {
        --technical-chart-mobile-topbar-height: calc(44px + var(--technical-chart-mobile-safe-top));
        --technical-chart-mobile-controls-height: 0px;
        --technical-chart-mobile-controls-width: calc(64px + var(--technical-chart-mobile-safe-left));
    }

    body.technical-chart-mobile #topbar {
        height: var(--technical-chart-mobile-topbar-height);
        padding-right: calc(6px + var(--technical-chart-mobile-safe-right));
        padding-left: calc(6px + var(--technical-chart-mobile-safe-left));
    }

    body.technical-chart-mobile #startbar {
        height: 44px;
    }

    body.technical-chart-mobile .technical-chart-mobile-top-actions {
        flex: 1 1 auto;
        min-width: 0;
        margin-inline-end: 0;
        overflow: hidden;
    }

    body.technical-chart-mobile .technical-chart-wide-mobile-action {
        display: inline-flex !important;
    }

    body.technical-chart-mobile .technical-chart-mobile-top-actions button.technical-chart-wide-mobile-action {
        width: auto;
        min-width: 52px;
        padding: 0 7px;
        display: inline-flex !important;
        gap: 0;
    }

    body.technical-chart-mobile .technical-chart-mobile-top-actions button.technical-chart-wide-mobile-action > span {
        font: 10px iransansx, Tahoma, sans-serif;
        white-space: nowrap;
    }

    body.technical-chart-mobile #mainchart {
        right: 0;
        bottom: 0;
        left: var(--technical-chart-mobile-controls-width);
        width: auto;
    }

    body.technical-chart-mobile #mobile-chart-controls {
        top: var(--technical-chart-mobile-topbar-height);
        right: auto;
        bottom: 0;
        left: 0;
        grid-template-columns: 1fr;
        grid-template-rows: repeat(5, minmax(44px, 1fr));
        width: var(--technical-chart-mobile-controls-width);
        height: auto;
        padding: 4px 3px 4px calc(3px + var(--technical-chart-mobile-safe-left));
        overflow-x: hidden;
        overflow-y: auto;
        border-top: 0;
        border-right: 1px solid #526170;
        box-shadow: 4px 0 18px rgba(0, 0, 0, 0.26);
    }

    body.technical-chart-mobile #mobile-chart-controls button {
        width: 100%;
        min-height: 44px;
        padding: 2px;
        grid-template-rows: 22px 15px;
    }

    body.technical-chart-mobile.technical-chart-mobile-drawing-sheet-open #sidebar {
        right: auto;
        bottom: 8px;
        left: calc(var(--technical-chart-mobile-controls-width) + 8px);
        width: min(560px, calc(100vw - var(--technical-chart-mobile-controls-width) - 16px));
        max-height: calc(100dvh - var(--technical-chart-mobile-topbar-height) - 16px);
        grid-template-columns: repeat(6, minmax(48px, 1fr));
    }

    body.technical-chart-mobile #timeframe-selector,
    body.technical-chart-mobile #scale-selector,
    body.technical-chart-mobile #indicators-selector,
    body.technical-chart-mobile #analysis-selector,
    body.technical-chart-mobile #technical-chart-overlay-settings,
    body.technical-chart-mobile #indicators-settings,
    body.technical-chart-mobile #style-panel.technical-chart-drawing-settings {
        right: 8px !important;
        bottom: 8px !important;
        left: calc(var(--technical-chart-mobile-controls-width) + 8px) !important;
    }

    body.technical-chart-mobile #indicators-selector[style*="display: block"] {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    body.technical-chart-mobile #analysis-selector .technical-chart-analysis-actions {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }

    body.technical-chart-mobile #message {
        right: 10px;
        bottom: 10px;
        left: calc(var(--technical-chart-mobile-controls-width) + 10px);
    }

    body.technical-chart-mobile #settingsmodal {
        z-index: 10070;
    }

    body.technical-chart-mobile #settingsmodal .technical-chart-general-settings-dialog {
        width: calc(100vw - 20px);
        max-height: calc(100dvh - 12px);
        margin: 6px auto;
    }

    body.technical-chart-mobile .technical-chart-general-settings-body {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        max-height: calc(100dvh - 68px);
    }

    body.technical-chart-mobile .technical-chart-mobile-overlay-section,
    body.technical-chart-mobile .technical-chart-general-chart-section,
    body.technical-chart-mobile .technical-chart-shortcut-reference-section {
        grid-column: 1 / -1;
    }
}

@media (orientation: landscape) and (max-width: 680px) {
    body.technical-chart-mobile #startbar .symbol {
        max-width: 64px;
    }

    body.technical-chart-mobile .technical-chart-mobile-top-actions button.technical-chart-wide-mobile-action {
        width: auto;
        min-width: 44px;
        padding: 0 6px;
        justify-content: center;
    }

    body.technical-chart-mobile .technical-chart-mobile-top-actions button.technical-chart-wide-mobile-action > span {
        display: inline;
    }
}

/* One movable incognito workspace owns both exercise modes. */
body:has(.incognito-workspace) #topbar { z-index: 10056; }
.private.incognito-workspace { display: flex; flex-direction: column; width: min(390px, calc(100vw - 24px)); max-width: calc(100vw - 24px); max-height: min(80dvh, calc(100dvh - 64px)); overflow: hidden; gap: 6px; }
.incognito-window-top, .incognito-window-footer { flex: none; background: inherit; }
.incognito-window-top { align-self: stretch; width: 100%; }
.incognito-window-controls { display: grid; width: 100%; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: stretch; gap: 5px; }
.private .incognito-window-controls > :is(.paper-mode-switch, button, a) { display: flex; flex-direction: row; align-items: center; justify-content: center; box-sizing: border-box; min-width: 0; height: 26px; min-height: 26px; margin: 0; padding: 0 !important; border: 1px solid #788da566; border-radius: 5px; font: inherit; text-decoration: none; text-align: center; }
.incognito-window-controls .paper-mode-switch { flex-wrap: nowrap; gap: 0; }
.incognito-window-controls .paper-mode-switch select { flex: 1; box-sizing: border-box; min-width: 0; width: 0; max-width: 100%; height: 24px; margin: 0; padding: 0; border: 0; font-size: 10px; }
.incognito-window-controls .paper-guide-handle { display: flex; flex: 0 0 18px; width: 18px; min-height: 24px; height: 24px; align-items: center; justify-content: center; font-size: 14px; }
.incognito-window-body { flex: 1 1 auto; min-height: 0; overflow: auto; overscroll-behavior: contain; }
.incognito-window-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px; padding: 5px; border-top: 1px solid #788da566; }
.incognito-window-footer button { min-height: 32px; }
.incognito-prediction-status { padding: 10px; line-height: 1.9; }
.technical-chart-paper-trading .incognito-prediction-status, .incognito-workspace:has(.prediction-question:not([hidden])) .incognito-prediction-status { display: none; }
.incognito-workspace .paper-trading-panel, .incognito-workspace .prediction-question { position: static !important; width: 100% !important; max-width: none !important; max-height: none !important; transform: none !important; margin: 0; padding: 0; overflow: visible; border: 0; box-shadow: none; background: transparent; }
.incognito-workspace .paper-trading-panel > header { display: none; }
.incognito-workspace .prediction-question { padding: 8px; }
.incognito-workspace .prediction-drag-handle { pointer-events: none; cursor: default; min-height: 0; margin: 0; }
.incognito-workspace .prediction-drag-handle > span { display: none; }

.incognito-exam-controls { display: flex; gap: 8px; align-items: center; justify-content: space-between; margin-top: 5px; padding: 4px; }
.incognito-exam-controls button:disabled { opacity: .5; cursor: not-allowed; }
.technical-chart-paper-trading .incognito-exam-controls { display: none; }
.private.incognito-collapsed :is(.incognito-exam-controls, .incognito-window-body, .incognito-window-footer) { display: none !important; }
.private #incognito-collapse { flex: 0 0 18px; width: 18px; height: 24px; min-height: 24px; padding: 0; border: 0; background: transparent; color: inherit; cursor: pointer; font-size: 16px; }
.private #incognito-collapse:focus-visible { outline: 2px solid #6dbbff; }
.paper-fee-section { margin-top: 12px; padding-top: 8px; border-top: 1px solid #788da544; }
.paper-fee-stats { grid-template-columns: 1fr; }

