.chart-panel { display:flex; flex-direction:column; }
.chart-panel > .chart-wrap { flex:1; min-height:556px; height:auto; }
.yesfi-chart-grid { display:grid; grid-template-columns:minmax(0,1fr); grid-template-rows:minmax(0,1fr); gap:4px; background:#080d14; }
.yesfi-chart-grid[data-chart-layout="2"],.yesfi-chart-grid[data-chart-layout="4"] { grid-template-columns:repeat(2,minmax(0,1fr)); }
.yesfi-chart-grid[data-chart-layout="4"] { grid-template-rows:repeat(2,minmax(0,1fr)); }
.yesfi-chart-pane { min-width:0; min-height:0; position:relative; display:flex; flex-direction:column; background:#10151e; box-shadow:inset 0 0 0 1px #253040; }
.yesfi-chart-pane.active { box-shadow:none!important; }
.yesfi-chart-pane-toolbar { flex:0 0 32px; min-width:0; display:flex; align-items:center; gap:6px; padding:0 7px; background:#141c28; border-bottom:1px solid #253040; }
.yesfi-chart-pane-toolbar select { min-width:0; border:1px solid #2a384c; border-radius:4px; padding:3px 5px; background:#101722; color:#c9d4e6; font-size:11px; font-family:inherit; cursor:pointer; }
.yesfi-chart-symbol { flex:1; max-width:170px; min-width:0; position:relative; padding:3px 24px 3px 7px; border:1px solid var(--line,#2a384c); border-radius:4px; background:var(--yf-field,#101722); color:var(--yf-secondary,#c9d4e6); font:inherit; font-size:11px; text-align:left; white-space:nowrap; text-overflow:ellipsis; overflow:hidden; cursor:pointer; }
.yesfi-chart-symbol::after { content:'⌄'; position:absolute; right:7px; top:1px; font-size:13px; }
.yesfi-chart-symbol:disabled { opacity:.5; cursor:default; }
.yesfi-chart-symbol[aria-expanded="true"] { border-color:var(--blue,#4a8dff); }
.yesfi-chart-market-menu { z-index:1200; position:fixed; display:flex; flex-direction:column; box-sizing:border-box; width:320px; max-height:360px; padding:8px; border:1px solid var(--line,#33445b); border-radius:7px; background:var(--panel,#141b26); color:var(--text,#e4edfa); box-shadow:var(--yf-shadow,0 12px 40px #0008); font-family:inherit; font-size:12px; }
.yesfi-chart-market-menu[hidden] { display:none; }
.yesfi-chart-market-search { flex:0 0 auto; box-sizing:border-box; width:100%; min-width:0; margin:0 0 7px; padding:9px 10px; border:1px solid var(--line,#2a384c); border-radius:4px; background:var(--yf-field,#101722); color:var(--text,#e4edfa); font:inherit; }
.yesfi-chart-market-search::placeholder { color:var(--yf-placeholder,#687a96); }
.yesfi-chart-market-search:focus-visible,.yesfi-chart-symbol:focus-visible { outline:2px solid var(--blue,#70a6ff); outline-offset:1px; }
.yesfi-chart-market-results { flex:1 1 auto; min-height:0; overflow-y:auto; overflow-x:hidden; overscroll-behavior:contain; scrollbar-width:thin; scrollbar-color:var(--yf-scroll,#40516a) var(--yf-scroll-track,#101720); }
.yesfi-chart-market-results::-webkit-scrollbar { width:6px; }
.yesfi-chart-market-results::-webkit-scrollbar-track { background:var(--yf-scroll-track,#101720); }
.yesfi-chart-market-results::-webkit-scrollbar-thumb { background:var(--yf-scroll,#40516a); border-radius:4px; }
.yesfi-chart-market-results::-webkit-scrollbar-thumb:hover { background:var(--yf-scroll-hover,#607895); }
.yesfi-chart-market-option { display:flex; align-items:center; justify-content:space-between; gap:12px; box-sizing:border-box; width:100%; min-height:36px; padding:8px; border:0; border-radius:3px; background:transparent; color:var(--text,#e4edfa); font:inherit; text-align:left; cursor:pointer; }
.yesfi-chart-market-option strong { flex:0 0 auto; font-size:12px; font-weight:500; }
.yesfi-chart-market-option small { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:var(--yf-secondary,#aab9ce); font-size:11px; }
.yesfi-chart-market-option:hover,.yesfi-chart-market-option.highlighted { background:var(--yf-hover,#1a2535); }
.yesfi-chart-market-option[aria-selected="true"] strong { color:var(--blue,#70a6ff); }
.yesfi-chart-market-empty { margin:0; padding:16px 8px; color:var(--yf-secondary,#aab9ce); text-align:center; }
.yesfi-chart-canvas { flex:1; min-height:0; position:relative; margin:0 1px 1px; }
.chart-wrap.yesfi-chart-grid #price-chart,.yesfi-price-chart { height:100%; width:100%; }
.yesfi-chart-canvas .chart-empty { padding:10px; text-align:center; font-size:11px; }
.yesfi-chart-layout-menu { z-index:1100; position:fixed; width:262px; box-sizing:border-box; padding:15px; border:1px solid #33445b; border-radius:10px; background:#151e2c; color:#e4edfa; box-shadow:0 12px 40px #0008; font-size:13px; }
.yesfi-chart-layout-menu[hidden] { display:none; }
.yesfi-chart-layout-menu strong { font-size:13px; }
.yesfi-chart-layout-menu p { margin:12px 0 0; color:#91a1b9; font-size:11px; line-height:1.5; }
.yesfi-chart-layout-choices { display:flex; gap:9px; margin-top:13px; }
.yesfi-chart-layout-choice { flex:1; display:flex; flex-direction:column; align-items:center; gap:8px; padding:11px 4px 8px; border:1px solid #33445b; border-radius:6px; background:#101722; color:#aab9ce; font-size:11px; cursor:pointer; }
.yesfi-chart-layout-choice[aria-pressed="true"] { border-color:#4a8dff; background:#1c3254; color:#94baff; }
.yesfi-chart-layout-icon { width:34px; height:25px; display:grid; grid-template-columns:1fr; grid-template-rows:1fr; gap:3px; }
.yesfi-chart-layout-icon i { background:currentColor; opacity:.8; border-radius:1px; }
.yesfi-chart-layout-icon.layout-2,.yesfi-chart-layout-icon.layout-4 { grid-template-columns:repeat(2,1fr); }
.yesfi-chart-layout-icon.layout-4 { grid-template-rows:repeat(2,1fr); }
.yesfi-chart-layout-choice:focus-visible,.yesfi-chart-pane-toolbar button:focus-visible,.yesfi-chart-pane-toolbar select:focus-visible { outline:2px solid #70a6ff; outline-offset:2px; }
@media (max-width:700px) {
    .yesfi-chart-grid[data-chart-layout="2"],.yesfi-chart-grid[data-chart-layout="4"] { grid-template-columns:minmax(0,1fr); grid-template-rows:repeat(2,minmax(0,1fr)); }
    .yesfi-chart-grid[data-chart-layout="4"] { height:1112px; min-height:1112px; grid-template-rows:repeat(4,minmax(0,1fr)); }
}
