.chart-template-dialog .chart-template-list{display:grid;gap:3px;margin-bottom:12px;max-height:44vh;overflow:auto}
.chart-template-list>div,.chart-template-prompt{display:flex;gap:4px;align-items:center}
.chart-template-list>div>button:first-child{text-align:left;flex:1;overflow-wrap:anywhere}
.chart-template-list button[aria-pressed=true]{box-shadow:inset 3px 0 var(--accent,#009957)}
.chart-template-prompt:not(:empty){padding-top:8px}.chart-template-prompt span{flex:1}
#terminal .chart-tile .chart-oscillators{flex:0 0 25%;max-height:165px;min-height:0;overflow:auto;background:#101010;color:#ddd}
.chart-oscillators>div{position:relative;height:100%;min-height:24px;box-sizing:border-box;border-top:1px solid #454545}
.chart-oscillators>div:first-child:nth-last-child(n+2),.chart-oscillators>div:first-child:nth-last-child(n+2)~div{height:50%}
.chart-oscillators canvas{display:block;width:100%;height:100%}
.chart-oscillators span{position:absolute;top:1px;left:4px;background:#131313d9;color:#dedede;padding:0 2px;font:10px/1.2 'Segoe UI',sans-serif;pointer-events:none}

/* The management dialog is only opened by save/manage actions; selection is anchored. */
dialog.chart-template-dialog.chart-indicator-dialog{padding:14px;width:min(560px,calc(100vw - 24px));background:var(--box,#525252);color:var(--fg,#eee)}
dialog.chart-template-dialog.chart-indicator-dialog h2{font-size:15px;margin:0 0 12px}
dialog.chart-template-dialog.chart-indicator-dialog .chart-template-list>div{display:flex;flex-wrap:wrap;gap:4px;min-width:0}
dialog.chart-template-dialog.chart-indicator-dialog .chart-template-list>div>button{min-width:0;padding:5px 8px}
dialog.chart-template-dialog.chart-indicator-dialog .chart-template-list>div>button:first-child{flex:1 1 100%}
dialog.chart-template-dialog.chart-indicator-dialog form>label{display:grid;grid-template-columns:110px minmax(0,1fr);align-items:center;gap:8px}
dialog.chart-template-dialog.chart-indicator-dialog .chart-template-prompt{flex-wrap:wrap}
dialog.chart-template-dialog.chart-indicator-dialog .indicator-actions{padding-top:8px;margin-bottom:8px}
