@import url('https://fonts.googleapis.com/css2?family=Be+Vietnam+Pro:ital,wght@0,400;0,500;0,600;0,700;0,800;0,900;1,400&family=Inter:wght@400;500;600;700;800;900&family=Roboto:wght@400;500;700;900&display=swap');
*{box-sizing:border-box}html,body{margin:0;min-height:100%;font-family:"Be Vietnam Pro", "Inter", "Roboto", "Segoe UI", Arial, Tahoma, Arial,sans-serif}.trend-workspace-body{height:100vh;overflow:hidden;background:#0f1115;color:#e5e7eb}.trend-shell{height:100vh;display:flex;flex-direction:column}.trend-topbar{min-height:62px;display:flex;align-items:center;gap:10px;padding:8px 12px;border-bottom:1px solid #262b34;background:#15181e;flex:0 0 auto}.trend-brand{display:flex;align-items:center;gap:7px;color:#f2f4f7;text-decoration:none;white-space:nowrap;font-size:14px}.trend-brand-mark{display:grid;place-items:center;width:27px;height:27px;border-radius:7px;background:#dc2626;color:#fff;font-weight:900}.trend-account-nav{display:flex;align-items:center;gap:2px}.trend-account-nav a{color:#8f9baa;text-decoration:none;font-size:11px;font-weight:700;padding:7px 8px;border-radius:6px}.trend-account-nav a:hover,.trend-account-nav a.active{background:#242a33;color:#fff}.trend-searchbar{display:grid;grid-template-columns:minmax(180px,1fr) 145px 115px minmax(150px,190px) auto;gap:6px;flex:1;max-width:1040px;min-width:0}.trend-searchbar>input,.trend-searchbar>select,.trend-picker-btn{height:38px;border:1px solid #303641;background:#0e1116;color:#e5e7eb;border-radius:7px;padding:0 9px;outline:none;min-width:0}.trend-searchbar>input:focus,.trend-searchbar>select:focus,.trend-picker:focus-within .trend-picker-btn{border-color:#64748b;box-shadow:0 0 0 2px rgba(100,116,139,.12)}.trend-primary,.trend-save{height:38px;border:0;border-radius:7px;background:#dc2626;color:#fff;font-weight:800;padding:0 14px;cursor:pointer}.trend-primary:hover,.trend-save:hover{filter:brightness(1.08)}
.trend-picker{position:relative;min-width:0}.trend-picker-btn{width:100%;display:flex;align-items:center;justify-content:space-between;gap:7px;cursor:pointer;text-align:left}.trend-picker-btn span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.trend-picker-btn i{font-style:normal;color:#7f8a9c;flex:none}.trend-picker-pop{position:absolute;z-index:80;left:0;top:calc(100% + 5px);width:max(100%,270px);max-width:min(420px,85vw);padding:7px;border:1px solid #374151;border-radius:9px;background:#161a20;box-shadow:0 16px 42px rgba(0,0,0,.44)}.trend-picker-pop-wide{width:390px}.trend-picker-pop>input{width:100%;height:36px;border:1px solid #343b46;border-radius:6px;background:#0e1116;color:#f3f4f6;padding:0 9px;outline:none}.trend-picker-list{max-height:330px;overflow:auto;margin-top:6px;overscroll-behavior:contain}.trend-picker-option{width:100%;display:flex;align-items:center;gap:7px;border:0;border-radius:6px;background:transparent;color:#d6dbe3;padding:7px 8px;text-align:left;cursor:pointer;font-size:11px}.trend-picker-option:hover,.trend-picker-option.active{background:#2a303a;color:#fff}.trend-picker-option small{margin-left:auto;color:#6b7280}.trend-picker-pop>small{display:block;padding:6px 7px 2px;color:#7f8a9c;font-size:9px}
.trend-user{margin-left:auto;display:flex;align-items:center;gap:9px;font-size:10px;white-space:nowrap;min-width:0}.trend-user>span{display:grid;max-width:190px;min-width:0}.trend-user b,.trend-user small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.trend-user b{font-size:11px;color:#f3f4f6}.trend-user small{color:#8f9baa;font-size:9px}.trend-user a{color:#94a3b8;text-decoration:none}.trend-main{flex:1;min-height:0;display:grid;grid-template-columns:minmax(0,1fr) 258px}.trend-chart-column{min-width:0;display:flex;flex-direction:column;background:#0f1115}.trend-chart-toolbar{height:44px;display:flex;align-items:center;justify-content:space-between;padding:5px 10px;border-bottom:1px solid #242934;background:#13171c;gap:12px}.trend-ranges{display:flex;gap:3px;overflow-x:auto}.trend-range-btn,.trend-chart-actions button,.trend-panel-head button{border:1px solid transparent;background:transparent;color:#b7c0cd;padding:6px 8px;border-radius:5px;cursor:pointer;font-size:11px;white-space:nowrap}.trend-range-btn:hover,.trend-chart-actions button:hover,.trend-panel-head button:hover{background:#242a33}.trend-range-btn.active{background:#303744;color:#fff;border-color:#40495a}.trend-chart-actions{display:flex;align-items:center;gap:5px;white-space:nowrap}.trend-chart-actions #dataMeta{font-size:10px;color:#94a3b8;max-width:220px;overflow:hidden;text-overflow:ellipsis}.trend-chart-actions .trend-save{height:30px;border:0;background:#b91c1c;color:#fff}.trend-chart-stage{position:relative;flex:1;min-height:0;overflow:hidden;background:#0e1116;touch-action:none}.trend-floating-tools{position:absolute;z-index:30;top:12px;left:18px;display:flex;align-items:center;gap:2px;padding:5px 7px;border:1px solid #d7dce2;border-radius:8px;background:#fff;box-shadow:0 5px 18px rgba(0,0,0,.28);user-select:none}.trend-drag-dots{color:#9ca3af;font-size:13px;letter-spacing:-4px;margin-right:3px}.trend-tool-group{display:flex;gap:2px}.trend-tool{width:32px;height:32px;border:1px solid transparent;background:transparent;color:#1f2937;border-radius:6px;font-size:16px;cursor:pointer;line-height:1}.trend-tool:hover{background:#eef2f6}.trend-tool.active{background:#e5e7eb;border-color:#cbd5e1;color:#111827}.trend-tool:disabled{opacity:.35;cursor:default}.trend-tool-sep{width:1px;height:24px;background:#d7dce2;margin:0 2px}#trendChart,#drawingLayer{position:absolute;inset:0;width:100%;height:100%}#drawingLayer{z-index:12;pointer-events:none;overflow:hidden}#drawingLayer .trend-object,#drawingLayer .trend-hit,#drawingLayer .trend-handle{pointer-events:all;cursor:move}#drawingLayer .trend-hit{stroke:rgba(0,0,0,0);stroke-width:16;fill:rgba(0,0,0,0)}#drawingLayer .trend-handle{cursor:pointer;filter:drop-shadow(0 1px 1px rgba(0,0,0,.5))}#drawingLayer .trend-draft{pointer-events:none!important;opacity:.72;stroke-dasharray:5 4}#drawingLayer .trend-selected{filter:drop-shadow(0 0 3px rgba(59,130,246,.85))}.trend-note-editor{position:absolute;z-index:45;width:250px;padding:8px;border:1px solid #475569;border-radius:9px;background:#171b21;box-shadow:0 14px 35px rgba(0,0,0,.45)}.trend-note-editor[hidden]{display:none}.trend-note-editor textarea{display:block;width:100%;min-height:82px;resize:vertical;border:1px solid #374151;border-radius:6px;background:#0f1217;color:#f8fafc;padding:8px;outline:none;font:12px/1.4 "Be Vietnam Pro", "Inter", "Roboto", "Segoe UI", Arial, Tahoma, Arial,sans-serif}.trend-note-editor>div{display:flex;justify-content:flex-end;gap:6px;margin-top:7px}.trend-note-editor button{border:1px solid #3b4350;background:#262c35;color:#e5e7eb;border-radius:6px;padding:5px 9px;cursor:pointer}.trend-note-editor [data-note-save]{background:#dc2626;border-color:#dc2626;color:#fff}.trend-loading{position:absolute;inset:0;z-index:40;display:flex;align-items:center;justify-content:center;gap:12px;background:rgba(14,17,22,.72);font-size:13px;color:#cbd5e1}.trend-loading.hidden{display:none}.trend-spinner{width:22px;height:22px;border:2px solid #3a414e;border-top-color:#ef4444;border-radius:50%;animation:trendSpin .75s linear infinite}@keyframes trendSpin{to{transform:rotate(360deg)}}.trend-statusbar{min-height:27px;padding:4px 10px;display:flex;gap:20px;align-items:center;border-top:1px solid #252a33;background:#12151a;color:#7f8a9c;font-size:10px;white-space:nowrap;overflow:hidden}.trend-statusbar span:first-child{color:#cbd5e1;overflow:hidden;text-overflow:ellipsis;max-width:40%}.trend-right-panel{border-left:1px solid #252a33;background:#12151a;padding:10px;overflow:auto}.trend-panel-head{display:flex;justify-content:space-between;align-items:center}.trend-panel-head h3,.trend-side-card h3{font-size:12px;margin:3px 0 10px;color:#e2e8f0}.trend-project-list{display:grid;gap:6px}.trend-project-item{border:1px solid #2a303a;background:#171b21;border-radius:8px;padding:9px;cursor:pointer}.trend-project-item:hover{border-color:#475569}.trend-project-item.active{border-color:#dc2626}.trend-project-item b{display:block;font-size:11px;color:#e5e7eb;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.trend-project-item small{display:block;color:#7f8a9c;font-size:9px;margin-top:4px}.trend-project-row{display:flex;justify-content:space-between;gap:8px;align-items:center}.trend-project-delete{border:0;background:transparent;color:#64748b;cursor:pointer}.trend-project-delete:hover{color:#f87171}.trend-side-card{margin-top:14px;padding:10px;border:1px solid #29313d;border-radius:8px;background:#171b21;font-size:10px;color:#8f9baa;line-height:1.45}.trend-side-card p{margin:5px 0;color:#aab4c2;overflow-wrap:anywhere}.trend-side-card label{display:flex;align-items:center;justify-content:space-between;gap:8px;border-top:1px solid #242a33;padding:7px 0}.trend-side-card label span{color:#aeb7c4}.trend-side-card input[type=color]{width:42px;height:27px;border:1px solid #3b4350;background:transparent;border-radius:5px;padding:2px;cursor:pointer}.trend-side-card input[type=range]{width:96px;accent-color:#dc2626}.trend-side-card small{display:block;margin-top:8px;color:#738094}.trend-secondary-btn{width:100%;margin-top:7px;border:1px solid #333b47;background:#222833;color:#cbd5e1;border-radius:6px;padding:7px 9px;cursor:pointer}.trend-secondary-btn:hover{background:#29313d}.trend-modal{position:fixed;inset:0;z-index:90;background:rgba(0,0,0,.58);display:flex;align-items:center;justify-content:center}.trend-modal[hidden]{display:none}.trend-modal-card{width:min(420px,calc(100vw - 30px));background:#171b21;border:1px solid #323a46;border-radius:12px;padding:18px;box-shadow:0 18px 60px #000}.trend-modal-card h3{margin:0 0 14px}.trend-modal-card label{display:grid;gap:6px;font-size:12px}.trend-modal-card input{height:40px;border:1px solid #3a4350;background:#0f1217;color:#fff;border-radius:7px;padding:0 10px}.trend-modal-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:16px}.trend-modal-actions button{height:36px;border:1px solid #353d49;background:#242a33;color:#e5e7eb;border-radius:7px;padding:0 14px;cursor:pointer}.trend-modal-actions .trend-primary{background:#dc2626;border:0}.trend-lock-card{max-width:760px;margin:70px auto;background:#fff;border:1px solid #e2e8f0;border-radius:22px;padding:42px;text-align:center;box-shadow:0 16px 45px rgba(15,23,42,.08)}.trend-lock-icon{width:64px;height:64px;display:grid;place-items:center;margin:0 auto 18px;border-radius:18px;background:#111827;color:#fff;font-size:30px;font-weight:900}.trend-lock-card h1{margin:8px 0 12px;font-size:32px;color:#0f172a}.trend-lock-card p{color:#64748b;line-height:1.7}.trend-lock-card code{background:#f1f5f9;padding:2px 5px;border-radius:5px}.trend-lock-actions{display:flex;justify-content:center;gap:9px;margin:24px 0 15px}.trend-lock-card small{color:#94a3b8}.trend-locked-page .portal-nav{position:sticky}.trend-locked-page .portal-nav-links a.active{background:#f1f5f9;color:#0f172a}
@media(max-width:1260px){.trend-main{grid-template-columns:minmax(0,1fr) 235px}.trend-right-panel{width:235px}.trend-account-nav{display:none}.trend-searchbar{grid-template-columns:minmax(160px,1fr) 125px 105px minmax(135px,165px) auto}.trend-user>span{max-width:130px}}
@media(max-width:1000px){.trend-right-panel{display:none}.trend-main{grid-template-columns:minmax(0,1fr)}.trend-user{display:none}.trend-searchbar{grid-template-columns:minmax(150px,1fr) 120px 105px minmax(125px,155px) auto}.trend-chart-actions #dataMeta{display:none}}
@media(max-width:760px){.trend-workspace-body{overflow:auto}.trend-shell{min-width:850px}.trend-lock-card{margin:30px 10px;padding:28px 18px}.trend-lock-actions{flex-direction:column}.trend-lock-actions .btn{width:100%}}

/* v20.123 Trend Pro interactions */
.trend-tool svg{width:20px;height:20px;display:block;margin:auto;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round;pointer-events:none}
.trend-data-mode{display:inline-flex;align-items:center;gap:5px;border:1px solid #475569;border-radius:999px;padding:4px 7px;font-size:9px;font-weight:900;letter-spacing:.045em;color:#cbd5e1;background:#111827}
.trend-data-mode.live{border-color:#166534;color:#86efac;background:#052e16}.trend-data-mode.demo{border-color:#92400e;color:#fde68a;background:#451a03}
.trend-data-warning{position:absolute;z-index:24;right:72px;top:12px;max-width:430px;border:1px solid #b45309;border-radius:8px;background:rgba(69,26,3,.94);color:#fde68a;padding:7px 10px;font-size:10px;font-weight:900;letter-spacing:.03em;box-shadow:0 8px 26px rgba(0,0,0,.28);pointer-events:none}
.trend-inline-text-editor{position:absolute;z-index:46;width:235px;min-height:34px;max-height:150px;resize:both;overflow:auto;border:1px dashed #3b82f6;border-radius:5px;background:rgba(10,13,18,.82);color:#f8fafc;padding:5px 7px;outline:none;font:700 12px/1.4 "Be Vietnam Pro", "Inter", "Roboto", "Segoe UI", Arial, Tahoma, Arial,sans-serif;box-shadow:0 3px 16px rgba(0,0,0,.22)}
.trend-inline-text-editor[hidden]{display:none}.trend-inline-text-editor::placeholder{color:#64748b;font-weight:500}
.trend-panel-collapsed .trend-main{grid-template-columns:minmax(0,1fr)}.trend-panel-collapsed .trend-right-panel{display:none}
.trend-chart-actions #toggleTrendPanel{border-color:#303846}
#drawingLayer .trend-object{transition:none}#drawingLayer .trend-object:hover{filter:none}
#drawingLayer .trend-hit{stroke:rgba(0,0,0,0);stroke-width:18;fill:rgba(0,0,0,0)}
@media(max-width:1180px){.trend-data-warning{right:18px;top:56px}.trend-chart-actions #toggleTrendPanel{display:none}}

/* V20.124 — interaction polish */
.trend-access-pill{display:inline-flex;align-items:center;max-width:215px;padding:6px 9px;border:1px solid #334155;border-radius:999px;background:#111827;color:#cbd5e1;font-size:9px;font-weight:800;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.trend-auto-tool{color:#7c3aed}.trend-auto-tool:hover{background:#f3e8ff!important;color:#6d28d9}.trend-clear-tool{color:#b91c1c}.trend-clear-tool:hover{background:#fee2e2!important;color:#991b1b}.trend-tool svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round}.trend-chart-stage:not(.is-drawing-mode){cursor:grab}.trend-chart-stage:not(.is-drawing-mode):active{cursor:grabbing}#drawingLayer.is-drawing-mode .trend-object,#drawingLayer.is-drawing-mode .trend-hit,#drawingLayer.is-drawing-mode .trend-handle{pointer-events:none!important}.trend-data-mode.live{border-color:#14532d!important;background:#052e16!important;color:#86efac!important}.trend-data-mode.demo{border-color:#92400e!important;background:#451a03!important;color:#fcd34d!important}.trend-floating-tools{max-width:calc(100% - 20px);overflow-x:auto;overflow-y:hidden;scrollbar-width:thin}.trend-statusbar{user-select:none}@media(max-width:1050px){.trend-access-pill{display:none}}
.trend-data-mode.error{border-color:#991b1b!important;background:#450a0a!important;color:#fecaca!important}

/* V20.126 — custom time, bidirectional chart pan, clipboard drawings, export-safe watermark */
.trend-chart-watermark{position:absolute;z-index:14;left:50%;bottom:45px;transform:translateX(-50%);max-width:70%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;pointer-events:none;user-select:none;color:#e5e7eb;opacity:.16;font:400 13px/1 "Be Vietnam Pro", "Inter", "Roboto", "Segoe UI", Arial, Tahoma, Arial,sans-serif;letter-spacing:.02em;text-shadow:0 1px 2px rgba(0,0,0,.35)}
.trend-chart-watermark[hidden]{display:none}
.trend-custom-range-card{width:min(480px,calc(100vw - 30px))}.trend-modal-subtitle{margin:-4px 0 14px;color:#94a3b8;font-size:11px;line-height:1.5}.trend-custom-date-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}.trend-custom-year-row{display:grid;grid-template-columns:1fr 140px;gap:10px;align-items:end;margin-top:12px}.trend-custom-year-row label{display:grid;gap:6px;font-size:12px}.trend-custom-year-row select{height:40px;border:1px solid #3a4350;background:#0f1217;color:#fff;border-radius:7px;padding:0 10px}.trend-custom-year-row .trend-secondary-btn{margin:0;height:40px}.trend-custom-error{margin-top:12px;border:1px solid #7f1d1d;background:#450a0a;color:#fecaca;border-radius:7px;padding:8px 10px;font-size:11px}.trend-range-btn[data-range="custom"].active{background:#1e3a8a;border-color:#3b82f6;color:#dbeafe}
@media(max-width:760px){.trend-custom-date-grid,.trend-custom-year-row{grid-template-columns:1fr}.trend-custom-year-row .trend-secondary-btn{width:100%}}

/* V20.127 — smoother pointer engine + keyboard drawing workflow */
.trend-chart-stage:focus{outline:none}
#drawingLayer .trend-object{transition:none}
.trend-chart-stage.is-chart-panning #drawingLayer .trend-object,
.trend-chart-stage.is-drawing-drag #drawingLayer .trend-object{filter:none!important}
.trend-chart-stage.is-chart-panning{cursor:grabbing!important}

/* V20.128 — per-chart drafts, lock menu, large diagonal watermark, Google Trends insight copier */
.trend-draft-state{display:inline-flex;align-items:center;max-width:105px;border:1px solid #1f5135;border-radius:999px;background:#0b2a1a;color:#86efac;padding:4px 7px;font-size:9px;font-weight:800;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.trend-chart-actions #toggleInsights{border-color:#334155;color:#cbd5e1}
.trend-chart-watermark{left:50%;top:68%;bottom:auto;transform:translate(-50%,-50%) rotate(-13deg);max-width:90%;font:800 clamp(30px,4.2vw,76px)/1 "Be Vietnam Pro", "Inter", "Roboto", "Segoe UI", Arial, Tahoma, Arial,sans-serif;letter-spacing:.035em;text-shadow:none;text-overflow:ellipsis;color:#e5e7eb;z-index:14}
#drawingLayer .trend-locked{cursor:not-allowed!important}
#drawingLayer .trend-locked.trend-selected{filter:drop-shadow(0 0 3px rgba(245,158,11,.9))}
.trend-drawing-menu{position:fixed;z-index:140;min-width:184px;padding:6px;border:1px solid #374151;border-radius:9px;background:#171b21;box-shadow:0 16px 44px rgba(0,0,0,.55)}
.trend-drawing-menu[hidden]{display:none}.trend-drawing-menu button{display:block;width:100%;border:0;border-radius:6px;background:transparent;color:#dbe2ea;padding:8px 9px;text-align:left;font:600 11px/1.25 "Be Vietnam Pro", "Inter", "Roboto", "Segoe UI", Arial, Tahoma, Arial,sans-serif;cursor:pointer}.trend-drawing-menu button:hover{background:#29313d;color:#fff}.trend-drawing-menu button.danger{color:#fca5a5}.trend-drawing-menu button.danger:hover{background:#450a0a;color:#fecaca}
.trend-insights{flex:0 0 258px;min-height:190px;max-height:34vh;border-top:1px solid #2a3039;background:#10141a;overflow:hidden;display:flex;flex-direction:column}
.trend-insights[hidden]{display:none}.trend-insights-head{min-height:45px;display:flex;align-items:center;gap:12px;padding:6px 10px;border-bottom:1px solid #242b35;background:#141920}.trend-insights-title{display:grid;gap:1px;min-width:260px}.trend-insights-title b{font-size:11px;color:#e5e7eb}.trend-insights-title small{font-size:9px;color:#7f8a9c;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.trend-insight-keyword{margin-left:auto;display:flex;align-items:center;gap:6px;color:#8f9baa;font-size:9px}.trend-insight-keyword select,.trend-insight-head-actions select{height:28px;border:1px solid #353d49;border-radius:6px;background:#0e1217;color:#dbe2ea;padding:0 7px;font-size:10px;outline:none}.trend-insight-keyword select{max-width:210px}.trend-insights-close{width:28px;height:28px;border:1px solid #353d49;border-radius:6px;background:#20262f;color:#aab4c2;cursor:pointer;font-size:17px;line-height:1}.trend-insights-close:hover{background:#29313d;color:#fff}
.trend-insight-warning{flex:0 0 auto;margin:6px 10px 0;border:1px solid #713f12;border-radius:6px;background:#351b08;color:#fcd34d;padding:5px 8px;font-size:9px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.trend-insight-warning[hidden]{display:none}
.trend-insights-grid{flex:1;min-height:0;display:grid;grid-template-columns:1fr 1fr 1fr;gap:8px;padding:8px 10px 10px}.trend-insight-card{min-width:0;min-height:0;display:flex;flex-direction:column;border:1px solid #29313d;border-radius:8px;background:#151a21;overflow:hidden}.trend-insight-card-head{flex:0 0 auto;min-height:39px;display:flex;align-items:center;justify-content:space-between;gap:8px;padding:6px 8px;border-bottom:1px solid #262d36}.trend-insight-card-head>div:first-child{display:grid;gap:1px;min-width:0}.trend-insight-card-head b{font-size:10px;color:#e2e8f0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.trend-insight-card-head small{font-size:8px;color:#64748b}.trend-insight-card-head button{height:26px;border:1px solid #374151;border-radius:6px;background:#20262f;color:#cbd5e1;padding:0 7px;font-size:9px;font-weight:700;white-space:nowrap;cursor:pointer}.trend-insight-card-head button:hover,.trend-copy-one:hover{background:#303846;color:#fff}.trend-insight-head-actions{display:flex!important;grid-template-columns:none!important;flex-direction:row;align-items:center;gap:4px;min-width:auto!important}
.trend-insight-list{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;scrollbar-width:thin}.trend-insight-row{min-height:34px;display:grid;grid-template-columns:22px minmax(0,1fr) minmax(44px,92px) 30px;align-items:center;gap:5px;padding:4px 6px;border-bottom:1px solid #232a33}.trend-insight-row:last-child{border-bottom:0}.trend-insight-rank{font-size:9px;color:#738094;text-align:center}.trend-insight-main{display:grid;min-width:0;gap:1px}.trend-insight-name{font-size:10px;color:#e5e7eb;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.trend-insight-main small{font-size:8px;color:#6f7b8c;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.trend-insight-metric{display:grid;grid-template-columns:auto 1fr;align-items:center;justify-content:end;gap:5px;min-width:0;color:#aab4c2;font-size:9px;text-align:right}.trend-insight-bar{display:block;width:48px;height:5px;border-radius:999px;background:#2b313a;overflow:hidden}.trend-insight-bar b{display:block;height:100%;background:#3b82f6;border-radius:999px}.trend-copy-one{width:28px;height:28px;padding:0;display:inline-flex;align-items:center;justify-content:center;justify-self:end;border:1px solid #303846;border-radius:6px;background:#1d232b;color:#94a3b8;cursor:pointer;transition:background .14s ease,border-color .14s ease,color .14s ease,transform .14s ease}.trend-copy-one svg{width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;pointer-events:none}.trend-copy-one.is-copied{border-color:#166534;background:#123c27;color:#86efac;transform:scale(.96)}.trend-copy-one.is-copied svg{display:none}.trend-copy-one.is-copied::before{content:'✓';font-size:14px;font-weight:800;line-height:1}.trend-insight-empty{padding:18px 10px;color:#64748b;font-size:9px;text-align:center;line-height:1.45}
@media(max-width:1260px){.trend-chart-actions #draftState{display:none}.trend-insights{flex-basis:244px}.trend-insights-title small{display:none}.trend-insights-title{min-width:180px}.trend-insight-keyword select{max-width:150px}}
@media(max-height:760px){.trend-insights{flex-basis:210px}.trend-insights-head{min-height:40px}.trend-insight-row{min-height:30px}}

/* V20.129: watermark is export-only; never overlay it on the interactive chart. */
#chartWatermark,.trend-chart-watermark{display:none!important}


/* V20.131 — trader workspace refinements: stronger zero baseline and local-only smart draft autosave. */
:root{--trend-font:ui-sans-serif,-apple-system,BlinkMacSystemFont,"Be Vietnam Pro", "Inter", "Roboto", "Segoe UI", Arial,"Noto Sans","Liberation Sans",sans-serif;--trend-accent:#3b82f6;--trend-accent-strong:#2563eb;--trend-cyan:#4da3ff;--trend-bg:#0b0f14;--trend-panel:#11161d;--trend-border:#27313d}
html,body,.trend-workspace-body,.trend-shell,.trend-workspace-body button,.trend-workspace-body input,.trend-workspace-body select,.trend-workspace-body textarea{font-family:var(--trend-font)!important;font-synthesis:none;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased}
.trend-workspace-body{background:var(--trend-bg)}.trend-chart-column,.trend-chart-stage{background:var(--trend-bg)}
.trend-brand-mark,.trend-primary,.trend-save,.trend-chart-actions .trend-save,.trend-modal-actions .trend-primary,.trend-note-editor [data-note-save]{background:var(--trend-accent-strong)!important;color:#fff}
.trend-primary:hover,.trend-save:hover{filter:brightness(1.06)}
.trend-spinner{border-top-color:#60a5fa}.trend-project-item.active{border-color:var(--trend-accent)}
.trend-side-card input[type=range]{accent-color:var(--trend-accent)}
.trend-floating-tools{border-color:#cbd5e1;box-shadow:0 7px 22px rgba(0,0,0,.24)}
.trend-tool.active{background:#e7eef8;border-color:#b7c5d8;color:#0f172a}.trend-auto-tool{color:#475569}.trend-auto-tool:hover{background:#eef2f7!important;color:#1e3a5f}
.trend-chart-actions button:focus-visible,.trend-range-btn:focus-visible,.trend-tool:focus-visible,.trend-project-pagination button:focus-visible{outline:2px solid #60a5fa;outline-offset:2px}
.trend-draft-state{border-color:#245a44;background:#0b2a20;color:#9ee6c4}
.trend-project-pagination{display:grid;grid-template-columns:32px minmax(0,1fr) 32px;align-items:center;gap:6px;margin-top:8px;padding-top:8px;border-top:1px solid #252d37}.trend-project-pagination[hidden]{display:none}.trend-project-pagination button{height:30px;border:1px solid #334155;border-radius:6px;background:#1b222c;color:#cbd5e1;cursor:pointer}.trend-project-pagination button:hover:not(:disabled){background:#273240;color:#fff}.trend-project-pagination button:disabled{opacity:.35;cursor:default}.trend-project-pagination span{text-align:center;color:#8f9baa;font-size:9px;font-variant-numeric:tabular-nums}
.trend-project-item small,.trend-statusbar,.trend-chart-actions #dataMeta{font-variant-numeric:tabular-nums}
.trend-main:fullscreen{width:100vw;height:100vh;max-width:none;background:var(--trend-bg);display:grid;grid-template-columns:minmax(0,1fr) 258px}.trend-main:fullscreen .trend-chart-column{height:100vh;min-height:0}.trend-main:fullscreen .trend-chart-stage{min-height:0}.trend-main:fullscreen .trend-insights{max-height:32vh}
.trend-pseudo-fullscreen .trend-main{position:fixed;z-index:9999;inset:0;width:100vw;height:100vh;background:var(--trend-bg);display:grid;grid-template-columns:minmax(0,1fr) 258px}.trend-pseudo-fullscreen .trend-chart-column{position:relative;z-index:auto;inset:auto;width:auto;height:100vh;min-height:0}.trend-pseudo-fullscreen{overflow:hidden!important}
#fullscreenChart[aria-pressed="true"]{border-color:#3b82f6;background:#17243a;color:#bfdbfe}
@media(max-width:1180px){#fullscreenChart{display:inline-block!important}}

.trend-data-mode.stale{border-color:#2563eb!important;background:#10233f!important;color:#bfdbfe!important}

/* V20.132 — client-browser Google Trends Bridge */
.trend-bridge-badge,.trend-bridge-install{display:inline-flex;align-items:center;gap:4px;border:1px solid #475569;border-radius:999px;padding:4px 7px;font-size:9px;font-weight:800;white-space:nowrap;text-decoration:none;line-height:1.1}.trend-bridge-badge{color:#94a3b8;background:#111827}.trend-bridge-badge.checking{border-color:#334155;color:#94a3b8}.trend-bridge-badge.connected{border-color:#155e75;background:#083344;color:#a5f3fc}.trend-bridge-badge.server{border-color:#475569;background:#111827;color:#cbd5e1}.trend-bridge-badge.error{border-color:#9a3412;background:#431407;color:#fed7aa}.trend-bridge-install{border-color:#1d4ed8;background:#172554;color:#bfdbfe;cursor:pointer}.trend-bridge-install:hover{background:#1e3a8a;color:#eff6ff}.trend-bridge-install[hidden],.trend-bridge-badge[hidden]{display:none!important}@media(max-width:1180px){.trend-bridge-install{display:none!important}}

/* V20.133 · Chrome Bridge onboarding */
.trend-bridge-badge.outdated{border-color:#854d0e;background:#422006;color:#fde68a}.trend-bridge-guide{display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:12px;align-items:center;padding:10px 12px;border-bottom:1px solid #273244;background:#101821;color:#cbd5e1}.trend-bridge-guide[hidden]{display:none!important}.trend-bridge-guide[data-state=error]{background:#181611;border-bottom-color:#4a371d}.trend-bridge-guide[data-state=outdated]{background:#171711}.trend-bridge-guide-icon{display:grid;place-items:center;width:34px;height:34px;border:1px solid #334155;border-radius:9px;background:#0b1220;color:#7dd3fc;font-size:19px;font-weight:700}.trend-bridge-guide-copy{min-width:0}.trend-bridge-guide-title{display:flex;align-items:center;gap:8px;font-size:11px}.trend-bridge-guide-title b{color:#e2e8f0}.trend-bridge-guide-title span{padding:2px 6px;border-radius:999px;background:#1e293b;color:#94a3b8;font-size:9px;font-weight:800}.trend-bridge-guide-copy p{margin:4px 0 6px;color:#9aa8ba;font-size:10px;line-height:1.4}.trend-bridge-guide-copy small{display:block;color:#718096;font-size:9px;line-height:1.35}.trend-bridge-steps{display:flex;flex-wrap:wrap;gap:6px 12px;margin-bottom:5px;color:#aeb9c8;font-size:9px}.trend-bridge-steps span{display:inline-flex;align-items:center;gap:5px}.trend-bridge-steps b{display:inline-grid;place-items:center;width:16px;height:16px;border-radius:50%;background:#1e3a5f;color:#bfdbfe;font-size:8px}.trend-bridge-guide-actions{display:grid;grid-template-columns:repeat(2,max-content);gap:6px;justify-content:end}.trend-bridge-guide-actions a,.trend-bridge-guide-actions button{border:1px solid #334155;border-radius:6px;background:#18202b;color:#dbeafe;padding:6px 8px;text-decoration:none;font:700 9px/1.2 "Be Vietnam Pro", "Inter", "Roboto", "Segoe UI", Arial,sans-serif;cursor:pointer}.trend-bridge-guide-actions a:first-child{border-color:#1d4ed8;background:#172554;color:#bfdbfe}.trend-bridge-guide-actions a:hover,.trend-bridge-guide-actions button:hover{background:#243041}@media(max-width:1050px){.trend-bridge-guide{grid-template-columns:auto 1fr}.trend-bridge-guide-actions{grid-column:1/-1;display:flex;justify-content:flex-start;flex-wrap:wrap}}

/* V20.134 — TradingView-inspired chart ergonomics + mandatory Google Trends Connect onboarding. */
.trend-floating-tools{overflow:visible!important;max-width:calc(100% - 12px);left:12px;top:12px;will-change:left,top}
.trend-drag-dots{display:grid;place-items:center;flex:0 0 30px;width:30px;height:32px;margin:0 3px 0 0!important;padding:0;border:1px solid #d5dbe3;border-radius:6px;background:#f8fafc;color:#64748b!important;font-size:17px!important;letter-spacing:0!important;cursor:grab;touch-action:none}
.trend-drag-dots:hover{background:#eef2f7;color:#0f172a!important}.trend-toolbar-dragging .trend-drag-dots{cursor:grabbing;background:#e2e8f0}.trend-toolbar-dragging{user-select:none!important}
.trend-tool-group{display:flex;gap:2px;max-width:min(68vw,820px);overflow-x:auto;overflow-y:hidden;scrollbar-width:thin}
#deleteSelectedDrawing:not(:disabled){color:#7f1d1d;background:#fff7f7;border-color:#fecaca}#deleteSelectedDrawing:not(:disabled):hover{background:#fee2e2!important;color:#7f1d1d}
.trend-danger-action{border-color:#475569!important;color:#cbd5e1!important;background:#171d25!important}.trend-danger-action:hover{border-color:#7f1d1d!important;color:#fecaca!important;background:#2a1719!important}
.trend-bridge-badge.agent{border-color:#1d4ed8;background:#172554;color:#bfdbfe}

.trend-bridge-gate{position:fixed;inset:0;z-index:12000;display:grid;place-items:center;padding:24px;background:rgba(2,6,23,.76);backdrop-filter:blur(7px);-webkit-backdrop-filter:blur(7px)}
.trend-bridge-gate[hidden]{display:none!important}.trend-bridge-locked{overflow:hidden!important}.trend-bridge-gate-card{width:min(720px,calc(100vw - 28px));max-height:calc(100vh - 32px);overflow:auto;border:1px solid #dbe3ee;border-radius:18px;background:#fff;color:#0f172a;padding:26px;box-shadow:0 30px 90px rgba(0,0,0,.45)}
.trend-bridge-gate-badge{display:inline-flex;align-items:center;border:1px solid #bfdbfe;border-radius:999px;background:#eff6ff;color:#1d4ed8;padding:5px 9px;font-size:10px;font-weight:900;letter-spacing:.07em}.trend-bridge-gate-card h2{margin:10px 0 7px;font-size:25px;letter-spacing:-.02em}.trend-bridge-gate-card>p{margin:0;color:#475569;font-size:13px;line-height:1.55}
.trend-bridge-install-steps{display:grid;gap:9px;margin:20px 0}.trend-bridge-install-steps>div{display:grid;grid-template-columns:34px minmax(0,1fr);gap:11px;align-items:start;padding:10px 12px;border:1px solid #e2e8f0;border-radius:11px;background:#f8fafc}.trend-bridge-install-steps>div>b{display:grid;place-items:center;width:28px;height:28px;border-radius:50%;background:#0f172a;color:#fff;font-size:12px}.trend-bridge-install-steps span{display:grid;gap:3px}.trend-bridge-install-steps strong{font-size:12px;color:#0f172a}.trend-bridge-install-steps small{font-size:11px;color:#64748b;line-height:1.45}.trend-bridge-install-steps code{padding:1px 5px;border-radius:4px;background:#e2e8f0;color:#0f172a}.trend-bridge-install-steps em{font-style:normal;font-weight:800;color:#334155}
.trend-bridge-gate-status{border:1px solid #bae6fd;border-radius:9px;background:#f0f9ff;color:#075985;padding:9px 11px;font-size:11px;font-weight:800;line-height:1.4}.trend-bridge-gate[data-state=error] .trend-bridge-gate-status,.trend-bridge-gate[data-state=outdated] .trend-bridge-gate-status{border-color:#fed7aa;background:#fff7ed;color:#9a3412}
.trend-bridge-gate-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:14px}.trend-bridge-gate-actions a,.trend-bridge-gate-actions button{min-height:38px;border:1px solid #cbd5e1;border-radius:8px;background:#fff;color:#334155;padding:0 12px;font:800 11px/1.2 var(--trend-font);cursor:pointer;text-decoration:none;display:inline-flex;align-items:center;justify-content:center}.trend-bridge-gate-actions .primary{border-color:#1d4ed8;background:#2563eb;color:#fff}.trend-bridge-gate-actions a:hover,.trend-bridge-gate-actions button:hover{filter:brightness(.98);border-color:#94a3b8}.trend-bridge-security{margin-top:13px!important;padding-top:12px;border-top:1px solid #e2e8f0;color:#64748b!important;font-size:10px!important}
@media(max-width:720px){.trend-bridge-gate{padding:10px}.trend-bridge-gate-card{padding:18px;border-radius:14px}.trend-bridge-gate-card h2{font-size:20px}.trend-bridge-gate-actions{display:grid}.trend-bridge-gate-actions>*{width:100%}.trend-tool-group{max-width:68vw}}

/* V20.135 — white-chart professional UX, compact toolbar and stable Connect onboarding. */
.trend-chart-stage{background:#fff;contain:layout paint;border-top:1px solid #eaecf0;border-bottom:1px solid #eaecf0}
.trend-floating-tools{border:1px solid #d0d5dd!important;border-radius:10px!important;background:rgba(255,255,255,.985)!important;box-shadow:0 6px 18px rgba(16,24,40,.13)!important;padding:5px!important;gap:3px!important;max-width:calc(100% - 16px)}
.trend-tool{color:#344054!important}.trend-tool:hover{background:#f2f4f7!important;color:#101828!important}.trend-tool.active{background:#eff4ff!important;border-color:#b2ccff!important;color:#1849a9!important}.trend-tool svg{stroke:currentColor;fill:none;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.trend-drag-dots,.trend-toolbar-collapse{display:grid;place-items:center;flex:0 0 30px;width:30px;height:32px;padding:0;border:1px solid #d0d5dd;border-radius:7px;background:#f9fafb;color:#667085;font:800 15px/1 var(--trend-font);cursor:pointer}.trend-drag-dots{cursor:grab}.trend-drag-dots:hover,.trend-toolbar-collapse:hover{background:#f2f4f7;color:#101828}.trend-toolbar-collapse{font-size:17px;margin-right:2px}
.trend-floating-tools.is-collapsed .trend-tool-group,.trend-floating-tools.is-collapsed .trend-tool-sep,.trend-floating-tools.is-collapsed #undoDrawing,.trend-floating-tools.is-collapsed #redoDrawing,.trend-floating-tools.is-collapsed #deleteSelectedDrawing{display:none!important}.trend-floating-tools.is-hidden{display:none!important}
.trend-chart-actions button,.trend-chart-actions a{display:inline-flex;align-items:center;gap:5px}.trend-menu-icon{display:inline-grid;place-items:center;min-width:14px;color:#98a2b3;font-size:13px;line-height:1}.trend-chart-actions .trend-save .trend-menu-icon{color:#dbeafe}.trend-chart-actions button:hover .trend-menu-icon{color:#d0d5dd}#toggleFloatingTools[aria-pressed="false"]{border-color:#475467;background:#1d2939;color:#d0d5dd}
#drawingLayer .trend-selected{filter:drop-shadow(0 0 2px rgba(15,98,254,.55))}#drawingLayer .trend-handle{filter:drop-shadow(0 1px 1px rgba(16,24,40,.25))}
.trend-statusbar{font-variant-numeric:tabular-nums}

/* Connect guide: one action lives inside the step where it is needed. Avoid expensive blur to prevent modal jank. */
.trend-bridge-gate{background:rgba(15,23,42,.82)!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important}
.trend-bridge-gate-card{width:min(760px,calc(100vw - 28px));border-color:#d0d5dd!important;border-radius:16px!important;padding:24px!important;box-shadow:0 24px 70px rgba(16,24,40,.38)!important;contain:content}
.trend-bridge-gate-card h2{font-size:24px!important;color:#101828}.trend-bridge-gate-card>p{max-width:680px;color:#475467!important}
.trend-bridge-install-steps{gap:10px!important;margin:18px 0 14px!important}.trend-bridge-install-steps>div{grid-template-columns:36px minmax(0,1fr)!important;padding:12px 13px!important;border-color:#e4e7ec!important;background:#fcfcfd!important}.trend-bridge-install-steps>div>b{background:#101828!important}.trend-bridge-install-steps span{gap:6px!important}.trend-bridge-install-steps strong{font-size:13px!important}.trend-bridge-install-steps small{font-size:11px!important;color:#475467!important}.trend-bridge-install-steps code{background:#f2f4f7!important;border:1px solid #eaecf0}
.trend-step-action{width:max-content;max-width:100%;min-height:34px;margin-top:3px;border:1px solid #d0d5dd;border-radius:8px;background:#fff;color:#344054;padding:0 11px;text-decoration:none;font:800 11px/1.2 var(--trend-font);cursor:pointer;display:inline-flex;align-items:center;justify-content:center}.trend-step-action:hover{background:#f9fafb;border-color:#98a2b3}.trend-step-action.primary{border-color:#175cd3;background:#1570ef;color:#fff}.trend-step-action.primary:hover{background:#175cd3}.trend-step-actions{display:flex;flex-wrap:wrap;gap:7px}.trend-step-note{width:max-content;max-width:100%;padding:6px 8px;border-radius:7px;background:#f2f4f7;color:#475467;font-size:10px;line-height:1.35}.trend-bridge-gate-status{margin-top:4px;border-color:#b2ddff!important;background:#eff8ff!important;color:#175cd3!important}.trend-bridge-security{color:#667085!important}
@media(max-width:720px){.trend-step-action{width:100%}.trend-step-actions{display:grid}.trend-bridge-install-steps>div{grid-template-columns:32px minmax(0,1fr)!important}.trend-action-label{display:none}.trend-chart-actions button{min-width:30px;justify-content:center}}


/* V20.136 — compact trader menu, top connection status, safer selection and non-blocking browser bridge. */
.trend-topbar{gap:8px!important}.trend-searchbar{max-width:960px!important}.trend-live-strip{display:flex;align-items:center;gap:5px;min-width:0;white-space:nowrap}.trend-live-strip .trend-live-meta{max-width:170px;overflow:hidden;text-overflow:ellipsis;color:#98a2b3;font-size:9px;font-variant-numeric:tabular-nums}.trend-live-strip .trend-draft-state{max-width:78px}.trend-live-strip .trend-data-mode,.trend-live-strip .trend-bridge-badge{padding:3px 6px;font-size:8.5px;letter-spacing:0}.trend-bridge-badge.limited{border-color:#b54708;background:#fffaeb;color:#b54708}.trend-chart-toolbar{height:42px!important;display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;align-items:center!important;gap:6px!important;padding:4px 8px!important;overflow:hidden}.trend-ranges{min-width:0;overflow-x:auto!important;overflow-y:hidden;scrollbar-width:none}.trend-ranges::-webkit-scrollbar{display:none}.trend-range-btn{padding:5px 7px!important;font-size:10px!important;min-height:29px}.trend-chart-actions{gap:2px!important;min-width:max-content}.trend-chart-actions button{width:31px;height:29px!important;min-width:31px;padding:0!important;display:inline-flex;align-items:center;justify-content:center;border-radius:6px!important}.trend-chart-actions .trend-action-label{display:none!important}.trend-chart-actions .trend-menu-icon{font-size:14px!important;min-width:auto!important;color:#98a2b3}.trend-chart-actions #saveProject{width:auto!important;min-width:52px!important;padding:0 9px!important}.trend-chart-actions #saveProject .trend-action-label{display:inline!important;font-size:10px}.trend-chart-actions #saveProject .trend-menu-icon{color:#fff}.trend-data-warning.info{border-color:#b2ddff!important;background:#eff8ff!important;color:#175cd3!important;box-shadow:none!important}.trend-floating-tools{border-color:#cfd6df!important;box-shadow:0 5px 14px rgba(16,24,40,.11)!important}.trend-floating-tools .trend-tool{color:#26364a!important}.trend-floating-tools .trend-tool.active{background:#eef4ff!important;border-color:#84adff!important;color:#175cd3!important}.trend-floating-tools .trend-tool:hover{background:#f4f7fb!important}.trend-floating-tools .trend-clear-tool{color:#b42318!important}.trend-chart-stage{background:#fff!important}.trend-workspace-body .trend-chart-stage.is-chart-panning{cursor:grabbing!important}
@media(max-width:1550px){.trend-live-strip .trend-live-meta,.trend-live-strip .trend-draft-state{display:none}.trend-searchbar{max-width:none!important}.trend-access-pill{max-width:155px}}
@media(max-width:1260px){.trend-live-strip{gap:3px}.trend-live-strip .trend-data-mode{display:none}.trend-bridge-badge{max-width:92px;overflow:hidden;text-overflow:ellipsis}.trend-account-nav a{padding-left:5px;padding-right:5px}.trend-chart-actions button{width:29px;min-width:29px}.trend-chart-actions #saveProject{min-width:46px!important;padding:0 7px!important}.trend-range-btn{padding-left:6px!important;padding-right:6px!important}}
@media(max-width:980px){.trend-live-strip{position:absolute;right:8px;top:48px;z-index:60}.trend-topbar{position:relative}.trend-access-pill{display:none!important}.trend-chart-toolbar{grid-template-columns:minmax(0,1fr) auto!important}.trend-chart-actions #saveProject .trend-action-label{display:none!important}.trend-chart-actions #saveProject{width:31px!important;min-width:31px!important;padding:0!important}}


/* V20.137 — restore readable action labels, smart Y safety, brush style flyout and clickable related queries. */
.trend-chart-toolbar{height:44px!important;grid-template-columns:minmax(250px,1fr) minmax(0,max-content)!important;overflow:visible!important}
.trend-chart-actions{display:flex!important;align-items:center;justify-content:flex-end;gap:3px!important;min-width:0!important;max-width:min(72vw,900px);overflow-x:auto;overflow-y:hidden;scrollbar-width:none;padding-bottom:1px}.trend-chart-actions::-webkit-scrollbar{display:none}
.trend-chart-actions button{width:auto!important;min-width:0!important;height:30px!important;padding:0 7px!important;gap:4px!important;white-space:nowrap}.trend-chart-actions .trend-action-label{display:inline!important;font-size:10px!important;font-weight:700;line-height:1}.trend-chart-actions .trend-menu-icon{font-size:13px!important}.trend-chart-actions #saveProject{min-width:86px!important}.trend-chart-actions #autoScaleY.active{border-color:#84adff!important;background:#eff4ff!important;color:#175cd3!important}.trend-chart-actions #autoScaleY.active .trend-menu-icon{color:#175cd3!important}
.trend-floating-tools{overflow:visible!important}.trend-brush-settings{position:absolute;z-index:8;left:78px;top:calc(100% + 7px);display:flex;align-items:center;gap:9px;padding:8px 10px;border:1px solid #d0d5dd;border-radius:9px;background:#fff;box-shadow:0 8px 24px rgba(16,24,40,.16);font:700 10px/1.2 var(--trend-font);color:#344054;white-space:nowrap}.trend-brush-settings[hidden]{display:none!important}.trend-brush-settings label{display:flex!important;align-items:center!important;gap:6px!important;margin:0!important}.trend-brush-settings input[type=color]{width:28px;height:26px;padding:2px;border:1px solid #d0d5dd;border-radius:6px;background:#fff}.trend-brush-settings input[type=range]{width:112px}.trend-brush-width span{min-width:58px}.trend-brush-width b{font-variant-numeric:tabular-nums;color:#175cd3}
.trend-insight-row.is-analyzable .trend-insight-main{appearance:none;border:0;background:transparent;text-align:left;padding:2px 4px;margin:-2px -4px;border-radius:6px;cursor:pointer;color:inherit;font:inherit;min-width:0}.trend-insight-row.is-analyzable .trend-insight-main:hover{background:#eff4ff}.trend-insight-row.is-analyzable .trend-insight-name{color:#175cd3;text-decoration:underline;text-decoration-color:transparent;text-underline-offset:2px}.trend-insight-row.is-analyzable .trend-insight-main:hover .trend-insight-name{text-decoration-color:#84adff}.trend-insight-row.is-analyzable .trend-insight-main:focus-visible{outline:2px solid #84adff;outline-offset:1px}
@media(max-width:1350px){.trend-chart-actions{max-width:62vw}.trend-chart-actions button{padding:0 5px!important}.trend-chart-actions .trend-action-label{font-size:9px!important}.trend-chart-actions #clearAllDrawings .trend-action-label{display:none!important}.trend-chart-actions #newProject .trend-action-label{display:none!important}}
@media(max-width:1120px){.trend-chart-actions .trend-action-label{display:none!important}.trend-chart-actions #saveProject{min-width:31px!important}.trend-chart-actions button{width:31px!important;justify-content:center;padding:0!important}.trend-brush-settings{left:40px;max-width:calc(100vw - 70px);flex-wrap:wrap}}

/* V20.137.1: compact means compact labels, not icon-only. Desktop/tablet keeps readable action text and scrolls when space is tight. */
@media(min-width:721px){.trend-chart-actions .trend-action-label,.trend-chart-actions #saveProject .trend-action-label{display:inline!important}.trend-chart-actions button{width:auto!important;min-width:0!important;padding-left:6px!important;padding-right:6px!important}.trend-chart-actions #saveProject{width:auto!important;min-width:78px!important}}
@media(min-width:721px) and (max-width:1180px){.trend-chart-actions{max-width:58vw!important}.trend-chart-actions .trend-action-label{font-size:8.5px!important}.trend-chart-actions button{padding-left:4px!important;padding-right:4px!important;gap:3px!important}.trend-chart-actions #clearAllDrawings .trend-action-label,.trend-chart-actions #newProject .trend-action-label{display:inline!important}}


/* V20.138 — public share, in-page auth gate and quiet Related Topics fallback. */
.trend-auth-page{margin:0;min-height:100vh;overflow:hidden;background:#f8fafc;color:#101828;font-family:"Be Vietnam Pro", "Inter", "Roboto", "Segoe UI", Arial, "Noto Sans", Arial,sans-serif}.trend-auth-preview{position:fixed;inset:0;background:#fff}.trend-auth-preview-top{height:66px;display:flex;align-items:center;justify-content:space-between;padding:0 28px;background:#101828;color:#fff;border-bottom:1px solid #344054}.trend-auth-preview-top b{font-size:16px}.trend-auth-preview-top span{font-size:12px;color:#d0d5dd}.trend-auth-preview-chart{position:absolute;inset:66px 0 0;background:linear-gradient(#fff,#f8fafc)}.trend-auth-preview-chart i{position:absolute;inset:auto 0;height:1px;background:#e4e7ec}.trend-auth-preview-chart i:nth-child(1){top:18%}.trend-auth-preview-chart i:nth-child(2){top:38%}.trend-auth-preview-chart i:nth-child(3){top:58%}.trend-auth-preview-chart i:nth-child(4){top:78%}.trend-auth-preview-chart svg{position:absolute;left:3%;right:3%;top:16%;width:94%;height:58%;opacity:.22}.trend-auth-preview-chart path{fill:none;stroke:#101828;stroke-width:3;vector-effect:non-scaling-stroke}.trend-auth-modal .msc-auth-backdrop{background:rgba(16,24,40,.78);backdrop-filter:none;-webkit-backdrop-filter:none}.trend-auth-modal .msc-auth-dialog{outline-color:rgba(37,99,235,.9)}.trend-auth-modal .msc-auth-hero{background:#101828}.trend-auth-modal .msc-auth-hero-icon{color:#2563eb}.trend-auth-modal .msc-auth-tabs{background:#2563eb;border-color:#2563eb}.trend-auth-modal .msc-auth-tabs button.is-active{color:#1d4ed8}.trend-auth-modal .msc-auth-panel-wrap{border-color:#2563eb}.trend-auth-modal .msc-auth-submit{background:linear-gradient(135deg,#1d4ed8,#2563eb);box-shadow:0 8px 20px rgba(37,99,235,.22)}.trend-auth-modal .msc-auth-google{border-color:#d0d5dd;box-shadow:0 7px 20px rgba(16,24,40,.12)}.trend-auth-modal .msc-auth-google:hover{border-color:#98a2b3;box-shadow:0 9px 24px rgba(16,24,40,.16)}
.trend-share-modal-card{width:min(620px,calc(100vw - 30px))}.trend-share-modal-head{display:flex;align-items:flex-start;justify-content:space-between;gap:15px}.trend-share-modal-head h3{margin:3px 0 8px}.trend-share-kicker{font-size:10px;font-weight:900;letter-spacing:.08em;color:#2563eb}.trend-modal-x{width:34px;height:34px;border:1px solid #344054!important;border-radius:8px!important;background:#1d2939!important;color:#f2f4f7!important;font-size:22px;line-height:1;cursor:pointer}.trend-share-link-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px}.trend-share-link-row input{min-width:0}.trend-share-link-row .trend-primary{height:40px;border:0;border-radius:7px;background:#2563eb;color:#fff;font-weight:800;padding:0 14px;cursor:pointer}.trend-share-actions{display:flex;align-items:center;gap:10px;margin-top:12px;flex-wrap:wrap}.trend-secondary-link,.trend-danger-link{display:inline-flex;align-items:center;justify-content:center;min-height:34px;border-radius:7px;padding:0 11px;font-size:11px;font-weight:800;text-decoration:none;cursor:pointer}.trend-secondary-link{border:1px solid #475467;background:#1d2939;color:#f2f4f7}.trend-danger-link{border:1px solid #7f1d1d;background:#3f1717;color:#fecaca}.trend-share-modal-card>small{display:block;margin-top:12px;color:#98a2b3;line-height:1.45}
@media(max-width:700px){.trend-share-link-row{grid-template-columns:1fr}.trend-auth-preview-top span{display:none}}


/* V20.139 — share at top-right + explicit browser-only draft card. */
.trend-top-share{flex:0 0 auto;height:30px;padding:0 10px;border:1px solid #84adff;border-radius:7px;background:#eff4ff;color:#175cd3;display:inline-flex;align-items:center;gap:6px;font:800 10px/1 var(--trend-font);cursor:pointer;white-space:nowrap}.trend-top-share:hover{background:#dbeafe;border-color:#528bff}.trend-top-share:disabled{opacity:.6;cursor:wait}.trend-top-share>span{font-size:14px;line-height:1}.trend-top-share>b{font:inherit}
.trend-project-item.is-local-draft{border-style:dashed;border-color:#84adff;background:#f5f8ff}.trend-project-item.is-local-draft.active{box-shadow:inset 3px 0 0 #2563eb}.trend-project-draft-badge{display:inline-flex;align-items:center;margin-left:7px;padding:2px 5px;border-radius:999px;background:#dbeafe;color:#175cd3;font-size:8px;font-weight:900;letter-spacing:.05em;vertical-align:1px}.trend-project-item.is-local-draft .trend-project-row button{color:#175cd3}.trend-project-item.is-local-draft small{color:#667085}.trend-project-item.is-local-draft .trend-draft-save{border:1px solid #b2ccff;background:#fff;border-radius:5px;padding:2px 6px;font-size:9px;font-weight:800;cursor:pointer}
@media(max-width:1180px){.trend-top-share b{display:none}.trend-top-share{width:31px;padding:0;justify-content:center}.trend-access-pill{max-width:130px}}


/* V20.140 — calm loading state for browser bridge + progressive insights. */
.trend-loading{background:rgba(255,255,255,.58);backdrop-filter:none;color:#111827;pointer-events:none}.trend-loading-card{display:flex;align-items:center;gap:11px;min-width:260px;max-width:min(520px,calc(100% - 32px));padding:12px 14px;border:1px solid #d7dee8;border-radius:10px;background:rgba(255,255,255,.96);box-shadow:0 8px 28px rgba(15,23,42,.12)}.trend-loading-card>div:last-child{display:grid;gap:3px}.trend-loading-card b{font-size:12px;color:#111827}.trend-loading-card span{font-size:10px;color:#667085;line-height:1.45}.trend-spinner{width:20px;height:20px;border:2px solid #d5dbe5;border-top-color:#2563eb}.trend-data-warning.info{background:#f8fafc;border-color:#d8dee8;color:#475467}.trend-insight-empty.is-loading{display:flex;align-items:center;justify-content:center;min-height:72px;color:#667085}.trend-insight-empty.is-loading:before{content:"";width:13px;height:13px;margin-right:7px;border:2px solid #d5dbe5;border-top-color:#2563eb;border-radius:50%;animation:trendSpin .8s linear infinite}


/* V20.141 — real bridge progress + non-blocking reconnect UX. */
.trend-loading-card{min-width:300px}.trend-loading-copy{display:grid;gap:5px;min-width:235px}.trend-loading-head{display:flex;align-items:center;justify-content:space-between;gap:12px}.trend-loading-head strong{font:700 11px/1 "Be Vietnam Pro", "Inter", "Roboto", "Segoe UI", Arial,sans-serif;color:#2563eb;min-width:34px;text-align:right}.trend-loading-progress{height:4px;border-radius:999px;background:#e8edf4;overflow:hidden;margin-top:3px}.trend-loading-progress i{display:block;width:0;height:100%;border-radius:inherit;background:#2563eb;transition:width .2s ease}.trend-bridge-gate{transition:none!important}.trend-bridge-gate[data-state="agent"],.trend-bridge-gate[data-state="checking"],.trend-bridge-gate[data-state="limited"]{display:none!important}

/* V20.142 — brush controls must stay interactive inside the chart capture layer. */
.trend-brush-settings{pointer-events:auto!important;user-select:auto!important;touch-action:auto!important}
.trend-brush-settings label,.trend-brush-settings input{pointer-events:auto!important}
.trend-brush-settings input[type=color]{cursor:pointer!important}
.trend-brush-settings input[type=range]{cursor:ew-resize!important;accent-color:#2563eb}


/* V20.143 — reversible 2D pan + timeline backtest cut. */
#backtestToggle.active{background:#eff8ff!important;border-color:#84adff!important;color:#175cd3!important}
#backtestToggle.active .trend-menu-icon{color:#175cd3!important}
.trend-backtest-overlay{position:absolute;inset:0;z-index:18;pointer-events:none;overflow:hidden;font-family:var(--trend-font,"Be Vietnam Pro", "Inter", "Roboto", "Segoe UI", Arial,sans-serif)}
.trend-backtest-overlay[hidden]{display:none!important}
.trend-backtest-future{position:absolute;background:transparent;border-left:0;pointer-events:none}
.trend-backtest-line{position:absolute;width:2px;margin-left:-1px;background:#d92d20;box-shadow:0 0 0 1px rgba(255,255,255,.65);pointer-events:none}
.trend-backtest-grab{position:absolute;width:16px;margin-left:0;border:0;background:transparent;pointer-events:auto;cursor:ew-resize;touch-action:none}
.trend-backtest-grab:before{content:"";position:absolute;left:7px;top:0;bottom:0;width:2px;background:rgba(217,45,32,.14)}
.trend-backtest-rail{position:absolute;border-radius:999px;background:rgba(208,213,221,.72);box-shadow:inset 0 0 0 1px rgba(152,162,179,.55);pointer-events:auto;cursor:ew-resize;touch-action:none}
.trend-backtest-rail-fill{position:absolute;inset:0 auto 0 0;border-radius:999px;background:rgba(217,45,32,.22);pointer-events:none}
.trend-backtest-handle{position:absolute;top:50%;width:18px;height:22px;transform:translate(-50%,-50%);border:1px solid #b42318;border-radius:5px;background:#fff;box-shadow:0 2px 7px rgba(16,24,40,.18);cursor:ew-resize;pointer-events:auto;touch-action:none;padding:0}
.trend-backtest-handle span{display:block;width:2px;height:12px;margin:auto;background:#d92d20;box-shadow:-4px 0 0 rgba(217,45,32,.45),4px 0 0 rgba(217,45,32,.45)}
.trend-backtest-handle:focus-visible{outline:2px solid #2e90fa;outline-offset:2px}
.trend-backtest-label{position:absolute;transform:translateX(-50%);padding:3px 7px;border:1px solid #fecdca;border-radius:5px;background:rgba(255,251,250,.96);color:#b42318;font-size:9px;font-weight:800;letter-spacing:.02em;white-space:nowrap;pointer-events:none;box-shadow:0 2px 8px rgba(16,24,40,.08)}
.trend-chart-stage.is-chart-panning .trend-backtest-rail,.trend-chart-stage.is-chart-panning .trend-backtest-handle,.trend-chart-stage.is-chart-panning .trend-backtest-grab{pointer-events:none!important}
@media(max-width:720px){.trend-backtest-label{font-size:8px;padding:2px 5px}.trend-backtest-handle{width:20px;height:24px}}

/* V20.144 — clearer pro toolbar, SVG action icons, smoother drawing affordances. */
.trend-chart-actions button{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:31px;border-color:#2d3642;background:linear-gradient(180deg,rgba(255,255,255,.02),rgba(255,255,255,0));color:#cbd5e1;box-shadow:inset 0 1px 0 rgba(255,255,255,.03)}
.trend-chart-actions button:hover{border-color:#3d4a5c;background:#1a2029;color:#fff}
.trend-chart-actions button:focus-visible,.trend-tool:focus-visible,.trend-drag-dots:focus-visible,.trend-toolbar-collapse:focus-visible{outline:2px solid #84adff;outline-offset:2px}
.trend-chart-actions .trend-menu-icon{display:inline-flex;align-items:center;justify-content:center;width:16px;height:16px;line-height:1;color:currentColor;flex:0 0 auto}
.trend-chart-actions .trend-menu-icon svg{width:16px;height:16px;display:block;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.trend-chart-actions #saveProject{box-shadow:0 6px 16px rgba(185,28,28,.18)}
.trend-chart-actions #clearAllDrawings{border-color:#51313a;color:#fca5a5}
.trend-chart-actions #clearAllDrawings:hover{background:#2b161b;border-color:#7f1d1d;color:#fecaca}
.trend-floating-tools{gap:3px;padding:7px 8px;border:1px solid #d0d5dd;border-radius:12px;background:rgba(255,255,255,.98);box-shadow:0 12px 30px rgba(16,24,40,.18),0 1px 1px rgba(16,24,40,.06)}
.trend-tool{width:34px;height:34px;border:1px solid transparent;border-radius:9px;color:#344054;transition:background .12s ease,border-color .12s ease,color .12s ease,box-shadow .12s ease}
.trend-tool:hover{background:#f8fafc;border-color:#d0d5dd;color:#101828}
.trend-tool.active{background:#eff4ff!important;border-color:#b2ccff!important;color:#175cd3!important;box-shadow:inset 0 1px 0 rgba(255,255,255,.85)}
.trend-tool svg,.trend-drag-dots svg,.trend-toolbar-collapse svg{width:18px;height:18px;display:block;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;pointer-events:none}
.trend-drag-dots,.trend-toolbar-collapse{width:32px;height:34px;border-radius:9px}
.trend-tool-sep{height:26px;background:#e4e7ec}
#drawingLayer .trend-hit{stroke-width:20}
#drawingLayer .trend-handle{filter:drop-shadow(0 1px 2px rgba(16,24,40,.28))}
.trend-brush-settings{padding:10px 12px;border-radius:11px;box-shadow:0 10px 28px rgba(16,24,40,.18)}
.trend-brush-settings input[type=color]{width:32px;height:28px}
.trend-brush-settings input[type=range]{width:128px}


/* V20.146 — TradingView-inspired line replay controls and clean point-selection mode. */
.trend-backtest-overlay.is-selecting .trend-backtest-line{background:#2563eb;box-shadow:0 0 0 1px rgba(255,255,255,.8)}
.trend-backtest-overlay.is-selecting .trend-backtest-grab:before{background:rgba(37,99,235,.18)}
.trend-backtest-overlay.is-selecting .trend-backtest-label{border-color:#b2ccff;background:#eff4ff;color:#175cd3}
.trend-backtest-overlay.is-selecting .trend-backtest-rail-fill{background:rgba(37,99,235,.18)}
.trend-backtest-overlay.is-selecting .trend-backtest-handle{border-color:#2563eb}
.trend-backtest-overlay.is-selecting .trend-backtest-handle span{background:#2563eb;box-shadow:-4px 0 0 rgba(37,99,235,.38),4px 0 0 rgba(37,99,235,.38)}
.trend-replay-dock{position:absolute;z-index:6;transform:translateX(-50%);display:flex;align-items:center;gap:4px;min-height:40px;padding:5px 7px;border:1px solid #d0d5dd;border-radius:10px;background:rgba(255,255,255,.97);box-shadow:0 8px 24px rgba(16,24,40,.16);pointer-events:auto;touch-action:manipulation;color:#344054;white-space:nowrap}
.trend-replay-dock[hidden]{display:none!important}
.trend-replay-dock button{height:30px;min-width:30px;border:1px solid transparent;border-radius:7px;background:transparent;color:#344054;font:800 11px/1 var(--trend-font,"Be Vietnam Pro", "Inter", "Roboto", "Segoe UI", Arial,sans-serif);cursor:pointer;padding:0 8px;display:inline-flex;align-items:center;justify-content:center;gap:5px}
.trend-replay-dock button:hover{background:#f2f4f7;border-color:#e4e7ec;color:#101828}
.trend-replay-dock button:disabled{opacity:.35;cursor:default;background:transparent}
.trend-replay-pick{padding:0 10px!important;border-color:#d0d5dd!important;background:#fff!important}
.trend-replay-pick b{font:800 10px/1 var(--trend-font,"Be Vietnam Pro", "Inter", "Roboto", "Segoe UI", Arial,sans-serif)}
.trend-replay-play{min-width:36px!important;border-color:#84adff!important;background:#eff4ff!important;color:#175cd3!important;font-size:15px!important}
.trend-replay-play.is-playing{background:#175cd3!important;border-color:#175cd3!important;color:#fff!important}
.trend-replay-speed{min-width:40px!important;border-color:#d0d5dd!important;background:#f9fafb!important;font-variant-numeric:tabular-nums}
.trend-replay-time{padding:0 6px;font:700 9px/1 var(--trend-font,"Be Vietnam Pro", "Inter", "Roboto", "Segoe UI", Arial,sans-serif);color:#667085;font-variant-numeric:tabular-nums}
.trend-replay-close{margin-left:3px;border-left:1px solid #e4e7ec!important;border-radius:0!important;font-size:18px!important;color:#667085!important}
.trend-replay-close:hover{color:#b42318!important;background:#fff1f0!important}
.trend-backtest-grab{width:20px}
.trend-backtest-grab:hover:before{background:rgba(217,45,32,.35)}
.trend-backtest-overlay.is-selecting{cursor:crosshair}
@media(max-width:760px){.trend-replay-dock{max-width:calc(100% - 20px);overflow-x:auto}.trend-replay-pick b,.trend-replay-time{display:none}.trend-replay-dock button{flex:0 0 auto}}
.trend-chart-stage.is-backtest-selecting{cursor:crosshair!important}
.trend-chart-stage.is-backtest-selecting #trendChart{cursor:crosshair!important}

/* V20.148 — ultra-smooth line replay + stable drawing selection over Google series. */
.trend-replay-dock{transition:box-shadow .18s ease,border-color .18s ease,transform .18s ease}
.trend-replay-dock.is-playing{border-color:#84adff;box-shadow:0 10px 28px rgba(37,99,235,.18),0 1px 1px rgba(16,24,40,.06)}
.trend-replay-dock.is-playing:before{content:"";width:7px;height:7px;flex:0 0 7px;border-radius:50%;background:#2563eb;box-shadow:0 0 0 0 rgba(37,99,235,.34);animation:trendReplayPulse 1.15s ease-out infinite}
.trend-replay-time{min-width:84px;text-align:center;font-variant-numeric:tabular-nums;transition:color .12s ease}
.trend-replay-dock.is-playing .trend-replay-time{color:#175cd3}
@keyframes trendReplayPulse{0%{box-shadow:0 0 0 0 rgba(37,99,235,.34)}70%{box-shadow:0 0 0 7px rgba(37,99,235,0)}100%{box-shadow:0 0 0 0 rgba(37,99,235,0)}}

/* V20.150 — Backtest rail no longer covers X-axis year labels + explicit full-state exit. */
#backtestExit[hidden]{display:none!important}
#backtestExit{border-color:#fda29b!important;background:#fff5f4!important;color:#b42318!important}
#backtestExit:hover{border-color:#f97066!important;background:#fee4e2!important;color:#912018!important}
#backtestExit .trend-menu-icon{font-size:17px!important;font-weight:900!important}
.trend-backtest-rail{height:8px!important;background:rgba(208,213,221,.55);box-shadow:inset 0 0 0 1px rgba(152,162,179,.45)}
.trend-backtest-handle{height:18px!important;width:18px!important}
.trend-backtest-label{z-index:2}
.trend-backtest-overlay.is-selecting .trend-backtest-label{box-shadow:0 4px 14px rgba(37,99,235,.13)}
.trend-replay-mask{position:absolute;z-index:5;border:1px solid rgba(208,213,221,.95);border-radius:14px;background:linear-gradient(180deg,rgba(255,255,255,.97),rgba(255,255,255,.985));box-shadow:0 12px 28px rgba(16,24,40,.16);pointer-events:none;backdrop-filter:saturate(140%) blur(5px)}
.trend-replay-mask[hidden]{display:none!important}

/* V20.154 — Google Trends change metrics + TradingView-like future mask while choosing Backtest. */
.trend-backtest-overlay.is-selecting .trend-backtest-future{display:block!important;background:rgba(15,23,42,.075);border-left:1px solid rgba(37,99,235,.22);pointer-events:none}
.trend-insight-metric>span.is-up{color:#16a34a;font-weight:800}
.trend-insight-metric>span.is-down{color:#dc2626;font-weight:800}
.trend-insight-metric>span.is-flat{color:#94a3b8;font-weight:800}

/* V20.156 — color-coded drawing tools with restrained, professional active states. */
#drawingToolbar [data-tool="trend"]{color:#2563eb}#drawingToolbar [data-tool="ray"]{color:#7c3aed}#drawingToolbar [data-tool="arrow"]{color:#0284c7}
#drawingToolbar [data-tool="hline"]{color:#475569}#drawingToolbar [data-tool="vline"]{color:#64748b}#drawingToolbar [data-tool="rect"]{color:#0f766e}
#drawingToolbar [data-tool="dateprice"]{color:#4f46e5}#drawingToolbar [data-tool="grid3x3"]{color:#b45309}#drawingToolbar [data-tool="daterange"]{color:#15803d}
#drawingToolbar [data-tool="valuerange"]{color:#be123c}#drawingToolbar [data-tool="measure"]{color:#c2410c}#drawingToolbar [data-tool="brush"]{color:#db2777}#drawingToolbar [data-tool="text"]{color:#6d28d9}
#drawingToolbar [data-tool].active{background:color-mix(in srgb,currentColor 10%,#fff)!important;border-color:color-mix(in srgb,currentColor 30%,#d0d5dd)!important;color:currentColor!important;box-shadow:0 1px 3px rgba(16,24,40,.08),inset 0 1px 0 rgba(255,255,255,.88)!important}
#drawingToolbar [data-tool]:hover{background:color-mix(in srgb,currentColor 6%,#fff);border-color:color-mix(in srgb,currentColor 20%,#d0d5dd)}

/* V20.159 — per-tool styling + unmistakable ghost anchors for multi-step channel drawing. */
#drawingToolbar .trend-tool{transition:background .12s ease,border-color .12s ease,color .12s ease,box-shadow .12s ease,transform .12s ease}
#drawingToolbar .trend-tool[data-tool]:not([data-tool="select"]):not([data-tool="brush"]),#autoTrendline{color:var(--trend-tool-accent,#344054)}
#drawingToolbar .trend-tool[data-tool]:not([data-tool="select"]):not([data-tool="brush"]):hover,#autoTrendline:hover{background:color-mix(in srgb,var(--trend-tool-accent,#2563eb) 8%,#fff);border-color:color-mix(in srgb,var(--trend-tool-accent,#2563eb) 32%,#d0d5dd)}
#drawingToolbar .trend-tool[data-tool]:not([data-tool="select"]):not([data-tool="brush"]).active,#autoTrendline.active{background:color-mix(in srgb,var(--trend-tool-accent,#2563eb) 11%,#fff)!important;border-color:color-mix(in srgb,var(--trend-tool-accent,#2563eb) 45%,#d0d5dd)!important;color:var(--trend-tool-accent,#2563eb)!important;box-shadow:0 0 0 1px color-mix(in srgb,var(--trend-tool-accent,#2563eb) 12%,transparent)}
.trend-tool-style-menu{position:fixed;z-index:1600;width:230px;padding:10px;border:1px solid #d0d5dd;border-radius:12px;background:rgba(255,255,255,.985);box-shadow:0 18px 46px rgba(16,24,40,.22);color:#101828;font:12px/1.35 "Be Vietnam Pro", "Inter", "Roboto", "Segoe UI", Arial, Tahoma, Arial,sans-serif;backdrop-filter:blur(10px)}
.trend-tool-style-menu[hidden]{display:none!important}.trend-tool-style-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:8px}.trend-tool-style-head b{font-size:12px}.trend-tool-style-head button{width:26px;height:26px;border:0;border-radius:7px;background:#f2f4f7;color:#475467;cursor:pointer;font-size:17px}.trend-tool-style-menu label{display:grid;grid-template-columns:72px 1fr;align-items:center;gap:9px;padding:7px 0;border-top:1px solid #f2f4f7}.trend-tool-style-menu label span{font-weight:700;color:#475467}.trend-tool-style-menu input[type="color"]{width:100%;height:30px;padding:2px;border:1px solid #d0d5dd;border-radius:7px;background:#fff}.trend-tool-style-menu input[type="range"]{width:100%}.trend-tool-style-menu small{display:block;margin-top:7px;color:#667085;font-size:10px}.trend-channel-ghost-point{pointer-events:none;filter:drop-shadow(0 2px 5px rgba(16,24,40,.24));opacity:.96}.trend-channel-ghost-point.is-active{filter:drop-shadow(0 0 0 rgba(0,0,0,0)) drop-shadow(0 2px 7px rgba(37,99,235,.32));animation:trendGhostPulse .9s ease-in-out infinite alternate}@keyframes trendGhostPulse{from{opacity:.72}to{opacity:1}}

/* V20.161 — keyword UX, VIP badge, RR tool affordance, clearer draft contrast. */
.trend-project-item.is-local-draft b{color:#101828!important}.trend-project-item.is-local-draft .trend-project-row>span{min-width:0;display:flex;align-items:center;gap:6px}.trend-project-item.is-local-draft .trend-project-draft-badge{flex:0 0 auto}
.trend-vip-badge{display:inline-flex;align-items:center;justify-content:center;margin-left:5px;padding:2px 6px;border-radius:999px;background:linear-gradient(135deg,#fef3c7,#fde68a);border:1px solid #f59e0b;color:#92400e;font-size:8px;font-weight:950;letter-spacing:.08em;vertical-align:1px;box-shadow:0 1px 0 rgba(255,255,255,.8) inset}
.trend-account-card h3{display:flex;align-items:center;gap:3px}
.trend-rr-tool{font-family:"Be Vietnam Pro", "Inter", "Roboto", "Segoe UI", Arial,sans-serif!important}.trend-rr-icon{display:inline-flex;align-items:center;justify-content:center;gap:1px;line-height:1;transform:translateY(-.5px)}.trend-rr-icon b{font-size:13px;font-weight:950}.trend-rr-icon i{font-size:14px;font-style:normal;font-weight:950}.trend-rr-long{color:#047857!important}.trend-rr-short{color:#b42318!important}.trend-rr-long.active{background:#ecfdf3!important;border-color:#6ce9a6!important;color:#067647!important}.trend-rr-short.active{background:#fff1f3!important;border-color:#fda4af!important;color:#c01048!important}
#drawingLayer .trend-brush-select-dot{pointer-events:none;filter:drop-shadow(0 1px 2px rgba(16,24,40,.3))}


/* V20.162 — compact action row + TradingView-like replay speed selector. */
.trend-replay-speed{
  height:30px;min-width:60px;padding:0 22px 0 9px;border:1px solid #d0d5dd;border-radius:7px;
  background:#f9fafb;color:#344054;font:800 11px/1 var(--trend-font,"Be Vietnam Pro", "Inter", "Roboto", "Segoe UI", Arial,sans-serif);
  cursor:pointer;outline:none;font-variant-numeric:tabular-nums;appearance:auto;
}
.trend-replay-speed:hover{background:#f2f4f7;border-color:#98a2b3;color:#101828}
.trend-replay-speed:focus-visible{outline:2px solid #84adff;outline-offset:2px}
.trend-replay-speed:disabled{opacity:.42;cursor:default}
.trend-replay-dock.is-playing .trend-replay-speed{border-color:#84adff;background:#eff4ff;color:#175cd3}

/* Desktop action bar: keep the important controls readable and collapse secondary labels before they can overlap. */
@media (max-width:1780px){
  .trend-chart-actions{max-width:72vw!important;gap:2px!important}
  .trend-chart-actions #toggleInsights .trend-action-label,
  .trend-chart-actions #toggleTrendPanel .trend-action-label,
  .trend-chart-actions #toggleFloatingTools .trend-action-label,
  .trend-chart-actions #fullscreenChart .trend-action-label,
  .trend-chart-actions #newProject .trend-action-label,
  .trend-chart-actions #clearAllDrawings .trend-action-label,
  .trend-chart-actions #downloadImage .trend-action-label{display:none!important}
  .trend-chart-actions #toggleInsights,
  .trend-chart-actions #toggleTrendPanel,
  .trend-chart-actions #toggleFloatingTools,
  .trend-chart-actions #fullscreenChart,
  .trend-chart-actions #newProject,
  .trend-chart-actions #clearAllDrawings,
  .trend-chart-actions #downloadImage{width:31px!important;min-width:31px!important;padding:0!important}
}
@media (max-width:1480px){
  .trend-chart-actions #autoScaleY .trend-action-label{display:none!important}
  .trend-chart-actions #autoScaleY{width:31px!important;min-width:31px!important;padding:0!important}
  .trend-chart-actions #refreshTrendData .trend-action-label{display:none!important}
  .trend-chart-actions #refreshTrendData{width:31px!important;min-width:31px!important;padding:0!important}
  .trend-chart-actions{max-width:64vw!important}
}
.trend-chart-toolbar{position:relative;z-index:34}
.trend-floating-tools{z-index:30}

/* V20.163 — professional responsive action bar + end-keyword setting + drill-down regions. */
.trend-chart-toolbar{height:auto!important;min-height:44px;display:grid!important;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:6px 10px;padding:6px 10px!important;overflow:visible}
.trend-chart-actions{max-width:none!important;display:flex;align-items:center;justify-content:flex-end;gap:4px!important;flex-wrap:nowrap;min-width:0}
.trend-chart-actions button{height:30px;min-width:30px;display:inline-flex;align-items:center;justify-content:center;gap:5px;padding:0 8px;line-height:1;flex:0 0 auto}
.trend-chart-actions .trend-action-label{display:inline-block;max-width:118px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.trend-ranges{min-width:0}
.trend-toggle-row input[type="checkbox"]{width:18px;height:18px;accent-color:#2563eb;cursor:pointer}
.trend-insight-row.is-analyzable .trend-insight-main{cursor:pointer}
.trend-insight-row.is-analyzable .trend-insight-main:hover .trend-insight-name{text-decoration:underline;text-underline-offset:2px}
.trend-insight-row.is-analyzable .trend-insight-main:focus-visible{outline:2px solid #84adff;outline-offset:2px;border-radius:5px}
@media(max-width:1500px){
  .trend-chart-toolbar{grid-template-columns:1fr!important}
  .trend-chart-actions{justify-content:flex-start!important;flex-wrap:wrap!important;width:100%;max-width:100%!important}
  .trend-chart-actions button{height:29px}
  .trend-chart-actions .trend-action-label{max-width:104px}
}
@media(max-width:1120px){
  .trend-chart-actions .trend-action-label{display:none!important}
  .trend-chart-actions button{width:30px!important;min-width:30px!important;padding:0!important}
  .trend-chart-actions #backtestToggle,.trend-chart-actions #backtestExit,.trend-chart-actions #saveProject{width:auto!important;min-width:30px!important;padding:0 8px!important}
  .trend-chart-actions #backtestToggle .trend-action-label,.trend-chart-actions #backtestExit .trend-action-label,.trend-chart-actions #saveProject .trend-action-label{display:inline-block!important;max-width:86px}
}

/* V20.164 — independent insight refresh controls + calm high-traffic states. */
.trend-insights-head-actions{margin-left:auto;display:flex;align-items:center;gap:7px;min-width:0}
.trend-insight-reload-all{height:28px;display:inline-flex;align-items:center;gap:5px;border:1px solid #334155;border-radius:7px;background:#18202a;color:#cbd5e1;padding:0 9px;font-size:9px;font-weight:700;white-space:nowrap;cursor:pointer}
.trend-insight-reload-all:hover{background:#253140;color:#fff;border-color:#475569}
.trend-insight-reload-all span,.trend-insight-reload{display:inline-flex;align-items:center;justify-content:center}
.trend-insight-card-actions{display:flex!important;grid-template-columns:none!important;align-items:center;gap:4px;min-width:auto!important}
.trend-insight-card-actions .trend-insight-reload{width:27px;padding:0;font-size:14px;color:#93c5fd}
.trend-insight-card-actions .trend-insight-reload:hover{color:#dbeafe;background:#1e293b}
.trend-insight-reload-all.is-loading span,.trend-insight-reload.is-loading{animation:trendInsightSpin .8s linear infinite}
.trend-insight-reload-all:disabled,.trend-insight-reload:disabled{opacity:.55;cursor:wait}
.trend-insight-card.is-refreshing{border-color:#365274;box-shadow:inset 0 0 0 1px rgba(59,130,246,.08)}
.trend-insight-card.is-refreshing .trend-insight-list{opacity:.78}
@keyframes trendInsightSpin{to{transform:rotate(360deg)}}
@media(max-width:1080px){.trend-insight-reload-all b{display:none}.trend-insight-reload-all{width:28px;padding:0;justify-content:center}.trend-insights-head-actions{gap:5px}}

/* V20.170 — focused professional workspace, contextual UX and mobile-first controls. */
body.trend-backtest-mode .trend-ranges,
body.trend-backtest-mode .trend-chart-actions>button:not(#backtestToggle):not(#backtestExit){opacity:.22;filter:saturate(.45);pointer-events:none;transition:opacity .16s ease,filter .16s ease}
body.trend-backtest-mode .trend-chart-actions #backtestToggle,
body.trend-backtest-mode .trend-chart-actions #backtestExit{opacity:1!important;box-shadow:0 0 0 1px rgba(37,99,235,.14),0 3px 10px rgba(37,99,235,.08)}
body.trend-backtest-mode .trend-floating-tools{opacity:.32;pointer-events:none;filter:saturate(.35);transition:opacity .16s ease}
body.trend-backtest-mode .trend-replay-dock{box-shadow:0 12px 32px rgba(16,24,40,.22),0 0 0 2px rgba(37,99,235,.08)}
body.trend-backtest-select-mode .trend-chart-actions #backtestToggle{background:#eff4ff!important;border-color:#84adff!important;color:#175cd3!important}

.trend-focus-exit{position:fixed;z-index:2200;right:14px;top:12px;height:32px;padding:0 11px;border:1px solid rgba(255,255,255,.24);border-radius:8px;background:rgba(17,24,39,.88);color:#fff;font:800 10px/1 var(--trend-font,"Be Vietnam Pro", "Inter", "Roboto", "Segoe UI", Arial,sans-serif);box-shadow:0 8px 24px rgba(0,0,0,.18);backdrop-filter:blur(8px);cursor:pointer}
.trend-focus-exit[hidden]{display:none!important}
body.trend-focus-mode .trend-topbar,
body.trend-focus-mode .trend-chart-toolbar,
body.trend-focus-mode .trend-insights,
body.trend-focus-mode .trend-right-panel,
body.trend-focus-mode .trend-statusbar,
body.trend-focus-mode .trend-geo-breadcrumb{display:none!important}
body.trend-focus-mode .trend-main{grid-template-columns:1fr!important}
body.trend-focus-mode .trend-chart-column{height:100vh}
body.trend-focus-mode .trend-chart-stage{height:100vh;min-height:100vh}
body.trend-focus-mode{overflow:hidden!important}


.trend-context-inspector{min-height:100%;color:#cbd5e1}.trend-context-inspector[hidden]{display:none!important}
.trend-inspector-head{display:flex;align-items:flex-start;justify-content:space-between;gap:8px;padding:5px 2px 10px;border-bottom:1px solid #29313d}.trend-inspector-head small{display:block;color:#667085;font-size:8px;font-weight:900;letter-spacing:.12em}.trend-inspector-head h3{margin:3px 0 0;font-size:14px;color:#f2f4f7}.trend-inspector-head>button{width:28px;height:28px;border:1px solid #344054;border-radius:7px;background:#1d2430;color:#98a2b3;cursor:pointer;font-size:18px}.trend-inspector-head>button:hover{color:#fff;background:#263242}
.trend-inspector-card{margin-top:10px;padding:10px;border:1px solid #29313d;border-radius:10px;background:#171b21;display:grid;gap:7px}.trend-inspector-card label{display:grid;grid-template-columns:74px minmax(0,1fr);align-items:center;gap:8px;padding:6px 0;border-bottom:1px solid #242a33;font-size:10px}.trend-inspector-card label span{color:#98a2b3;font-weight:700}.trend-inspector-card input[type=color]{width:100%;height:30px;border:1px solid #344054;border-radius:7px;background:#101828;padding:2px}.trend-inspector-card input[type=range]{width:100%;accent-color:#528bff}.trend-inspector-action{height:32px;border:1px solid #344054;border-radius:7px;background:#1d2430;color:#d0d5dd;text-align:left;padding:0 9px;cursor:pointer;font-size:10px;font-weight:700}.trend-inspector-action:hover{background:#253140;color:#fff}.trend-inspector-action.danger{color:#fca5a5;border-color:#51313a}.trend-inspector-outcome{display:flex;align-items:center;justify-content:center;min-height:32px;border-radius:7px;border:1px solid #344054;background:#101828;color:#d0d5dd;font-size:10px;font-weight:950;letter-spacing:.07em}.trend-inspector-outcome[data-state="TARGET HIT"]{background:#ecfdf3;border-color:#6ce9a6;color:#067647}.trend-inspector-outcome[data-state="STOP HIT"]{background:#fff1f3;border-color:#fda4af;color:#c01048}.trend-inspector-outcome[data-state="OPEN"]{background:#fffaeb;border-color:#fedf89;color:#b54708}


.trend-insight-state{margin-top:4px;height:20px;display:inline-flex;align-items:center;border:0;border-radius:999px;padding:0 7px;background:#1d2939;color:#98a2b3;font-size:8px;font-weight:800;cursor:pointer;white-space:nowrap}.trend-insight-state[data-state="live"]{background:#ecfdf3;color:#067647}.trend-insight-state[data-state="cache"]{background:#fffaeb;color:#b54708}.trend-insight-state[data-state="sync"]{background:#eff8ff;color:#175cd3}.trend-insight-state[data-state="retry"]{background:#fff1f3;color:#c01048}.trend-insight-empty.is-loading{min-height:86px;color:transparent!important;position:relative;overflow:hidden;background:linear-gradient(90deg,#151c26 25%,#202a38 38%,#151c26 63%);background-size:400% 100%;animation:trendSkeleton 1.15s ease infinite;border-radius:8px}.trend-insight-empty.is-loading:after{content:"";position:absolute;left:12px;right:12px;top:18px;height:9px;border-radius:5px;background:rgba(255,255,255,.08);box-shadow:0 22px 0 rgba(255,255,255,.06),0 44px 0 rgba(255,255,255,.04)}@keyframes trendSkeleton{0%{background-position:100% 0}100%{background-position:0 0}}
.trend-insight-card{content-visibility:auto;contain-intrinsic-size:260px;contain:layout paint style}

.trend-geo-breadcrumb{display:flex;align-items:center;gap:6px;padding:5px 10px;border-bottom:1px solid #e4e7ec;background:#fff;color:#475467;font-size:10px}.trend-geo-breadcrumb[hidden]{display:none}.trend-geo-breadcrumb button{height:26px;border:1px solid #d0d5dd;border-radius:7px;background:#f9fafb;color:#344054;cursor:pointer;font-weight:800}.trend-geo-breadcrumb span{font-weight:800;color:#175cd3}

/* Mobile/tablet: true compact workspace instead of forcing desktop width. */
@media(max-width:900px){
  .trend-workspace-body{overflow:hidden!important}.trend-shell{min-width:0!important;width:100vw!important}.trend-topbar{min-height:auto;display:grid;grid-template-columns:auto 1fr auto;gap:7px;padding:7px}.trend-brand b,.trend-account-nav,.trend-user,.trend-access-pill{display:none!important}.trend-searchbar{grid-column:1/-1;max-width:none!important;width:100%;display:grid!important;grid-template-columns:minmax(0,1fr) minmax(110px,.55fr)!important;gap:6px}.trend-searchbar>select,.trend-searchbar>.trend-category-picker{display:none}.trend-searchbar #runSearch{height:38px}.trend-live-strip{position:static!important;grid-column:1/-1;justify-content:flex-start;overflow-x:auto}.trend-main{grid-template-columns:1fr!important}.trend-right-panel{display:none!important}.trend-mobile-panel-open .trend-right-panel{display:block!important;position:fixed;z-index:2050;top:0;right:0;bottom:0;width:min(86vw,340px)!important;background:#12151a;box-shadow:-18px 0 50px rgba(0,0,0,.35);padding-top:14px}.trend-chart-toolbar{grid-template-columns:1fr!important;padding:5px 7px!important}.trend-chart-actions{overflow-x:auto;justify-content:flex-start!important;scrollbar-width:none;padding-bottom:1px}.trend-chart-actions::-webkit-scrollbar{display:none}.trend-chart-actions #toggleTrendPanel{display:inline-flex!important}.trend-chart-actions button{min-width:38px!important;width:38px!important;height:38px!important;border-radius:9px!important}.trend-chart-actions #backtestToggle,.trend-chart-actions #backtestExit,.trend-chart-actions #saveProject{width:auto!important}.trend-floating-tools{top:auto!important;left:8px!important;right:8px!important;bottom:12px!important;max-width:calc(100% - 16px)!important;width:auto!important;padding:7px 8px!important;border-radius:14px!important;overflow-x:auto!important;box-shadow:0 14px 35px rgba(16,24,40,.24)!important}.trend-tool,.trend-drag-dots,.trend-toolbar-collapse{min-width:42px!important;width:42px!important;height:42px!important;border-radius:10px!important}.trend-tool-group{gap:3px}.trend-tool-sep{height:32px}.trend-statusbar{display:none}.trend-insights-grid{grid-template-columns:1fr!important}.trend-insights{max-height:38vh;overflow:auto}.trend-replay-dock{max-width:calc(100vw - 24px)!important;overflow-x:auto!important}.trend-replay-dock button,.trend-replay-speed{min-height:38px}.trend-picker-pop{position:fixed!important;left:8px!important;right:8px!important;top:90px!important;width:auto!important;max-width:none!important}.trend-context-inspector{padding-bottom:24px}
}
@media(max-width:560px){.trend-chart-actions .trend-action-label{display:none!important}.trend-chart-actions #backtestToggle .trend-action-label,.trend-chart-actions #backtestExit .trend-action-label,.trend-chart-actions #saveProject .trend-action-label{display:inline!important}.trend-insights-title small{display:none}.trend-insights-head{align-items:center}.trend-insight-reload-all b{display:none}.trend-replay-time{display:none}}


/* V20.172 — high-contrast insight labels + compact cursor-based lazy Keyword list. */
.trend-insight-name,.trend-insight-row.is-analyzable .trend-insight-name{color:#f8fafc!important}
.trend-insight-row.is-analyzable .trend-insight-main:hover{background:#202a38!important}.trend-insight-row.is-analyzable .trend-insight-main:hover .trend-insight-name{color:#fff!important;text-decoration-color:#cbd5e1!important}
.trend-insight-main small{color:#cbd5e1!important}
.trend-project-viewport{position:relative;max-height:min(46vh,430px);min-height:104px;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;scrollbar-gutter:stable;padding-right:2px;border-radius:8px}
.trend-project-viewport::-webkit-scrollbar{width:7px}.trend-project-viewport::-webkit-scrollbar-thumb{background:#3a4452;border-radius:999px}.trend-project-viewport::-webkit-scrollbar-track{background:transparent}
.trend-project-load-more{min-height:34px;display:flex;align-items:center;justify-content:center;gap:7px;margin-top:6px;border-top:1px solid #252d37;color:#7f8a9c;font-size:9px;cursor:default;user-select:none}
.trend-project-load-more[hidden]{display:none!important}.trend-project-load-more[data-state="idle"],.trend-project-load-more[data-state="error"]{cursor:pointer}.trend-project-load-more[data-state="idle"]:hover{color:#cbd5e1}.trend-project-load-more[data-state="error"]{color:#fda4af}
.trend-project-load-spinner{width:11px;height:11px;border:2px solid #344054;border-top-color:#60a5fa;border-radius:50%;opacity:0}.trend-project-load-more[data-state="loading"] .trend-project-load-spinner{opacity:1;animation:trendSpin .75s linear infinite}
.trend-project-empty{padding:16px 10px;border:1px dashed #344054;border-radius:8px;color:#8f9baa;text-align:center;font-size:9px;line-height:1.5}
@media(max-width:1000px){.trend-project-viewport{max-height:48vh}}

/* V20.173 — production polish: one health chip, saved-keyword search/favorites,
   calmer surfaces, chart engagement and stronger Focus mode. */
.trend-status-internal{display:none!important}
.trend-health-chip{display:inline-flex;align-items:center;gap:5px;height:25px;padding:0 8px;border:0;border-radius:999px;background:#18202a;color:#cbd5e1;font:800 9px/1 "Be Vietnam Pro", "Inter", "Roboto", "Segoe UI", Arial,sans-serif;white-space:nowrap;cursor:default;box-shadow:inset 0 0 0 1px rgba(148,163,184,.13);transition:background .15s ease,color .15s ease,box-shadow .15s ease}
.trend-health-chip>span{font-size:9px}.trend-health-chip.live{background:#092a1b;color:#9ee6c4;box-shadow:inset 0 0 0 1px rgba(18,183,106,.22)}
.trend-health-chip.cache{background:#2d2413;color:#fdbf6f;box-shadow:inset 0 0 0 1px rgba(247,144,9,.22);cursor:pointer}
.trend-health-chip.error{background:#351416;color:#fda29b;box-shadow:inset 0 0 0 1px rgba(240,68,56,.25);cursor:pointer}
.trend-health-chip.checking{background:#17202d;color:#b2ddff}.trend-health-chip.reconnect{cursor:pointer}
.trend-health-chip:hover{filter:brightness(1.08)}

.trend-project-search{position:relative;display:flex;align-items:center;gap:5px;margin:0 0 8px;padding:0 8px;height:34px;border-radius:9px;background:#171c23;box-shadow:inset 0 0 0 1px rgba(148,163,184,.10);transition:box-shadow .15s ease,background .15s ease}
.trend-project-search:focus-within{background:#1a2029;box-shadow:inset 0 0 0 1px rgba(96,165,250,.38),0 0 0 2px rgba(59,130,246,.08)}
.trend-project-search>span{color:#7f8a9c;font-size:13px}.trend-project-search input{min-width:0;flex:1;height:100%;border:0!important;outline:0!important;background:transparent!important;color:#f8fafc!important;font-size:10px!important;padding:0!important;box-shadow:none!important}
.trend-project-search input::placeholder{color:#667085}.trend-project-search button{width:23px;height:23px;border:0;border-radius:6px;background:transparent;color:#8f9baa;cursor:pointer;font-size:15px;line-height:1}.trend-project-search button:hover{background:#27303b;color:#fff}
.trend-project-section{display:flex;align-items:center;gap:6px;margin:7px 2px 4px;color:#7f8a9c;font-size:8.5px;font-weight:900;letter-spacing:.07em;text-transform:uppercase}.trend-project-section:after{content:"";height:1px;flex:1;background:rgba(148,163,184,.10)}
.trend-project-item{border:0!important;background:#181d24!important;box-shadow:inset 0 0 0 1px rgba(148,163,184,.09);transition:background .14s ease,box-shadow .14s ease,transform .14s ease}
.trend-project-item:hover{background:#1d242d!important;box-shadow:inset 0 0 0 1px rgba(148,163,184,.20)}
.trend-project-item.active{box-shadow:inset 3px 0 0 #3b82f6,inset 0 0 0 1px rgba(96,165,250,.28)!important}
.trend-project-item b{font-size:11.5px!important}.trend-project-item small{font-size:10px!important;line-height:1.35;color:#98a2b3!important}
.trend-project-row{gap:5px}.trend-project-star{flex:0 0 auto;width:24px;height:24px;border:0!important;border-radius:6px;background:transparent!important;color:#667085;cursor:pointer;font-size:14px;line-height:1;padding:0!important}.trend-project-star:hover{background:#27303b!important;color:#fdb022}.trend-project-star.is-favorite{color:#fdb022!important}.trend-project-delete{width:22px;height:22px;border-radius:6px!important}.trend-project-delete:hover{background:#3a2024!important}
.trend-project-empty{border:0!important;background:#171c23;box-shadow:inset 0 0 0 1px rgba(148,163,184,.08)}
.trend-project-load-more{border-top:0!important;background:linear-gradient(to bottom,transparent,rgba(23,28,35,.85));border-radius:7px}

/* Calm the visual hierarchy: surfaces separate sections; borders are reserved for state/focus. */
.trend-right-panel{border-left-color:rgba(148,163,184,.10)!important;transition:opacity .16s ease,filter .16s ease}
.trend-side-card{border:0!important;background:#171c23!important;box-shadow:inset 0 0 0 1px rgba(148,163,184,.08)}
.trend-side-card label{border-top-color:rgba(148,163,184,.08)!important}.trend-insight-card{border-color:rgba(148,163,184,.10)!important}.trend-chart-toolbar{border-color:rgba(148,163,184,.08)!important}
.trend-chart-engaged .trend-right-panel{opacity:.48;filter:saturate(.72)}.trend-chart-engaged .trend-right-panel:hover{opacity:1;filter:none}
.trend-chart-engaged .trend-right-panel:focus-within{opacity:1;filter:none}

/* Focus: chart owns the viewport. Timeframe remains visible; the rest of controls appear only near the top edge. */
body.trend-focus-mode .trend-topbar,body.trend-focus-mode .trend-insights,body.trend-focus-mode .trend-right-panel,body.trend-focus-mode .trend-statusbar,body.trend-focus-mode .trend-geo-breadcrumb{display:none!important}
body.trend-focus-mode .trend-main{grid-template-columns:1fr!important}
body.trend-focus-mode .trend-chart-column{height:100vh;position:relative}
body.trend-focus-mode .trend-chart-stage{height:100vh!important;min-height:100vh!important}
body.trend-focus-mode{overflow:hidden!important}
body.trend-focus-mode .trend-chart-toolbar{display:grid!important;position:absolute!important;z-index:75;left:8px;right:8px;top:6px;height:38px!important;border:0!important;border-radius:10px;background:rgba(16,20,26,.62)!important;backdrop-filter:blur(10px);box-shadow:0 4px 16px rgba(0,0,0,.10);transition:background .15s ease,box-shadow .15s ease}
body.trend-focus-mode .trend-chart-toolbar .trend-ranges{opacity:.92}
body.trend-focus-mode .trend-chart-toolbar .trend-chart-actions{opacity:0;pointer-events:none;transform:translateY(-3px);transition:opacity .15s ease,transform .15s ease}
body.trend-focus-mode.trend-focus-controls .trend-chart-toolbar,body.trend-focus-mode .trend-chart-toolbar:hover{background:rgba(16,20,26,.93)!important;box-shadow:0 8px 26px rgba(0,0,0,.20)}
body.trend-focus-mode.trend-focus-controls .trend-chart-toolbar .trend-chart-actions,body.trend-focus-mode .trend-chart-toolbar:hover .trend-chart-actions{opacity:1;pointer-events:auto;transform:none}
body.trend-focus-mode .trend-floating-tools{top:50px!important}
body.trend-focus-mode .trend-focus-exit{opacity:.62;transition:opacity .15s ease}body.trend-focus-mode .trend-focus-exit:hover{opacity:1}

@media(max-width:980px){.trend-project-search{height:38px}.trend-project-search input{font-size:12px!important}.trend-health-chip{height:28px}.trend-chart-engaged .trend-right-panel{opacity:1;filter:none}body.trend-focus-mode .trend-chart-toolbar{left:6px;right:6px;top:5px;overflow-x:auto}body.trend-focus-mode .trend-floating-tools{top:auto!important}}
.trend-project-row-actions{display:inline-flex;align-items:center;gap:2px;flex:0 0 auto}
/* v20.661.0: Keep #clientBridgeInstall visible in .trend-live-strip */

/* V20.174 — focus safe-area + hot-path polish. */
/* The old fixed Focus exit pill is intentionally retired: the toolbar's Focus button is the single exit control. */
.trend-focus-exit{display:none!important}
.trend-action-tooltip{position:fixed;z-index:3300;max-width:min(420px,calc(100vw - 16px));padding:6px 8px;border:1px solid rgba(148,163,184,.22);border-radius:7px;background:rgba(15,23,42,.96);color:#f8fafc;box-shadow:0 8px 24px rgba(2,6,23,.25);font:600 10px/1.35 "Be Vietnam Pro", "Inter", "Roboto", "Segoe UI", Arial,sans-serif;pointer-events:none;white-space:normal;overflow-wrap:anywhere;backdrop-filter:blur(8px)}
.trend-action-tooltip[hidden]{display:none!important}

body.trend-focus-mode .trend-chart-toolbar{grid-template-columns:minmax(170px,1fr) minmax(0,auto)!important;max-width:calc(100vw - 16px);overflow:hidden!important;isolation:isolate}
body.trend-focus-mode .trend-chart-toolbar .trend-ranges{min-width:0;overflow-x:auto!important;overscroll-behavior-inline:contain;scrollbar-width:none}
body.trend-focus-mode .trend-chart-toolbar .trend-ranges::-webkit-scrollbar{display:none}
body.trend-focus-mode .trend-chart-toolbar .trend-chart-actions{min-width:0!important;max-width:min(76vw,980px)!important;overflow-x:auto!important;overflow-y:hidden!important;overscroll-behavior-inline:contain;scrollbar-width:none;padding:0 2px 1px 0;scroll-padding-right:96px}
body.trend-focus-mode .trend-chart-toolbar .trend-chart-actions::-webkit-scrollbar{display:none}
body.trend-focus-mode .trend-chart-toolbar .trend-chart-actions #focusMode{order:999;position:sticky;right:0;z-index:5;flex:0 0 auto;background:#2563eb!important;border-color:#3b82f6!important;color:#fff!important;box-shadow:-12px 0 15px rgba(16,20,26,.95),0 3px 12px rgba(37,99,235,.22)}
body.trend-focus-mode .trend-chart-toolbar .trend-chart-actions #focusMode .trend-menu-icon{color:#fff!important}
body.trend-focus-mode .trend-chart-toolbar:focus-within{background:rgba(16,20,26,.95)!important;box-shadow:0 8px 26px rgba(0,0,0,.20)}
body.trend-focus-mode .trend-chart-toolbar:focus-within .trend-chart-actions{opacity:1;pointer-events:auto;transform:none}

/* During hot chart gestures, keep secondary chrome cheap to paint. */
body.trend-chart-interacting .trend-right-panel,body.trend-chart-interacting .trend-insights{transition:none!important}
body.trend-chart-interacting .trend-right-panel{opacity:.38!important;filter:none!important}
body.trend-chart-interacting .trend-insight-card{box-shadow:none!important}
.trend-chart-engaged:not(.trend-chart-interacting) .trend-right-panel{opacity:.62;filter:saturate(.82)}

@media(max-width:1500px){
  body.trend-focus-mode .trend-chart-actions .trend-action-label{display:none!important}
  body.trend-focus-mode .trend-chart-actions #focusMode .trend-action-label,
  body.trend-focus-mode .trend-chart-actions #backtestToggle .trend-action-label,
  body.trend-focus-mode .trend-chart-actions #backtestExit .trend-action-label{display:inline!important;max-width:92px}
  body.trend-focus-mode .trend-chart-actions button{width:31px!important;min-width:31px!important;padding:0!important;justify-content:center}
  body.trend-focus-mode .trend-chart-actions #focusMode,
  body.trend-focus-mode .trend-chart-actions #backtestToggle,
  body.trend-focus-mode .trend-chart-actions #backtestExit{width:auto!important;padding:0 8px!important}
}
@media(max-width:980px){
  body.trend-focus-mode .trend-chart-toolbar{grid-template-columns:minmax(118px,1fr) minmax(0,auto)!important;left:6px!important;right:6px!important;max-width:calc(100vw - 12px)}
  body.trend-focus-mode .trend-chart-toolbar .trend-chart-actions{max-width:68vw!important}
  body.trend-focus-mode .trend-chart-actions #backtestToggle .trend-action-label,body.trend-focus-mode .trend-chart-actions #backtestExit .trend-action-label{display:none!important}
  body.trend-focus-mode .trend-chart-actions #backtestToggle,body.trend-focus-mode .trend-chart-actions #backtestExit{width:31px!important;padding:0!important}
  body.trend-focus-mode .trend-chart-actions #focusMode .trend-action-label{display:inline!important}
}

/* V20.175 — calm hover: moving across chart/data or drawings never changes stroke weight. Selection keeps the existing subtle selected halo/handles. */
#drawingLayer .trend-object:hover{filter:none!important}
#drawingLayer .trend-object:not(.trend-selected){filter:none}

/* V20.176 — Vietnamese auth typography: sentence case + stable native Vietnamese glyph rendering. */
.trend-auth-modal .msc-auth-submit{font-family:"Be Vietnam Pro", "Inter", "Roboto", "Segoe UI", Arial, "Noto Sans",Tahoma, Arial,sans-serif!important;font-weight:800!important;font-size:15px!important;line-height:1.25!important;letter-spacing:0!important;text-transform:none!important;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility}
.trend-auth-modal .msc-auth-submit-register b{font-family:"Be Vietnam Pro", "Inter", "Roboto", "Segoe UI", Arial, "Noto Sans",Tahoma, Arial,sans-serif;font-weight:800;letter-spacing:0;text-transform:none}

/* V20.176 — stable sidebar dimming. Pointer down/up/wheel no longer changes the dim level, so the right panel cannot flash between multiple opacities while working on the chart. */
body.trend-chart-engaged .trend-right-panel,
body.trend-chart-interacting .trend-right-panel,
body.trend-chart-engaged.trend-chart-interacting .trend-right-panel{opacity:.62!important;filter:saturate(.84)!important}
body.trend-chart-interacting .trend-right-panel{transition:none!important}
body:not(.trend-chart-engaged):not(.trend-chart-interacting) .trend-right-panel{opacity:1;filter:none}


/* V20.177 — unified “Toàn Màn Hình”: one immersive workspace, no duplicate Focus mode.
   All analysis controls remain reachable; narrow viewports scroll the action rail instead of deleting buttons. */
body.trend-fullscreen-workspace{overflow:hidden!important}
body.trend-fullscreen-workspace .trend-main{height:100vh;min-height:100vh;background:#0f1115}
body.trend-fullscreen-workspace .trend-chart-column{height:100vh;min-height:0}
body.trend-fullscreen-workspace .trend-chart-toolbar{
  flex:0 0 auto!important;height:auto!important;min-height:44px!important;
  display:grid!important;grid-template-columns:minmax(250px,auto) minmax(0,1fr)!important;
  align-items:center!important;gap:10px!important;padding:6px 10px!important;
  position:relative!important;inset:auto!important;border-radius:0!important;
  background:#13171c!important;box-shadow:none!important;backdrop-filter:none!important;
}
body.trend-fullscreen-workspace .trend-chart-toolbar .trend-ranges{
  min-width:0;max-width:440px;overflow-x:auto;overscroll-behavior-inline:contain;scrollbar-width:none;
}
body.trend-fullscreen-workspace .trend-chart-toolbar .trend-ranges::-webkit-scrollbar{display:none}
body.trend-fullscreen-workspace .trend-chart-toolbar .trend-chart-actions{
  min-width:0!important;max-width:none!important;width:100%;display:flex!important;justify-content:flex-end!important;
  gap:4px!important;overflow-x:auto!important;overflow-y:hidden!important;overscroll-behavior-inline:contain;
  scrollbar-width:none;opacity:1!important;pointer-events:auto!important;transform:none!important;padding:0 1px 1px!important;
}
body.trend-fullscreen-workspace .trend-chart-toolbar .trend-chart-actions::-webkit-scrollbar{display:none}
body.trend-fullscreen-workspace .trend-chart-actions button{flex:0 0 auto;width:auto!important;min-width:31px!important;padding:6px 8px!important;justify-content:center}
body.trend-fullscreen-workspace .trend-chart-actions .trend-action-label{display:inline!important;max-width:none!important}
body.trend-fullscreen-workspace .trend-chart-actions #fullscreenChart{
  order:999;position:sticky;right:0;z-index:6;background:#2563eb!important;border-color:#3b82f6!important;color:#fff!important;
  box-shadow:-14px 0 18px #13171c,0 3px 12px rgba(37,99,235,.20)
}
body.trend-fullscreen-workspace .trend-chart-actions #fullscreenChart .trend-menu-icon{color:#fff!important}
body.trend-fullscreen-workspace .trend-floating-tools{top:12px!important}
body.trend-fullscreen-workspace .trend-right-panel{opacity:1!important;filter:none!important;transition:none!important}
body.trend-fullscreen-workspace .trend-insights{transition:none!important}
/* The old Focus classes are inert even if an old cached tab still has them on body. */
body.trend-fullscreen-workspace.trend-focus-mode .trend-chart-toolbar,
body.trend-fullscreen-workspace.trend-focus-mode .trend-insights,
body.trend-fullscreen-workspace.trend-focus-mode .trend-right-panel,
body.trend-fullscreen-workspace.trend-focus-mode .trend-statusbar,
body.trend-fullscreen-workspace.trend-focus-mode .trend-geo-breadcrumb{display:revert!important}
@media(max-width:1350px){
  body.trend-fullscreen-workspace .trend-chart-toolbar{grid-template-columns:minmax(190px,34vw) minmax(0,1fr)!important;padding-inline:7px!important}
  body.trend-fullscreen-workspace .trend-chart-actions .trend-action-label{display:inline!important}
}
@media(max-width:900px){
  body.trend-fullscreen-workspace .trend-main{grid-template-columns:1fr!important}
  body.trend-fullscreen-workspace .trend-right-panel{display:none!important}
  body.trend-fullscreen-workspace .trend-chart-toolbar{grid-template-columns:1fr!important;gap:4px!important}
  body.trend-fullscreen-workspace .trend-chart-toolbar .trend-ranges{max-width:100%}
  body.trend-fullscreen-workspace .trend-chart-toolbar .trend-chart-actions{justify-content:flex-start!important}
  body.trend-fullscreen-workspace .trend-chart-actions .trend-action-label{display:none!important}
  body.trend-fullscreen-workspace .trend-chart-actions #backtestToggle .trend-action-label,
  body.trend-fullscreen-workspace .trend-chart-actions #backtestExit .trend-action-label,
  body.trend-fullscreen-workspace .trend-chart-actions #fullscreenChart .trend-action-label{display:inline!important}
}

/* V20.179 — saved Keyword manager: multi-select, bulk delete and inline rename. */
.trend-project-head-actions{display:inline-flex;align-items:center;gap:4px}
.trend-project-head-actions button{min-width:30px;height:28px;border:0;border-radius:7px;background:#1b222b;color:#b7c1ce;font:700 10px/1 "Be Vietnam Pro", "Inter", "Roboto", "Segoe UI", Arial,sans-serif;cursor:pointer;padding:0 8px}
.trend-project-head-actions button:hover{background:#26313d;color:#fff}
.trend-project-bulkbar{display:grid;grid-template-columns:auto 1fr auto auto;align-items:center;gap:5px;margin:-1px 0 8px;padding:6px;border-radius:9px;background:#111923;box-shadow:inset 0 0 0 1px rgba(96,165,250,.18)}
.trend-project-bulkbar[hidden]{display:none!important}
.trend-project-bulkbar button{height:27px;border:0;border-radius:6px;background:#202a35;color:#d8e0ea;font:700 9px/1 "Be Vietnam Pro", "Inter", "Roboto", "Segoe UI", Arial,sans-serif;padding:0 7px;cursor:pointer;white-space:nowrap}
.trend-project-bulkbar button:hover:not(:disabled){background:#2a3644;color:#fff}.trend-project-bulkbar button:disabled{opacity:.45;cursor:default}
#projectSelectedCount{min-width:0;color:#93a4b8;font-size:9px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.trend-project-bulkbar .trend-project-bulk-delete{background:#3b1d23;color:#fecaca}.trend-project-bulkbar .trend-project-bulk-delete:hover:not(:disabled){background:#55242c;color:#fff}
.trend-project-bulkbar .trend-project-bulk-cancel{background:transparent;color:#98a2b3}
.trend-project-row>b{min-width:0;flex:1}
.trend-project-check{flex:0 0 auto;width:15px;height:15px;margin:0 2px 0 0;accent-color:#3b82f6;cursor:pointer}
.trend-project-item.is-selected{background:#18283a!important;box-shadow:inset 3px 0 0 #60a5fa,inset 0 0 0 1px rgba(96,165,250,.30)!important}
.trend-project-edit{flex:0 0 auto;width:22px;height:22px;border:0!important;border-radius:6px;background:transparent!important;color:#7f8a9c;cursor:pointer;font-size:13px;line-height:1;padding:0!important}
.trend-project-edit:hover{background:#27303b!important;color:#bfdbfe!important}
#keywordSidebarDefault.is-selecting .trend-project-star,#keywordSidebarDefault.is-selecting .trend-project-edit,#keywordSidebarDefault.is-selecting .trend-project-delete{display:none!important}
#keywordSidebarDefault.is-selecting .trend-project-item{cursor:pointer}
#keywordSidebarDefault.is-selecting .trend-project-item.is-local-draft{opacity:.58;cursor:default}
.trend-project-rename-input{min-width:0;flex:1;height:25px;border:1px solid rgba(96,165,250,.55)!important;border-radius:6px;background:#0f1722!important;color:#fff!important;padding:0 7px!important;outline:0!important;font:700 11px/1.2 "Be Vietnam Pro", "Inter", "Roboto", "Segoe UI", Arial,sans-serif!important;box-shadow:0 0 0 2px rgba(59,130,246,.09)!important}
.trend-project-item.is-renaming .trend-project-row-actions{opacity:.35;pointer-events:none}
@media(max-width:980px){.trend-project-bulkbar{grid-template-columns:1fr auto}.trend-project-bulkbar #projectSelectedCount{order:3}.trend-project-bulkbar .trend-project-bulk-cancel{order:4}}

/* V20.180 — saved Keyword rename affordance must always be visible, even on narrow sidebars. */
.trend-project-row{min-width:0}
.trend-project-row>b{min-width:0;flex:1 1 auto;padding-right:2px;cursor:text}
.trend-project-row-actions{display:inline-flex!important;align-items:center;gap:3px;flex:0 0 auto;opacity:1!important;visibility:visible!important}
.trend-project-edit{display:inline-grid!important;place-items:center;width:27px!important;height:24px!important;border-radius:6px!important;background:rgba(59,130,246,.13)!important;color:#bfdbfe!important;box-shadow:inset 0 0 0 1px rgba(96,165,250,.24);opacity:1!important;visibility:visible!important;font-size:13px!important}
.trend-project-edit:hover,.trend-project-edit:focus-visible{background:rgba(59,130,246,.24)!important;color:#fff!important;box-shadow:inset 0 0 0 1px rgba(147,197,253,.5)!important;outline:0}
.trend-project-star{opacity:.9}.trend-project-delete{opacity:.78}
@media(max-width:1100px){.trend-project-row-actions{gap:2px}.trend-project-star,.trend-project-delete{width:20px!important}.trend-project-edit{width:25px!important}}

/* V20.181 — content-first saved Keyword cards: title gets the space, actions stay out of the way. */
.trend-project-item{position:relative;min-width:0;overflow:visible}
.trend-project-row{min-width:0;padding-right:0!important}
.trend-project-title{min-width:0!important;flex:1 1 auto!important;display:block!important;padding-right:0!important;cursor:text;user-select:text}
.trend-project-row-actions,.trend-project-star,.trend-project-edit,.trend-project-delete{display:none!important}
.trend-project-pin-mark{position:absolute;z-index:2;top:9px;right:10px;color:#fdb022;font-size:11px;line-height:1;pointer-events:none;filter:drop-shadow(0 1px 2px rgba(0,0,0,.2))}
.trend-project-item.is-favorite:not(:hover):not(:focus-within) .trend-project-row{padding-right:18px!important}
.trend-project-more{position:absolute;z-index:3;top:6px;right:6px;width:27px;height:27px;display:grid;place-items:center;border:0;border-radius:7px;background:#222b36;color:#c8d2df;font:900 16px/1 "Be Vietnam Pro", "Inter", "Roboto", "Segoe UI", Arial,sans-serif;cursor:pointer;opacity:.22;pointer-events:auto;transition:opacity .12s ease,background .12s ease,color .12s ease,transform .12s ease}
.trend-project-item:hover .trend-project-more,.trend-project-item:focus-within .trend-project-more,.trend-project-more:focus-visible{opacity:1;background:#283443;color:#fff;outline:0}
.trend-project-item:hover .trend-project-pin-mark,.trend-project-item:focus-within .trend-project-pin-mark{opacity:0}
.trend-project-more:active{transform:scale(.94)}
#keywordSidebarDefault.is-selecting .trend-project-more,#keywordSidebarDefault.is-selecting .trend-project-pin-mark{display:none!important}
.trend-project-action-menu{position:fixed;z-index:120;display:grid;min-width:164px;padding:5px;border-radius:9px;background:#111923;box-shadow:0 16px 40px rgba(0,0,0,.42),inset 0 0 0 1px rgba(148,163,184,.16);font-family:"Be Vietnam Pro", "Inter", "Roboto", "Segoe UI", Arial,sans-serif}
.trend-project-action-menu[hidden]{display:none!important}
.trend-project-action-menu button{height:31px;border:0;border-radius:6px;background:transparent;color:#dbe4ef;text-align:left;padding:0 9px;font:700 10px/1 "Be Vietnam Pro", "Inter", "Roboto", "Segoe UI", Arial,sans-serif;cursor:pointer;white-space:nowrap}
.trend-project-action-menu button:hover,.trend-project-action-menu button:focus-visible{background:#253140;color:#fff;outline:0}
.trend-project-action-menu button.is-danger{color:#fda4af}.trend-project-action-menu button.is-danger:hover{background:#3b2027;color:#fecdd3}
.trend-project-rename-editor{position:absolute;z-index:8;inset:5px;display:flex;align-items:center;border-radius:7px;background:#111923;box-shadow:0 0 0 1px rgba(96,165,250,.48),0 8px 22px rgba(0,0,0,.32)}
.trend-project-rename-editor .trend-project-rename-input{width:100%!important;height:100%!important;min-height:36px!important;border:0!important;border-radius:7px!important;background:transparent!important;color:#fff!important;padding:0 10px!important;font:750 11.5px/1.25 "Be Vietnam Pro", "Inter", "Roboto", "Segoe UI", Arial,sans-serif!important;box-shadow:none!important;outline:0!important}
.trend-project-item.is-renaming>.trend-project-row,.trend-project-item.is-renaming>small,.trend-project-item.is-renaming>.trend-project-pin-mark,.trend-project-item.is-renaming>.trend-project-more{visibility:hidden!important}
.trend-project-item.is-saving-name .trend-project-rename-editor{opacity:.65}
@media(hover:none),(pointer:coarse){.trend-project-more{opacity:.72}.trend-project-item:not(.is-favorite) .trend-project-row{padding-right:28px!important}.trend-project-item.is-favorite .trend-project-row{padding-right:28px!important}.trend-project-pin-mark{display:none}}

/* V20.182 · native confirmations + Free Trial upsell */
.trend-vip-upgrade{flex:0 0 auto;min-height:32px;padding:0 13px;border:1px solid #fbbf24;border-radius:8px;background:linear-gradient(180deg,#facc15,#f59e0b);color:#3b2300;display:inline-flex;align-items:center;justify-content:center;gap:6px;text-decoration:none;font:900 11px/1 var(--trend-font);box-shadow:0 3px 12px rgba(245,158,11,.22);white-space:nowrap}.trend-vip-upgrade:hover{filter:brightness(1.05);transform:translateY(-1px)}.trend-vip-upgrade span{font-size:15px}.trend-free-badge{display:inline-flex;align-items:center;padding:2px 6px;border-radius:999px;background:#eff8ff;color:#175cd3;border:1px solid #b2ddff;font-size:8px;font-weight:900;letter-spacing:.06em}
.trend-confirm-modal,.trend-trial-modal{backdrop-filter:blur(3px);-webkit-backdrop-filter:blur(3px)}.trend-confirm-card{width:min(470px,calc(100vw - 28px));display:grid;grid-template-columns:42px minmax(0,1fr);column-gap:13px;align-items:start}.trend-confirm-card>.trend-modal-actions{grid-column:1/-1}.trend-confirm-icon{width:42px;height:42px;border-radius:12px;display:grid;place-items:center;background:#fff1f2;color:#be123c;border:1px solid #fecdd3;font-weight:950;font-size:20px}.trend-confirm-card h3{margin:1px 0 8px;font-size:17px}.trend-confirm-card .trend-modal-subtitle{margin:0;color:#b7c0cd;font-size:12px}.trend-danger-confirm{border-color:#b42318!important;background:#b42318!important;color:#fff!important;font-weight:850}.trend-danger-confirm:hover{background:#912018!important}
.trend-trial-card{position:relative;width:min(500px,calc(100vw - 28px));padding:22px}.trend-trial-card>.trend-modal-x{position:absolute;right:14px;top:14px}.trend-trial-kicker{display:inline-flex;padding:4px 8px;border-radius:999px;background:#fff7d6;color:#9a6700;border:1px solid #f9db8a;font-size:9px;font-weight:950;letter-spacing:.08em}.trend-trial-card h3{font-size:22px;margin:9px 44px 8px 0;color:#f8fafc}.trend-trial-card>p{margin:0;color:#cbd5e1;font-size:12px;line-height:1.65}.trend-trial-meter{margin:16px 0;padding:13px;border:1px solid #344054;border-radius:11px;background:#10151d}.trend-trial-meter>div:first-child{display:flex;justify-content:space-between;gap:12px;align-items:center;color:#98a2b3;font-size:10px}.trend-trial-meter>div:first-child b{color:#f8fafc;font-size:12px}.trend-trial-meter-track{height:7px;margin:9px 0 8px;border-radius:999px;background:#252b36;overflow:hidden}.trend-trial-meter-track i{display:block;height:100%;border-radius:inherit;background:linear-gradient(90deg,#2e90fa,#1570ef);transition:width .25s ease}.trend-trial-meter small{color:#98a2b3;font-size:10px}.trend-trial-upgrade{display:flex;min-height:44px;align-items:center;justify-content:center;border-radius:10px;background:linear-gradient(180deg,#facc15,#f59e0b);color:#301d00;text-decoration:none;font-weight:950;font-size:13px;box-shadow:0 7px 20px rgba(245,158,11,.22)}.trend-trial-upgrade:hover{filter:brightness(1.04)}.trend-trial-note{display:block;margin-top:10px;text-align:center;color:#667085;font-size:9px;line-height:1.45}
@media(max-width:1180px){.trend-vip-upgrade b{font-size:0}.trend-vip-upgrade b::after{content:'VIP';font-size:10px}.trend-vip-upgrade{padding:0 10px}}

/* V20.183 · Free Trial onboarding: quiet coach-marks after Connect is ready. */
.trend-free-badge{appearance:none;-webkit-appearance:none;cursor:pointer;font-family:var(--trend-font);line-height:1}.trend-free-badge:focus-visible{outline:2px solid #53b1fd;outline-offset:2px}
.trend-trial-coach[hidden]{display:none!important}.trend-trial-coach{position:fixed;inset:0;z-index:2147482500;pointer-events:none}.trend-trial-coach::before{content:"";position:absolute;inset:0;background:rgba(2,6,23,.28);backdrop-filter:blur(.6px);-webkit-backdrop-filter:blur(.6px)}
.trend-trial-coach-spotlight{position:fixed;border:2px solid #2e90fa;border-radius:11px;box-shadow:0 0 0 4px rgba(46,144,250,.16),0 0 0 9999px rgba(2,6,23,.06);transition:left .16s ease,top .16s ease,width .16s ease,height .16s ease;pointer-events:none;background:rgba(255,255,255,.015)}
.trend-trial-coach-card{position:fixed;width:min(380px,calc(100vw - 24px));padding:15px 16px 14px;border:1px solid #344054;border-radius:13px;background:#111827;color:#f8fafc;box-shadow:0 18px 46px rgba(0,0,0,.34);pointer-events:auto;font-family:var(--trend-font)}
.trend-trial-coach-top{display:flex;align-items:center;justify-content:space-between;gap:10px}.trend-trial-coach-top>span{font-size:9px;font-weight:950;letter-spacing:.09em;color:#84caff}.trend-trial-coach-top>button{width:28px;height:28px;border:0;border-radius:8px;background:transparent;color:#98a2b3;font-size:18px;cursor:pointer}.trend-trial-coach-top>button:hover{background:#1f2937;color:#fff}.trend-trial-coach-card h3{margin:5px 0 6px;font-size:16px;line-height:1.35}.trend-trial-coach-card p{margin:0;color:#cbd5e1;font-size:11px;line-height:1.55}.trend-trial-coach-limit{display:flex;align-items:center;gap:8px;margin-top:11px;padding:8px 10px;border-radius:9px;background:#0b1220;border:1px solid #253046;color:#aeb8c7;font-size:10px}.trend-trial-coach-limit>b{display:inline-flex;padding:3px 6px;border-radius:999px;background:#eff8ff;color:#175cd3;font-size:8px;letter-spacing:.06em}.trend-trial-coach-limit strong{color:#fff}.trend-trial-coach-actions{display:flex;align-items:center;justify-content:flex-end;gap:8px;margin-top:12px}.trend-trial-coach-actions button{min-height:34px;padding:0 13px;border-radius:8px;border:1px solid #344054;background:#1f2937;color:#e5e7eb;font:800 10px/1 var(--trend-font);cursor:pointer}.trend-trial-coach-actions .trend-primary{background:#1570ef;border-color:#1570ef;color:#fff}.trend-trial-coach-actions button:hover{filter:brightness(1.06)}
body.trend-trial-coaching #keywordInput,body.trend-trial-coaching #rangeButtons,body.trend-trial-coaching #runSearch{position:relative;z-index:2147482501}
@media(max-width:720px){.trend-trial-coach-card{padding:13px}.trend-trial-coach-card h3{font-size:15px}.trend-trial-coach::before{background:rgba(2,6,23,.2)}}
.trend-trial-guide-replay{width:100%;min-height:36px;margin:0 0 9px;border:1px solid #344054;border-radius:9px;background:#161d29;color:#cbd5e1;font:800 10px/1 var(--trend-font);cursor:pointer}.trend-trial-guide-replay:hover{border-color:#2e90fa;color:#fff;background:#182230}

/* V20.184 — Free Trial/draft contrast + explicit onboarding skip. */
.trend-project-item.is-local-draft{border-style:dashed!important;border-color:#3b82f6!important;background:#172033!important;color:#f8fafc!important}
.trend-project-item.is-local-draft.active{box-shadow:inset 3px 0 0 #60a5fa!important}
.trend-project-item.is-local-draft b{color:#f8fafc!important}
.trend-project-item.is-local-draft small{color:#aab7c8!important}
.trend-project-item.is-local-draft .trend-project-draft-badge{background:#dbeafe!important;color:#175cd3!important}
.trend-project-item.is-local-draft .trend-draft-save{border-color:#3b82f6!important;background:#2563eb!important;color:#fff!important}
.trend-trial-coach-top>#trendTrialCoachSkip{width:auto;min-width:64px;height:30px;padding:0 9px;border:1px solid #344054;border-radius:8px;background:#1f2937;color:#d0d5dd;font:800 10px/1 var(--trend-font)}
.trend-trial-coach-top>#trendTrialCoachSkip:hover{background:#273548;color:#fff;border-color:#475467}

/* V20.189 — Vietnamese UI copy polish + compact sidebar note editor. */
.trend-chart-actions .trend-action-label{
  font-family:"Be Vietnam Pro", "Inter", "Roboto", "Segoe UI", Arial, "Noto Sans",Tahoma, Arial,sans-serif!important;
  font-size:11px!important;
  font-weight:750!important;
  line-height:1.25!important;
  text-rendering:optimizeLegibility;
  -webkit-font-smoothing:antialiased;
}
.trend-inspector-note-editor{display:grid;gap:7px;padding:9px;border:1px solid #344054;border-radius:8px;background:#10151d}
.trend-inspector-note-label{display:grid!important;grid-template-columns:1fr!important;gap:6px!important;padding:0!important;border-bottom:0!important}
.trend-inspector-note-label>span{font-size:10px;color:#d0d5dd!important;font-weight:800!important}
.trend-inspector-note-label textarea{width:100%;min-height:78px;max-height:180px;resize:vertical;border:1px solid #3b4656;border-radius:7px;background:#0b1017;color:#f2f4f7;padding:8px 9px;font:600 11px/1.45 "Be Vietnam Pro", "Inter", "Roboto", "Segoe UI", Arial, "Noto Sans",Tahoma, Arial,sans-serif;outline:none}
.trend-inspector-note-label textarea:focus{border-color:#528bff;box-shadow:0 0 0 2px rgba(82,139,255,.14)}
.trend-inspector-note-label textarea::placeholder{color:#667085;font-weight:500}
.trend-inspector-note-actions{display:flex;justify-content:flex-end;gap:6px}
.trend-inspector-note-actions button{height:30px;border-radius:7px;padding:0 10px;font-size:10px;font-weight:800;cursor:pointer}
.trend-inspector-note-cancel{border:1px solid #344054;background:#1d2430;color:#d0d5dd}
.trend-inspector-note-save{border:1px solid #2e6de6;background:#2563eb;color:#fff}
.trend-inspector-note-cancel:hover{background:#263242;color:#fff}.trend-inspector-note-save:hover{filter:brightness(1.08)}
@media(max-width:1500px){.trend-chart-actions .trend-action-label{font-size:10.5px!important}}
@media(max-width:1120px){.trend-chart-actions .trend-action-label{display:none!important}.trend-chart-actions #backtestToggle .trend-action-label,.trend-chart-actions #backtestExit .trend-action-label,.trend-chart-actions #saveProject .trend-action-label{display:inline-block!important}}


/* V20.190 — retractable workspace panels and fullscreen-first control order. */
.trend-main{position:relative}
.trend-right-panel{position:relative}
.trend-panel-close{
  position:sticky;top:0;z-index:14;float:right;width:28px;height:28px;margin:0 0 6px 6px;
  border:1px solid #353d49;border-radius:7px;background:#20262f;color:#aab4c2;cursor:pointer;
  font:700 16px/1 "Be Vietnam Pro", "Inter", "Roboto", "Segoe UI", Arial, Tahoma, Arial,sans-serif
}
.trend-panel-close:hover{background:#29313d;color:#fff}
.trend-panel-reopen{
  display:none;position:absolute;z-index:80;right:0;top:50%;transform:translateY(-50%);
  width:27px;height:56px;border:1px solid #334155;border-right:0;border-radius:10px 0 0 10px;
  background:#17202b;color:#bfdbfe;box-shadow:-6px 0 18px rgba(0,0,0,.22);cursor:pointer;font:800 22px/1 sans-serif
}
.trend-panel-reopen:hover{background:#213044;color:#fff}
body.trend-panel-collapsed .trend-panel-reopen,
body.trend-fs-panel-collapsed .trend-panel-reopen{display:grid;place-items:center}
body.trend-fs-panel-collapsed .trend-main{grid-template-columns:minmax(0,1fr)!important}
body.trend-fs-panel-collapsed .trend-right-panel{display:none!important}

/* “Dữ liệu mở rộng” thu xuống thành một thanh neo ở đáy thay vì biến mất hoàn toàn. */
.trend-insights{transition:flex-basis .16s ease,max-height .16s ease,min-height .16s ease}
.trend-insights.is-collapsed,
body.trend-fs-insights-collapsed .trend-insights{
  flex:0 0 38px!important;min-height:38px!important;max-height:38px!important;overflow:hidden!important
}
.trend-insights.is-collapsed .trend-insights-grid,
.trend-insights.is-collapsed .trend-insight-warning,
body.trend-fs-insights-collapsed .trend-insights .trend-insights-grid,
body.trend-fs-insights-collapsed .trend-insights .trend-insight-warning{display:none!important}
.trend-insights.is-collapsed .trend-insights-head,
body.trend-fs-insights-collapsed .trend-insights .trend-insights-head{
  min-height:38px!important;height:38px!important;border-bottom:0!important;padding-top:4px!important;padding-bottom:4px!important;cursor:pointer
}
.trend-insights.is-collapsed .trend-insights-title small,
.trend-insights.is-collapsed .trend-insights-head-actions,
body.trend-fs-insights-collapsed .trend-insights .trend-insights-title small,
body.trend-fs-insights-collapsed .trend-insights .trend-insights-head-actions{display:none!important}
.trend-insights.is-collapsed .trend-insights-title,
body.trend-fs-insights-collapsed .trend-insights .trend-insights-title{min-width:0!important}
.trend-insights.is-collapsed .trend-insights-title b::after,
body.trend-fs-insights-collapsed .trend-insights .trend-insights-title b::after{content:" · nhấn ↑ để mở";color:#64748b;font-weight:600}
.trend-insights-close{flex:0 0 auto}

/* Fullscreen: show both auxiliary panels briefly, then retract them to preserve the full chart view. */
body.trend-fullscreen-workspace .trend-panel-reopen{position:fixed;right:0;top:50%;z-index:10030}
body.trend-fullscreen-workspace.trend-fs-insights-collapsed .trend-insights{box-shadow:0 -8px 24px rgba(0,0,0,.18)}
body.trend-fullscreen-workspace .trend-chart-actions #fullscreenChart,
body.trend-fullscreen-workspace .trend-chart-actions #backtestToggle,
body.trend-fullscreen-workspace .trend-chart-actions #backtestExit,
body.trend-fullscreen-workspace .trend-chart-actions #autoScaleY{position:static!important;right:auto!important;box-shadow:none!important}
body.trend-fullscreen-workspace .trend-chart-actions #fullscreenChart{order:-30!important;background:#2563eb!important;border-color:#3b82f6!important;color:#fff!important}
body.trend-fullscreen-workspace .trend-chart-actions #backtestToggle{order:-20!important}
body.trend-fullscreen-workspace .trend-chart-actions #backtestExit{order:-19!important}
body.trend-fullscreen-workspace .trend-chart-actions #autoScaleY{order:-10!important}
body.trend-fullscreen-workspace .trend-chart-toolbar .trend-chart-actions{justify-content:flex-start!important}

/* Normal mode uses the same first three primary controls: Toàn màn hình → Backtest → Auto Y. */
.trend-chart-actions #fullscreenChart{order:-30}
.trend-chart-actions #backtestToggle{order:-20}
.trend-chart-actions #backtestExit{order:-19}
.trend-chart-actions #autoScaleY{order:-10}

@media(max-width:900px){
  .trend-panel-close{position:sticky!important;top:0!important}
  .trend-panel-reopen{position:fixed;right:0;top:50%;z-index:2060}
}
@media(max-width:900px){
  body.trend-fullscreen-workspace:not(.trend-fs-panel-collapsed) .trend-right-panel{
    display:block!important;position:fixed!important;z-index:10020!important;top:0!important;right:0!important;bottom:0!important;
    width:min(86vw,340px)!important;background:#12151a!important;box-shadow:-18px 0 50px rgba(0,0,0,.35)!important
  }
}


/* V20.191 — single-direction toggles + fullscreen action beside Save Keyword. */
.trend-main{--trend-panel-width:258px}
/* One Insights control stays at the exact right edge; only ↓/↑ changes. */
.trend-insights-close{margin-left:auto!important;display:grid!important;place-items:center!important;flex:0 0 30px!important;width:30px!important;height:30px!important;padding:0!important;font-size:0!important}
.trend-insights-close{margin-left:auto!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;flex:0 0 32px!important;width:32px!important;height:30px!important;padding:0!important;border-radius:7px!important;border:1px solid rgba(252,213,53,0.45)!important;background:linear-gradient(145deg,#1e2530,#141922)!important;color:#FCD535!important;font-size:0!important;box-shadow:0 2px 8px rgba(0,0,0,0.35)!important;cursor:pointer!important;transition:all .15s ease!important}.trend-insights-close:hover{background:#263040!important;border-color:#FCD535!important;color:#FFFFFF!important;transform:translateY(-1px)!important}.trend-insights-close>span{display:inline-flex!important;align-items:center!important;justify-content:center!important;font-family:"Be Vietnam Pro","Inter","Roboto","Segoe UI",Arial,sans-serif!important;font-size:17px!important;font-weight:900!important;line-height:1!important;color:inherit!important;pointer-events:none!important}
.trend-insights.is-collapsed .trend-insights-head,
body.trend-fs-insights-collapsed .trend-insights .trend-insights-head{width:100%!important}
.trend-insights.is-collapsed .trend-insights-title,
body.trend-fs-insights-collapsed .trend-insights .trend-insights-title{flex:1 1 auto!important}

/* One sidebar edge control is always present. Open: › collapses right. Closed: ‹ reopens left. */
.trend-panel-reopen{display:grid!important;place-items:center!important;right:var(--trend-panel-width)!important;transition:right .16s ease,background .12s ease,color .12s ease!important}
body.trend-panel-collapsed .trend-panel-reopen,
body.trend-fs-panel-collapsed .trend-panel-reopen{right:0!important}
body.trend-fullscreen-workspace:not(.trend-fs-panel-collapsed) .trend-panel-reopen{right:var(--trend-panel-width)!important}
body.trend-fullscreen-workspace.trend-fs-panel-collapsed .trend-panel-reopen{right:0!important}
.trend-panel-reopen>span{display:block;pointer-events:none}

/* Keep Backtest/Auto Y in the left action group, but pin Fullscreen immediately after Save Keyword at the far right. */
.trend-chart-actions #backtestToggle{order:-20!important}
.trend-chart-actions #backtestExit{order:-19!important}
.trend-chart-actions #autoScaleY{order:-10!important}
.trend-chart-actions #saveProject{order:100!important}
.trend-chart-actions #fullscreenChart{order:101!important}
body.trend-fullscreen-workspace .trend-chart-actions #saveProject{order:100!important}
body.trend-fullscreen-workspace .trend-chart-actions #fullscreenChart{order:101!important}

@media(max-width:1260px) and (min-width:1001px){.trend-main{--trend-panel-width:235px}}
@media(max-width:1000px){
  .trend-panel-reopen{position:fixed!important;right:0!important;top:50%!important;z-index:10030!important}
  .trend-mobile-panel-open .trend-panel-reopen{right:min(86vw,340px)!important}
  body.trend-fullscreen-workspace:not(.trend-fs-panel-collapsed) .trend-panel-reopen{right:min(86vw,340px)!important}
  body.trend-fullscreen-workspace.trend-fs-panel-collapsed .trend-panel-reopen{right:0!important}
}


/* V20.192 — fixed normal sidebar; edge toggle only in Fullscreen; live note editing. */
body:not(.trend-fullscreen-workspace) .trend-panel-reopen{display:none!important}
body:not(.trend-fullscreen-workspace){--trend-panel-width:258px}
@media(min-width:1001px){
  body:not(.trend-fullscreen-workspace) .trend-main{grid-template-columns:minmax(0,1fr) var(--trend-panel-width)!important}
  body:not(.trend-fullscreen-workspace) .trend-right-panel{display:block!important}
}
body.trend-fullscreen-workspace .trend-panel-reopen{display:grid!important;place-items:center!important}
body.trend-fullscreen-workspace:not(.trend-fs-panel-collapsed) .trend-panel-reopen{right:var(--trend-panel-width)!important}
body.trend-fullscreen-workspace.trend-fs-panel-collapsed .trend-panel-reopen{right:0!important}
.trend-inspector-note-live{gap:6px!important}
.trend-inspector-note-live .trend-inspector-note-label textarea{min-height:112px;resize:vertical}
.trend-inspector-note-live-hint{display:block;margin:0!important;color:#7f8a9c!important;font-size:9px!important;line-height:1.35}
.trend-inspector-note-live .trend-inspector-note-actions{display:none!important}


/* V20.193 — compact bottom-edge toggle for collapsed Insights, mirroring the fullscreen sidebar tab. */
.trend-insights.is-collapsed,
body.trend-fs-insights-collapsed .trend-insights{
  flex:0 0 28px!important;min-height:28px!important;max-height:28px!important;
  overflow:visible!important;border-top:0!important;background:transparent!important;box-shadow:none!important
}
.trend-insights.is-collapsed .trend-insights-head,
body.trend-fs-insights-collapsed .trend-insights .trend-insights-head{
  min-height:28px!important;height:28px!important;width:100%!important;padding:0!important;
  border:0!important;background:transparent!important;display:flex!important;align-items:flex-end!important;
  justify-content:flex-end!important;overflow:visible!important;cursor:default!important
}
.trend-insights.is-collapsed .trend-insights-title,
.trend-insights.is-collapsed .trend-insights-head-actions,
body.trend-fs-insights-collapsed .trend-insights .trend-insights-title,
body.trend-fs-insights-collapsed .trend-insights .trend-insights-head-actions{display:none!important}
.trend-insights.is-collapsed .trend-insights-close,
body.trend-fs-insights-collapsed .trend-insights .trend-insights-close{
  margin:0!important;flex:0 0 56px!important;width:56px!important;height:28px!important;padding:0!important;
  border:1px solid #334155!important;border-bottom:0!important;border-radius:10px 10px 0 0!important;
  background:#17202b!important;color:#bfdbfe!important;box-shadow:0 -6px 18px rgba(0,0,0,.22)!important;
  display:grid!important;place-items:center!important;z-index:90!important
}
.trend-insights.is-collapsed .trend-insights-close:hover,
body.trend-fs-insights-collapsed .trend-insights .trend-insights-close:hover{background:#213044!important;color:#fff!important}
.trend-insights.is-collapsed .trend-insights-close>span,
body.trend-fs-insights-collapsed .trend-insights .trend-insights-close>span{font-size:22px!important;line-height:1!important}


/* V20.194 — collapsed Insights becomes a true floating bottom-edge tab; no text strip underneath. */
.trend-insights.is-collapsed,
body.trend-fs-insights-collapsed .trend-insights{
  flex:0 0 0!important;min-height:0!important;max-height:0!important;height:0!important;
  overflow:visible!important;border:0!important;background:transparent!important;box-shadow:none!important;
  position:relative!important
}
.trend-insights.is-collapsed .trend-insights-head,
body.trend-fs-insights-collapsed .trend-insights .trend-insights-head{
  min-height:0!important;height:0!important;width:100%!important;padding:0!important;margin:0!important;
  border:0!important;background:transparent!important;display:block!important;overflow:visible!important;cursor:default!important
}
.trend-insights.is-collapsed .trend-insights-close,
body.trend-fs-insights-collapsed .trend-insights .trend-insights-close{
  position:absolute!important;right:10px!important;top:0!important;transform:translateY(-100%)!important;
  margin:0!important;width:50px!important;height:28px!important;min-width:50px!important;flex:none!important;
  border:1px solid #334155!important;border-bottom:0!important;border-radius:10px 10px 0 0!important;
  background:#17202b!important;color:#bfdbfe!important;box-shadow:0 -6px 18px rgba(0,0,0,.22)!important;
  display:grid!important;place-items:center!important;z-index:140!important
}
.trend-insights.is-collapsed .trend-insights-close:hover,
body.trend-fs-insights-collapsed .trend-insights .trend-insights-close:hover{background:#213044!important;color:#fff!important}
.trend-insights.is-collapsed .trend-insights-close>span,
body.trend-fs-insights-collapsed .trend-insights .trend-insights-close>span{font-size:20px!important;line-height:1!important}
/* When Insights is collapsed in normal mode, keep the footer quiet so the edge tab is never buried in shortcut text. */
body.trend-insights-collapsed:not(.trend-fullscreen-workspace) .trend-statusbar{padding-right:72px!important}
body.trend-insights-collapsed:not(.trend-fullscreen-workspace) .trend-statusbar>span:last-child{display:none!important}
/* Fullscreen is a chart-first view: the verbose footer is redundant and stole vertical space from the chart. */
body.trend-fullscreen-workspace .trend-statusbar{display:none!important}


/* V20.195 — right sidebar edge toggle is available in the normal chart too.
   Default remains open; one neck tab collapses/reopens the panel by reversing ›/‹. */
@media(min-width:1001px){
  body:not(.trend-fullscreen-workspace) .trend-main{position:relative!important}
  body:not(.trend-fullscreen-workspace) .trend-panel-reopen{
    display:grid!important;place-items:center!important;position:absolute!important;top:50%!important;
    right:var(--trend-panel-width)!important;transform:translateY(-50%)!important;z-index:120!important
  }
  body:not(.trend-fullscreen-workspace).trend-panel-collapsed .trend-panel-reopen{right:0!important}
  body:not(.trend-fullscreen-workspace).trend-panel-collapsed .trend-main{grid-template-columns:minmax(0,1fr)!important}
  body:not(.trend-fullscreen-workspace).trend-panel-collapsed .trend-right-panel{display:none!important}
}

/* V20.196 — extension installer version visibility. */
.trend-bridge-title-row{display:flex;align-items:center;gap:12px;flex-wrap:wrap}
.trend-bridge-title-row h2{margin:0}
.trend-bridge-version-badge{display:inline-flex;align-items:center;min-height:26px;padding:4px 10px;border:1px solid #bfdbfe;border-radius:999px;background:#eff6ff;color:#1d4ed8;font-size:12px;font-weight:800;letter-spacing:.01em;white-space:nowrap}
@media(max-width:640px){.trend-bridge-title-row{align-items:flex-start;flex-direction:column;gap:6px}.trend-bridge-version-badge{font-size:11px}}

/* v20.229: explicit extension-version update UX. */
.trend-bridge-version-alert{display:flex;align-items:center;gap:8px;margin:10px 0 2px;padding:9px 11px;border:1px solid #fed7aa;border-radius:9px;background:#fff7ed;color:#9a3412;font-size:11px;line-height:1.4}
.trend-bridge-version-alert[hidden]{display:none!important}.trend-bridge-version-alert b{white-space:nowrap}.trend-bridge-version-alert span{color:#7c2d12}
.trend-bridge-gate[data-state="outdated"] .trend-bridge-version-badge{border-color:#fdba74;background:#fff7ed;color:#c2410c}
.trend-bridge-badge.outdated{font-weight:900!important}.trend-bridge-install:not([hidden]){font-weight:900}
@media(max-width:640px){.trend-bridge-version-alert{align-items:flex-start;flex-direction:column;gap:3px}.trend-bridge-version-alert b{white-space:normal}}

/* v20.234 — Địa Điểm Có Lợi lives next to the main Bí Mật Nhà Cái menu; toolbar copy is compact fallback */
.trend-account-nav .astrogeo-nav-open{border:0;background:transparent;color:#8f9baa;font:700 11px/1 "Be Vietnam Pro", "Inter", "Roboto", "Segoe UI", Arial, Tahoma, Arial,sans-serif;padding:7px 8px;border-radius:6px;cursor:pointer;display:inline-flex;align-items:center;gap:4px}.trend-account-nav .astrogeo-nav-open:hover{background:#242a33;color:#fff}.trend-account-nav .astrogeo-nav-open em{font-style:normal;font-size:8px;font-weight:900;color:#c4b5fd;background:#3b2270;border-radius:999px;padding:2px 5px}.astrogeo-toolbar-open{display:none!important}@media(max-width:1260px){.astrogeo-toolbar-open{display:inline-flex!important}}

/* V20.347: private permalink action, no label overflow */
.trend-project-item{min-width:0;overflow-wrap:anywhere}
.trend-project-row,.trend-project-title{min-width:0;overflow-wrap:anywhere}
.trend-project-permalink{border:1px solid #dbeafe;background:#eff6ff;color:#1d4ed8;border-radius:9px;min-width:32px;height:30px;margin:3px 4px;padding:2px 7px;cursor:pointer;font-size:13px}
.trend-project-permalink:hover,.trend-project-permalink:focus-visible{background:#dbeafe;outline:2px solid #93c5fd;outline-offset:1px}

/* V20.348 — discreet permalink icon, aligned with the existing overflow menu. */
.trend-project-item{position:relative;padding-right:32px!important}
.trend-project-permalink{position:absolute!important;right:7px;bottom:7px;display:grid!important;place-items:center!important;width:24px!important;height:24px!important;min-width:24px!important;margin:0!important;padding:4px!important;background:transparent!important;border:1px solid transparent!important;border-radius:7px!important;color:#8493ab!important;box-shadow:none!important;opacity:.58;transition:opacity .15s,color .15s,background .15s;z-index:1}
.trend-project-permalink svg{width:15px;height:15px;display:block;pointer-events:none}
.trend-project-item:hover .trend-project-permalink,.trend-project-permalink:focus-visible{opacity:1;color:#93c5fd!important;background:#202e42!important;border-color:#354864!important}
.trend-project-permalink.is-copied{opacity:1;color:#4ade80!important}
.trend-project-permalink:disabled{cursor:wait;opacity:.35}
@media (hover:none){.trend-project-permalink{opacity:.8;width:28px!important;height:28px!important;right:5px;bottom:5px}}

/* V20.349: URL lives in the browser; remove the redundant link action. */
.trend-project-permalink{display:none!important}
.trend-project-item{padding-right:32px!important}
.trend-project-more{z-index:5}

/* V20.351: compact copy action in its own lower-right lane, away from ⋯ menu */
.trend-project-item{padding-right:38px!important;min-height:52px!important}
.trend-project-copy-mini{position:absolute!important;right:8px!important;bottom:6px!important;top:auto!important;z-index:2!important;width:24px;height:24px;padding:3px;display:grid;place-items:center;border:0;border-radius:7px;background:transparent;color:#8194ac;opacity:.72;cursor:pointer;transition:background .15s,color .15s,opacity .15s}
.trend-project-copy-mini svg{display:block;pointer-events:none}
.trend-project-copy-mini:hover,.trend-project-copy-mini:focus-visible{opacity:1;background:#2d3a4b;color:#bfdbfe;outline:1px solid #425b7d}
.trend-project-copy-mini.is-copied{color:#4ade80;opacity:1}
.trend-project-copy-mini:disabled{cursor:wait}
.trend-project-more{top:6px!important;right:6px!important;bottom:auto!important;z-index:3!important}
#keywordSidebarDefault.is-selecting .trend-project-copy-mini,.trend-project-item.is-renaming>.trend-project-copy-mini{display:none!important}

/* V20.352: two independent actions in a single top row, no hover overlap. */
.trend-project-item{padding-right:69px!important;min-height:55px!important}
.trend-project-more{position:absolute!important;top:6px!important;right:6px!important;bottom:auto!important;width:26px!important;height:26px!important;z-index:4!important}
.trend-project-copy-mini{position:absolute!important;top:7px!important;right:38px!important;bottom:auto!important;width:24px!important;height:24px!important;z-index:3!important;opacity:.8!important}
.trend-project-item .trend-project-title,.trend-project-item small{display:block;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.trend-project-more:hover,.trend-project-copy-mini:hover{transform:none!important}

/* V20.355 Mobile/iPad premium, saved-data-first workspace (no Google extension prompt). */
.msc-mobile-workspace-nav,.msc-mobile-viewer-hint{display:none}
@media(max-width:1100px){
 .msc-mobile-workspace-nav{display:flex;align-items:center;gap:7px;padding:10px 11px;background:#111827;overflow-x:auto;scrollbar-width:none;position:relative;z-index:30;white-space:nowrap}
 .msc-mobile-workspace-nav::-webkit-scrollbar{display:none}
 .msc-mobile-workspace-nav button,.msc-mobile-workspace-nav a{appearance:none;flex:0 0 auto;min-height:42px;display:inline-flex;align-items:center;justify-content:center;gap:4px;padding:10px 13px;border:1px solid #364152;border-radius:11px;background:#1e293b;color:#e2e8f0!important;text-decoration:none;font:700 12px/1.3 system-ui,-apple-system,"Be Vietnam Pro", "Inter", "Roboto", "Segoe UI", Arial, sans-serif;cursor:pointer}
 .msc-mobile-workspace-nav .msc-mobile-keyword-switch{background:#2563eb;border-color:#60a5fa;color:#fff!important}
 .msc-mobile-viewer-hint:not([hidden]){display:block;padding:9px 13px;margin:0;background:#eaf3ff;color:#17427c;border-bottom:1px solid #bfdbfe;font:600 12px/1.5 system-ui,-apple-system,"Be Vietnam Pro", "Inter", "Roboto", "Segoe UI", Arial, sans-serif}
 .trend-mobile-readonly #clientBridgeBadge,.trend-mobile-readonly #clientBridgeInstall,.trend-mobile-readonly #bridgeGate,.trend-mobile-readonly #bridgeGuide,.trend-mobile-readonly #trendHealthChip{display:none!important}
 .trend-topbar{grid-template-columns:auto minmax(0,1fr)!important;gap:8px!important}
 .trend-account-nav{display:none!important}
 .trend-brand b{display:inline!important;font-size:12px!important}
 .trend-searchbar{grid-column:1/-1!important;grid-template-columns:minmax(0,1fr) minmax(120px,.5fr)!important;max-width:100%!important;gap:8px!important}
 .trend-searchbar #keywordInput,.trend-searchbar .trend-picker-btn{min-height:42px;font-size:14px!important}
 .trend-searchbar #runSearch{min-height:42px}
 .trend-main{display:block!important;min-width:0!important}
 .trend-right-panel{display:none!important}
 .trend-mobile-panel-open .trend-right-panel{display:block!important;position:fixed!important;top:0!important;right:0!important;bottom:0!important;left:auto!important;width:min(91vw,390px)!important;max-width:100%!important;z-index:3100!important;background:#111827!important;overflow:auto!important;overscroll-behavior:contain;padding:22px 12px 28px!important;box-shadow:-18px 0 45px rgba(2,6,23,.45)!important}
 .msc-mobile-backdrop:not([hidden]){position:fixed;inset:0;z-index:3090;background:rgba(2,6,23,.62);display:block}
 .trend-right-panel #projectViewport{max-height:calc(100dvh - 160px)!important;overflow-y:auto!important}
 .trend-project-item{min-height:56px!important}
 .trend-project-row{min-height:50px!important}
 #projectSearch{min-height:42px!important;font-size:14px!important}
 .trend-floating-tools{max-width:calc(100vw - 20px)!important}
 .trend-bridge-locked{overflow:auto!important}
}
@media(min-width:1101px) and (pointer:coarse){
 .msc-mobile-workspace-nav{display:flex;align-items:center;gap:8px;padding:8px 12px;background:#111827;overflow-x:auto}
 .msc-mobile-workspace-nav button,.msc-mobile-workspace-nav a{min-height:44px;padding:10px 15px;border:1px solid #374151;border-radius:10px;background:#1e293b;color:#fff;text-decoration:none;font:700 13px system-ui}
 .msc-mobile-workspace-nav .msc-mobile-keyword-switch{background:#2563eb}
 .msc-mobile-viewer-hint:not([hidden]){display:block;margin:0;padding:8px 12px;background:#eff6ff;color:#1e40af;font-size:12px}
 .trend-mobile-readonly #bridgeGate,.trend-mobile-readonly #bridgeGuide,.trend-mobile-readonly #clientBridgeInstall,.trend-mobile-readonly #trendHealthChip{display:none!important}
 .msc-mobile-backdrop:not([hidden]){position:fixed;inset:0;z-index:3090;background:rgba(0,0,0,.5)}
 .trend-mobile-panel-open .trend-right-panel{display:block!important;position:fixed!important;top:0;right:0;bottom:0;width:min(430px,90vw)!important;max-width:none!important;z-index:3100!important;background:#111827;overflow:auto!important;padding:20px!important}
}
@media(max-width:600px){
 .trend-topbar{padding:8px!important}
 .trend-topbar .trend-brand{font-size:12px!important}
 .trend-chart-toolbar{padding:6px!important}
 .trend-project-item{font-size:12px!important}
 .trend-chart-actions{gap:6px!important}
 .trend-chart-actions button{min-height:40px!important}
}

/* v20.368: visually distinguish a saved Keyword while its exact snapshot is loading. */
#projectList .trend-project-item.is-opening{outline:1px solid #60a5fa;outline-offset:-1px}
#projectList .trend-project-item.is-opening .trend-project-title::after{content:' · Đang mở';font-size:9px;font-weight:600;color:#93c5fd}

/* V20.370 reliable fullscreen exit independent of hidden toolbar on iPad */
#trendIpadExitFullscreen{position:fixed;top:max(9px,env(safe-area-inset-top));right:max(12px,env(safe-area-inset-right));z-index:2147482400;background:#101827;color:#fff;border:1px solid #94a3b8;border-radius:10px;padding:9px 12px;min-height:42px;font:750 12px/1.2 system-ui,sans-serif;box-shadow:0 6px 22px #0005;cursor:pointer;touch-action:manipulation}
#trendIpadExitFullscreen[hidden]{display:none!important}
@media (max-width:1100px){#trendIpadExitFullscreen{font-size:13px}}

/* V20.371 — user-positioned drawing toolbar wins over old fullscreen top:12px lock */
body.trend-fullscreen-workspace .trend-floating-tools.trend-toolbar-dragged:not(.msc-tools-mobile){
  left:var(--trend-toolbar-left,12px)!important;
  top:var(--trend-toolbar-top,12px)!important;
  right:auto!important;
  bottom:auto!important;
}
/* Native fullscreen on iPad may exit on plot gestures. Touch uses CSS immersive
   workspace and keeps all chart pointer/canvas events inside the page. */
body.trend-pseudo-fullscreen.trend-fullscreen-workspace .trend-main{height:100dvh;min-height:100dvh}
body.trend-pseudo-fullscreen.trend-fullscreen-workspace .trend-chart-column{height:100dvh;min-height:0}
body.trend-pseudo-fullscreen.trend-fullscreen-workspace .trend-floating-tools.msc-tools-mobile.msc-mobile-floating{position:fixed!important;right:auto!important;bottom:auto!important;inset:auto!important;left:var(--trend-mobile-toolbar-left,12px)!important;top:var(--trend-mobile-toolbar-top,60px)!important;z-index:10095!important;touch-action:pan-x}
body.trend-pseudo-fullscreen.trend-fullscreen-workspace #trendIpadExitFullscreen{display:inline-flex;align-items:center;justify-content:center;touch-action:manipulation}

/* V20.372 compact iPad exit and accessible delete-all outside the scrollable tools */
#trendIpadExitFullscreen{padding:0!important;min-height:36px!important;width:36px!important;height:36px!important;border-radius:9px!important;font-size:20px!important;line-height:1!important;z-index:10092!important}
.trend-mobile-clear-all{display:none;flex:none;align-items:center;justify-content:center;border:1px solid #fecaca;border-radius:8px;background:#fff1f2;color:#b42318;font-size:17px;cursor:pointer}
@media(max-width:1100px),(pointer:coarse){
 .trend-floating-tools .trend-mobile-clear-all{display:inline-flex!important;flex:0 0 40px!important;min-width:40px!important;width:40px!important;height:40px!important;position:sticky!important;left:92px!important;z-index:3!important;touch-action:manipulation!important}
 .trend-floating-tools .trend-drag-dots{flex:0 0 42px!important;min-width:42px!important;position:sticky!important;left:0!important;z-index:5!important;background:#f8fafc!important;touch-action:none!important}
 .trend-floating-tools #collapseDrawingToolbar{flex:0 0 40px!important;min-width:40px!important;position:sticky!important;left:42px!important;z-index:4!important;background:#f8fafc!important}
 .trend-floating-tools #drawingToolbar{min-width:0!important;overflow-x:auto!important;scrollbar-width:thin!important;overscroll-behavior-x:contain!important;touch-action:pan-x!important}
 .trend-floating-tools{overflow:visible!important}
 .trend-floating-tools.is-collapsed .trend-mobile-clear-all{display:inline-flex!important}
}
#seasonalityToggle[data-indicator="on"]{border-color:#0d9488!important;color:#99f6e4!important;background:#134e4a!important}
#seasonalityToggle[data-indicator="off"]{opacity:.92}

/* V20.377 — compact, non-wrapping save action for unsaved draft card */
#projectList .trend-project-item.is-local-draft .trend-project-row{display:flex!important;align-items:center!important;flex-wrap:nowrap!important;gap:5px!important;min-width:0!important;}
#projectList .trend-project-item.is-local-draft .trend-project-row>span{display:flex;align-items:center;gap:5px;flex:1 1 auto;min-width:0;overflow:hidden;}
#projectList .trend-project-item.is-local-draft .trend-project-row>span>b{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1 1 auto;max-width:100%;}
#projectList .trend-project-item.is-local-draft .trend-project-draft-badge{display:inline-flex;flex:0 0 auto;align-items:center;justify-content:center;white-space:nowrap;font-size:9px!important;line-height:1!important;padding:4px 6px!important;}
#projectList .trend-project-item.is-local-draft .trend-draft-save{display:grid!important;place-items:center!important;flex:0 0 32px!important;width:32px!important;min-width:32px!important;max-width:32px!important;height:32px!important;padding:0!important;line-height:1!important;white-space:nowrap!important;word-break:keep-all!important;overflow:hidden!important;border-radius:8px!important;}
#projectList .trend-project-item.is-local-draft .trend-draft-save svg{display:block;width:16px;height:16px;pointer-events:none;}
#projectList .trend-project-item.is-local-draft{padding-right:9px!important;}
@media(pointer:coarse){#projectList .trend-project-item.is-local-draft .trend-draft-save{flex-basis:38px!important;width:38px!important;min-width:38px!important;max-width:38px!important;height:38px!important;}}

/* v20.401: clear, actionable empty state after a new keyword has no valid data. */
.trend-empty-chart-state{position:absolute;z-index:23;inset:58px 15px 48px;display:flex;justify-content:center;align-items:center;pointer-events:none;}
.trend-empty-chart-state[hidden]{display:none!important;}
.trend-empty-chart-card{pointer-events:auto;width:min(410px,calc(100vw - 45px));background:rgba(255,255,255,.97);border:1px solid #b8c7d9;box-shadow:0 12px 38px rgba(15,23,42,.13);padding:17px 19px;border-radius:13px;color:#344054;text-align:center;line-height:1.6;}
.trend-empty-chart-card strong{display:block;font-size:15px;color:#101828;}
.trend-empty-chart-card p{font-size:12px;margin:9px 0 12px;overflow-wrap:anywhere;}
.trend-empty-chart-card button{background:#175cd3;color:white;border:0;border-radius:8px;padding:10px 12px;min-height:40px;font-weight:700;cursor:pointer;}
.trend-empty-chart-card button:disabled{opacity:.5}.trend-empty-chart-card small{display:block;font-size:11px;margin-top:9px;color:#667085;}
@media(max-width:760px){.trend-empty-chart-state{inset:70px 10px 32px}.trend-empty-chart-card{padding:14px;}.trend-empty-chart-card button{min-height:44px;}}

/* v20.401: lightweight, observed-only trend reading. */
.trend-quick-read{margin:7px 8px 10px;padding:11px 13px;border:1px solid #cfe0eb;border-radius:9px;background:#f5faff;color:#344054;line-height:1.5;}
.trend-quick-read[hidden]{display:none!important}.trend-quick-read-head{display:flex;justify-content:space-between;align-items:center;gap:10px;flex-wrap:wrap}.trend-quick-read-head strong{font-size:12px;color:#155e75}.trend-quick-read-head small{font-size:10px;color:#667085}.trend-quick-read-list{display:grid;gap:5px;padding:6px 0}.trend-quick-read-item{font-size:12px;margin:0}.trend-quick-read-item b{color:#101828}.trend-quick-read-note{color:#667085;font-size:10px;}
@media(max-width:700px){.trend-quick-read{margin:7px 6px;padding:10px}.trend-quick-read-item{font-size:13px}}

/* v20.431: usable scrolling and expandable insight cards while chart zoom remains isolated. */
.trend-insights{min-height:220px;max-height:42vh;overflow:hidden}
.trend-insights.is-expanded:not(.is-collapsed){flex:0 0 min(58vh,620px)!important;min-height:min(58vh,620px)!important;max-height:min(58vh,620px)!important}
.trend-insights:not(.is-collapsed) .trend-insights-grid{overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin}
.trend-insight-list{overflow-y:auto!important;overscroll-behavior:contain!important;touch-action:pan-y;scrollbar-gutter:stable}
.trend-insight-feedback{flex:0 0 auto;margin:5px 10px 0;padding:6px 9px;border:1px solid #334155;border-radius:7px;background:#1b2636;color:#cbd5e1;font-size:10px;line-height:1.45}
.trend-insight-feedback[hidden]{display:none}
.trend-insight-expand{height:28px;padding:0 9px;border:1px solid #3b4c60;border-radius:7px;background:#1a2634;color:#cbd5e1;font-size:10px;font-weight:700;cursor:pointer}
.trend-insight-expand:hover{background:#27384a}
.trend-insights.is-collapsed .trend-insight-feedback,body.trend-fs-insights-collapsed .trend-insight-feedback{display:none!important}
@media(max-height:750px){.trend-insights{min-height:165px;max-height:42vh}.trend-insights.is-expanded:not(.is-collapsed){flex-basis:min(55vh,420px)!important;min-height:min(55vh,420px)!important;max-height:min(55vh,420px)!important}}
@media(max-width:1080px){.trend-insights{min-height:180px;max-height:42vh}.trend-insight-expand{min-width:44px;height:36px;font-size:10px}.trend-insights.is-expanded:not(.is-collapsed){flex-basis:58vh!important;min-height:58vh!important;max-height:58vh!important}.trend-insight-list{min-height:120px}}

.trend-insight-state[data-state='idle']{background:#252f3a;color:#98a2b3}

/* v20.437: compact informational chip on intentional touch of a cycle. */
.trend-touch-cycle-info{position:fixed;z-index:2147480012;box-sizing:border-box;border:1px solid #b8c6d8;border-radius:10px;background:#fff;color:#1f2937;padding:9px 11px;box-shadow:0 4px 14px rgba(15,23,42,.14);font-size:12px;line-height:1.4;pointer-events:none}
.trend-touch-cycle-info b{display:inline-block;max-width:calc(100% - 35px);overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
.trend-touch-cycle-info button{float:right;pointer-events:auto;border:0;border-radius:6px;background:#f1f5f9;min-width:27px;min-height:27px;font-size:17px;color:#334155}
.trend-touch-cycle-info span{display:block;margin-top:4px;color:#475569}

/* v20.446 — source-backed solar milestone on iPad/iPhone, with deliberate click/tap. */
.trend-touch-cycle-info.trend-touch-solar-milestone{pointer-events:auto;max-height:min(58vh,390px);overflow-y:auto;overflow-wrap:anywhere;white-space:normal;line-height:1.52}
.trend-touch-cycle-info.trend-touch-solar-milestone b{max-width:100%;white-space:normal;overflow:visible}
.trend-touch-cycle-info.trend-touch-solar-milestone span{font-size:11px;line-height:1.6}
.trend-touch-cycle-info.trend-touch-solar-milestone button{position:sticky;top:0;float:right;z-index:1;min-width:34px;min-height:34px}

/* v20.471: compact RR date option; never reserve space when disabled. */
#trendToolStyleMenu [data-rr-dates-row][hidden],#drawingContextMenu [data-drawing-action="rrdates"][hidden]{display:none!important}
#trendToolStyleMenu .rr-date-pref{display:flex;align-items:center;justify-content:space-between;gap:10px}
#trendToolStyleMenu .rr-date-pref input{width:18px;height:18px;accent-color:#5b3acb}

.trend-rr-inspector{padding:11px 13px!important;display:grid;gap:7px}
.trend-rr-inspector-head,.trend-rr-inspector-opt{display:flex;justify-content:space-between;align-items:center;gap:8px}
.trend-rr-inspector-head button{border:1px solid #e4e7ec;border-radius:6px;background:#fff;cursor:pointer;font-size:16px}
.trend-rr-inspector-opt{font-size:12px;font-weight:650}
.trend-rr-inspector-opt input{width:18px;height:18px;accent-color:#5b3acb;flex-shrink:0}
.trend-rr-inspector small{font-size:11px;color:#667085;white-space:normal}


/* ==========================================================================
   v20.558.0: CHỐNG GIẬT MÀN HÌNH KHI BẬT/TẮT CHỈ BÁO & RÊ CHUỘT TRÊN SUPER CHART
   - Khóa cứng .trend-chart-actions luôn nằm trên 1 hàng duy nhất (flex-wrap: nowrap),
     tuyệt đối không bao giờ đẩy nút Lưu Keyword / Toàn màn hình xuống dòng thứ 2!
   - Khóa chiều cao .trend-statusbar và #cursorValue (tabular-nums).
   ========================================================================== */
.trend-chart-toolbar {
  contain: layout style !important;
}
.trend-chart-toolbar .trend-chart-actions {
  flex-wrap: nowrap !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  scrollbar-width: none !important;
  height: 32px !important;
  min-height: 32px !important;
  max-height: 32px !important;
  align-items: center !important;
  gap: 3px !important;
}
.trend-chart-toolbar .trend-chart-actions::-webkit-scrollbar {
  display: none !important;
}
.trend-chart-toolbar .trend-chart-actions > button,
.trend-chart-toolbar .trend-chart-actions > a {
  height: 30px !important;
  min-height: 30px !important;
  max-height: 30px !important;
  flex: 0 0 auto !important;
  white-space: nowrap !important;
  box-sizing: border-box !important;
}
/* Ẩn nhãn phụ .astrogeo-toolbar-ref ("Vị trí đang xem") trên thanh công cụ để tiết kiệm 95px chiều ngang,
   giúp khi bật LeDat Mùa vụ (kèm ⚙ Option & ✕ Tắt chỉ báo) toàn bộ nút vẫn nằm gọn 100% trên 1 hàng! */
.trend-chart-actions #astroGeoOpenToolbar .astrogeo-toolbar-ref {
  display: none !important;
}
@media (max-width: 1600px) and (min-width: 1121px) {
  .trend-chart-toolbar .trend-chart-actions > button {
    padding: 0 6px !important;
    gap: 3.5px !important;
  }
  .trend-chart-toolbar .trend-chart-actions .trend-action-label {
    font-size: 10.2px !important;
  }
  .trend-chart-toolbar .trend-chart-actions #analysisSnapshot .trend-action-label,
  .trend-chart-toolbar .trend-chart-actions #newProject .trend-action-label,
  .trend-chart-toolbar .trend-chart-actions #refreshTrendData .trend-action-label,
  .trend-chart-toolbar .trend-chart-actions #clearAllDrawings .trend-action-label,
  .trend-chart-toolbar .trend-chart-actions #downloadImage .trend-action-label,
  .trend-chart-toolbar .trend-chart-actions #toggleFloatingTools .trend-action-label {
    display: none !important;
  }
  .trend-chart-toolbar .trend-chart-actions #analysisSnapshot,
  .trend-chart-toolbar .trend-chart-actions #newProject,
  .trend-chart-toolbar .trend-chart-actions #refreshTrendData,
  .trend-chart-toolbar .trend-chart-actions #clearAllDrawings,
  .trend-chart-toolbar .trend-chart-actions #downloadImage,
  .trend-chart-toolbar .trend-chart-actions #toggleFloatingTools {
    width: 30px !important;
    min-width: 30px !important;
    padding: 0 !important;
    justify-content: center !important;
  }
}
.trend-statusbar {
  height: 27px !important;
  min-height: 27px !important;
  max-height: 27px !important;
  overflow: hidden !important;
  contain: layout paint !important;
}
.trend-statusbar #cursorValue {
  display: inline-block !important;
  min-width: 118px !important;
  font-variant-numeric: tabular-nums !important;
}


/* ==========================================================================
   v20.559.0 CHROME AUTOFILL & PASSWORD MANAGER INTERCEPTION ELIMINATION
   Hides WebKit credential/contact avatar buttons and triggers animation-event
   to immediately wipe email/passwords from all non-login search inputs.
   ========================================================================== */
@keyframes onAutoFillStart { from {} to {} }
input:-webkit-autofill:not([name="identifier"]):not([name="email"]):not([name="password"]):not([name="new_password"]) {
  animation-name: onAutoFillStart !important;
  transition: background-color 50000s ease-in-out 0s !important;
}
input::-webkit-credentials-auto-fill-button,
input::-webkit-contacts-auto-fill-button,
input::-webkit-strong-password-auto-fill-button,
input::-webkit-caps-lock-indicator {
  visibility: hidden !important;
  display: none !important;
  pointer-events: none !important;
  position: absolute !important;
  right: 0 !important;
  width: 0 !important;
  height: 0 !important;
  opacity: 0 !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
}


/* ==========================================================================
   v20.567.0: HÌNH 1 FIX — HIGH-CONTRAST LUXURY VIP BUTTONS & 24K GOLD VIP BADGES
   Upgrades #astrologyDockToggle, #marketingHouseOpenToolbar, #astroGeoOpenToolbar,
   top header VIP nav buttons (#astrologyOpen, #astroGeoOpen, #marketingHouseOpen),
   .sc-toolbar-vip-tag, and .trend-vip-badge so VIP controls never look dim or faded.
   ========================================================================== */
.ar-build-badge, .cc-version { display: none !important; }
.sc-toolbar-vip-tag,
.trend-account-nav .astrology-open em,
.trend-account-nav .astrogeo-nav-open em,
.trend-account-nav .mh-nav-open em,
.trend-account-nav .farmer-nav-open em,
.trend-account-nav .connection-nav-open em,
.trend-vip-badge {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 2px 6.5px !important;
  border-radius: 999px !important;
  font-style: normal !important;
  font-size: 9.5px !important;
  font-weight: 900 !important;
  letter-spacing: 0.04em !important;
  line-height: 1.1 !important;
  background: linear-gradient(135deg, #fef08a 0%, #fbbf24 52%, #f59e0b 100%) !important;
  color: #451a03 !important;
  border: 1px solid #fde047 !important;
  box-shadow: 0 0 9px rgba(251, 191, 36, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.88) !important;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.45) !important;
  flex-shrink: 0 !important;
}

.sc-toolbar-vip-tag.is-locked,
.trend-account-nav .astrology-open.locked em,
.trend-account-nav .mh-nav-open.locked em {
  background: linear-gradient(135deg, #fde68a 0%, #f59e0b 100%) !important;
  color: #451a03 !important;
  border-color: #fbbf24 !important;
}

.trend-chart-toolbar .trend-chart-actions #astrologyDockToggle {
  background: linear-gradient(135deg, #0f172a 0%, #0369a1 55%, #0284c7 100%) !important;
  border: 1.5px dashed #38bdf8 !important;
  color: #f0f9ff !important;
  font-weight: 800 !important;
  padding: 0 9px !important;
  gap: 5px !important;
  box-shadow: 0 2px 10px rgba(2, 132, 199, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.22) !important;
}
.trend-chart-toolbar .trend-chart-actions #astrologyDockToggle:hover,
.trend-chart-toolbar .trend-chart-actions #astrologyDockToggle.active {
  background: linear-gradient(135deg, #075985 0%, #0284c7 52%, #0ea5e9 100%) !important;
  border-style: solid !important;
  border-color: #7dd3fc !important;
  box-shadow: 0 4px 14px rgba(14, 165, 233, 0.55) !important;
  transform: translateY(-0.5px);
}
.trend-chart-toolbar .trend-chart-actions #astrologyDockToggle .trend-menu-icon {
  color: #7dd3fc !important;
  font-size: 13px !important;
}
.trend-chart-toolbar .trend-chart-actions #astrologyDockToggle .trend-action-label {
  color: #ffffff !important;
  font-weight: 800 !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35) !important;
}
.sc-toolbar-vip-tag.is-popup-tag {
  background: linear-gradient(135deg, #e0f2fe 0%, #38bdf8 100%) !important;
  color: #0c4a6e !important;
  border: 1px solid #7dd3fc !important;
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.45) !important;
}

.trend-chart-toolbar .trend-chart-actions #marketingHouseOpenToolbar {
  background: linear-gradient(135deg, #065f46 0%, #0f766e 52%, #0d9488 100%) !important;
  border: 1px solid #5eead4 !important;
  color: #ffffff !important;
  font-weight: 800 !important;
  padding: 0 9px !important;
  gap: 5px !important;
  box-shadow: 0 2px 10px rgba(13, 148, 136, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.22) !important;
}
.trend-chart-toolbar .trend-chart-actions #marketingHouseOpenToolbar:hover {
  background: linear-gradient(135deg, #047857 0%, #0d9488 52%, #14b8a6 100%) !important;
  border-color: #fde047 !important;
  box-shadow: 0 4px 14px rgba(13, 148, 136, 0.55) !important;
  transform: translateY(-0.5px);
}
.trend-chart-toolbar .trend-chart-actions #marketingHouseOpenToolbar .trend-menu-icon {
  color: #fde047 !important;
  font-size: 13.5px !important;
}
.trend-chart-toolbar .trend-chart-actions #marketingHouseOpenToolbar .trend-action-label {
  color: #ffffff !important;
  font-weight: 800 !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35) !important;
}

.trend-chart-toolbar .trend-chart-actions #astroGeoOpenToolbar {
  background: linear-gradient(135deg, #1e3a8a 0%, #3730a3 52%, #4f46e5 100%) !important;
  border: 1px solid #a5b4fc !important;
  color: #ffffff !important;
  font-weight: 800 !important;
  padding: 0 9px !important;
  gap: 5px !important;
  box-shadow: 0 2px 10px rgba(79, 70, 229, 0.38) !important;
}
.trend-chart-toolbar .trend-chart-actions #astroGeoOpenToolbar .trend-menu-icon,
.trend-chart-toolbar .trend-chart-actions #astroGeoOpenToolbar .trend-action-label {
  color: #ffffff !important;
  font-weight: 800 !important;
}

.trend-account-nav .astrology-open {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  padding: 5px 11px !important;
  border-radius: 999px !important;
  background: linear-gradient(135deg, #4c1d95 0%, #6d28d9 52%, #7c3aed 100%) !important;
  color: #ffffff !important;
  border: 1px solid #c4b5fd !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  box-shadow: 0 2px 10px rgba(124, 58, 237, 0.35) !important;
  text-decoration: none !important;
}
.trend-account-nav .astrology-open b {
  color: #ffffff !important;
  font-weight: 800 !important;
}
.trend-account-nav .astrogeo-nav-open {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  padding: 5px 11px !important;
  border-radius: 999px !important;
  background: linear-gradient(135deg, #312e81 0%, #4338ca 52%, #4f46e5 100%) !important;
  color: #ffffff !important;
  border: 1px solid #a5b4fc !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  box-shadow: 0 2px 10px rgba(79, 70, 229, 0.35) !important;
}
.trend-account-nav .astrogeo-nav-open b {
  color: #ffffff !important;
  font-weight: 800 !important;
}
.trend-account-nav .astrogeo-active-ref {
  background: rgba(91, 33, 182, 0.28) !important;
  border: 1px solid #a78bfa !important;
  color: #f3e8ff !important;
  font-weight: 800 !important;
}


/* v20.568.0 — Unified Design System Font Stack & Control Proportions */
:root {
  --trend-font: "Be Vietnam Pro", "Inter", "Roboto", "Segoe UI", Arial, -apple-system, BlinkMacSystemFont, "Be Vietnam Pro", "Inter", "Roboto", "Segoe UI", Arial, "Noto Sans", sans-serif !important;
}
.trend-topbar button,
.trend-topbar select,
.trend-topbar input,
.trend-chart-toolbar button {
  font-family: var(--trend-font) !important;
  font-variant-numeric: tabular-nums;
}


/* ==========================================================================
   v20.585.6: HÌNH 2 & HÌNH 3 FIX — RETIRE INLINE POPUP (#astrologyDockToggle)
   & GUARANTEE 100% VISIBILITY OF ALL 9 GOOGLE TRENDS TIMEFRAMES ON SUPER CHART
   ========================================================================== */
#astrologyDockToggle,
.trend-chart-toolbar .trend-chart-actions #astrologyDockToggle,
#astrologyDock.astro-inline-panel {
  display: none !important;
  visibility: hidden !important;
  width: 0 !important;
  height: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  border: 0 !important;
  pointer-events: none !important;
}

.trend-chart-toolbar,
body.trend-fullscreen-workspace .trend-chart-toolbar,
body.trend-focus-mode .trend-chart-toolbar {
  display: grid !important;
  grid-template-columns: max-content minmax(0, 1fr) !important;
  align-items: center !important;
  gap: 8px 12px !important;
}

.trend-chart-toolbar .trend-ranges,
body.trend-fullscreen-workspace .trend-chart-toolbar .trend-ranges,
body.trend-focus-mode .trend-chart-toolbar .trend-ranges {
  display: inline-flex !important;
  align-items: center !important;
  flex-wrap: nowrap !important;
  gap: 3px !important;
  min-width: max-content !important;
  max-width: none !important;
  overflow: visible !important;
  flex: 0 0 auto !important;
}

.trend-chart-toolbar .trend-range-btn {
  flex: 0 0 auto !important;
  white-space: nowrap !important;
}

@media (max-width: 1180px) {
  .trend-chart-toolbar,
  body.trend-fullscreen-workspace .trend-chart-toolbar {
    grid-template-columns: 1fr !important;
    height: auto !important;
  }
  .trend-chart-toolbar .trend-ranges,
  body.trend-fullscreen-workspace .trend-chart-toolbar .trend-ranges {
    min-width: 0 !important;
    width: 100% !important;
    overflow-x: auto !important;
  }
}


/* v20.585.7: Hình 1-2 Curiosity Upsell Tooltip & Suggested Keyword Box in #trendInsights */
.trend-action-tooltip {
  max-width: min(460px, calc(100vw - 16px)) !important;
  padding: 8px 11px !important;
  border: 1px solid rgba(250, 204, 21, 0.45) !important;
  border-radius: 9px !important;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.98) 0%, rgba(9, 13, 22, 0.99) 100%) !important;
  color: #f8fafc !important;
  box-shadow: 0 12px 28px rgba(2, 6, 23, 0.55) !important;
  font: 650 11px/1.45 "Be Vietnam Pro", "Inter", "Roboto", "Segoe UI", Arial, sans-serif !important;
}
.trend-insight-empty.is-curiosity-upsell {
  padding: 8px !important;
  text-align: left !important;
  color: #e2e8f0 !important;
}
.trend-curiosity-box {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 9px 10px;
  border-radius: 9px;
  background: linear-gradient(180deg, #111827 0%, #0b101c 100%);
  border: 1px solid rgba(234, 179, 8, 0.35);
}
.trend-curiosity-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  flex-wrap: wrap;
}
.trend-curiosity-head b {
  font-size: 10.5px;
  font-weight: 850;
  color: #fde047;
}
.trend-curiosity-head span {
  font-size: 9px;
  color: #94a3b8;
  font-weight: 600;
}
.trend-curiosity-chips {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
}
@media (max-width: 640px) {
  .trend-curiosity-chips {
    grid-template-columns: 1fr;
  }
}
.trend-curiosity-chip {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 7px;
  border-radius: 6px;
  background: #162033;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #f8fafc;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
  text-align: left;
  transition: all 0.14s ease;
}
.trend-curiosity-chip:hover {
  background: #1e293b;
  border-color: rgba(250, 204, 21, 0.65);
  color: #fef08a;
  transform: translateY(-1px);
}
.trend-curiosity-chip b {
  color: #fde047;
  font-size: 9px;
  font-weight: 900;
}
.trend-curiosity-chip span {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.trend-curiosity-chip em {
  font-style: normal;
  font-size: 8.5px;
  font-weight: 800;
  color: #6ee7b7;
  background: rgba(16, 185, 129, 0.16);
  padding: 1px 5px;
  border-radius: 999px;
  white-space: nowrap;
}
.trend-curiosity-upsell-bar {
  padding-top: 6px;
  border-top: 1px dashed rgba(255, 255, 255, 0.12);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.trend-curiosity-upsell-bar p {
  margin: 0;
  font-size: 9.8px;
  line-height: 1.4;
  color: #cbd5e1;
  font-weight: 600;
}
.trend-curiosity-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.trend-curiosity-btn {
  flex: 1 1 auto;
  min-height: 26px;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 9.8px;
  font-weight: 850;
  cursor: pointer;
  transition: all 0.14s ease;
}
.trend-curiosity-btn.is-mh {
  background: linear-gradient(135deg, #0d9488 0%, #0f766e 100%);
  border: 1px solid #5eead4;
  color: #ffffff;
}
.trend-curiosity-btn.is-astro {
  background: linear-gradient(135deg, rgba(234, 179, 8, 0.24) 0%, rgba(161, 98, 7, 0.34) 100%);
  border: 1px solid #facc15;
  color: #fef08a;
}
.trend-curiosity-btn:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

/* v20.619.0 — Smart Keyword & Timeframe Update Button + Uncommitted Search Guard */
.trend-chart-actions #updateProjectBtn {
  width: auto !important;
  min-width: 68px !important;
  height: 29px !important;
  padding: 0 9px !important;
  background: linear-gradient(180deg, #0284c7 0%, #0369a1 100%) !important;
  color: #ffffff !important;
  border: 1px solid #38bdf8 !important;
  border-radius: 6px !important;
  font-weight: 800 !important;
  gap: 4px !important;
}
.trend-chart-actions #updateProjectBtn:hover {
  filter: brightness(1.1);
}
.trend-chart-actions #updateProjectBtn .trend-action-label {
  display: inline !important;
  font-size: 10px !important;
  color: #ffffff !important;
}
.trend-chart-actions #updateProjectBtn .trend-menu-icon {
  font-size: 11px !important;
  color: #ffffff !important;
}
.trend-project-action-menu button[data-project-action="update_keyword"] {
  color: #38bdf8 !important;
  font-weight: 800 !important;
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
}
.trend-project-action-menu button[data-project-action="update_keyword"]:hover {
  background: rgba(2, 132, 199, 0.22) !important;
  color: #ffffff !important;
}
.astro-update-kw-btn, .mh-btn-gt-update {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 30px;
  padding: 0 10px;
  border-radius: 7px;
  border: 1px solid #38bdf8;
  background: linear-gradient(180deg, #0284c7 0%, #0369a1 100%);
  color: #ffffff;
  font-size: 11.5px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  transition: filter 0.14s ease, transform 0.12s ease;
}
.astro-update-kw-btn:hover, .mh-btn-gt-update:hover {
  filter: brightness(1.1);
}
#keywordInput.has-uncommitted-typing {
  border-color: #f59e0b !important;
  box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.22) !important;
}



/* ==========================================================================
   v20.620.0 — HÌNH 1 & HÌNH 3 FIX:
   1. Chống cắt mất chữ bên trái nút "🎯 Nhà Cái Làm Marketing VIP" trên .trend-chart-actions
      (Thay justify-content: flex-end gây tràn âm bên trái bằng margin-left: auto + justify-content: flex-start).
   2. Ô Select kéo lên xuống 5Y / 4Y / 3Y / 2Y (#multiYearRangeWrap / #multiYearRangeSelect) ngay tại vị trí 5Y.
   ========================================================================== */
.trend-chart-toolbar .trend-chart-actions,
body.trend-fullscreen-workspace .trend-chart-toolbar .trend-chart-actions {
  justify-content: flex-start !important;
  margin-left: auto !important;
  max-width: 100% !important;
  padding-left: 2px !important;
  scroll-padding-left: 8px !important;
}
.trend-chart-toolbar .trend-chart-actions > *:first-child {
  margin-left: auto !important;
}

.trend-multiyear-range-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
}
.trend-multiyear-select {
  appearance: none;
  -webkit-appearance: none;
  border: 1px solid rgba(148, 163, 184, 0.25) !important;
  background: #1b222c url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='12' viewBox='0 0 10 12' fill='none' stroke='%2394a3b8' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2.5 4.2L5 1.7L7.5 4.2'/%3E%3Cpath d='M2.5 7.8L5 10.3L7.5 7.8'/%3E%3C/svg%3E") no-repeat right 5px center !important;
  color: #cbd5e1 !important;
  padding: 5px 18px 5px 8px !important;
  border-radius: 5px !important;
  cursor: pointer !important;
  font-size: 10.5px !important;
  font-weight: 800 !important;
  min-height: 29px !important;
  height: 29px !important;
  line-height: 1 !important;
  white-space: nowrap !important;
  transition: background 0.14s ease, border-color 0.14s ease, color 0.14s ease, box-shadow 0.14s ease;
}
.trend-multiyear-select:hover {
  background-color: #242d3a !important;
  border-color: #475569 !important;
  color: #ffffff !important;
}
.trend-multiyear-range-wrap.active .trend-multiyear-select,
.trend-multiyear-select.active {
  background-color: #2563eb !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='12' viewBox='0 0 10 12' fill='none' stroke='%23ffffff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2.5 4.2L5 1.7L7.5 4.2'/%3E%3Cpath d='M2.5 7.8L5 10.3L7.5 7.8'/%3E%3C/svg%3E") !important;
  border-color: #60a5fa !important;
  color: #ffffff !important;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.35) !important;
}
.trend-multiyear-select option {
  background: #0f172a;
  color: #f8fafc;
  font-weight: 700;
  font-size: 11.5px;
}

@media (max-width: 1750px) and (min-width: 1121px) {
  .trend-chart-toolbar .trend-chart-actions #analysisSnapshot .trend-action-label,
  .trend-chart-toolbar .trend-chart-actions #newProject .trend-action-label,
  .trend-chart-toolbar .trend-chart-actions #refreshTrendData .trend-action-label,
  .trend-chart-toolbar .trend-chart-actions #clearAllDrawings .trend-action-label,
  .trend-chart-toolbar .trend-chart-actions #downloadImage .trend-action-label {
    display: none !important;
  }
  .trend-chart-toolbar .trend-chart-actions #analysisSnapshot,
  .trend-chart-toolbar .trend-chart-actions #newProject,
  .trend-chart-toolbar .trend-chart-actions #refreshTrendData,
  .trend-chart-toolbar .trend-chart-actions #clearAllDrawings,
  .trend-chart-toolbar .trend-chart-actions #downloadImage {
    width: 28px !important;
    min-width: 28px !important;
    padding: 0 !important;
    justify-content: center !important;
  }
}


/* ==========================================================================
   v20.622.0 — HÌNH 1 FIX TRIỆT ĐỂ:
   1. Bỏ nút trùng lặp "🎯 Nhà Cái Marketing VIP" (#marketingHouseOpenToolbar) trên thanh công cụ dưới
      (vì đã có sẵn trên thanh điều hướng chính .trend-account-nav).
   2. Ẩn các nút chỉ dành cho Mobile (#mscMobileQuickShare, #mscMobileQuickKeyword, #mscMobileOpenDraw, #mscMobileActionsMore)
      khi ở giao diện máy tính (>= 1101px) để giải phóng hơn 310px chiều ngang.
   3. Chống đè / cắt chữ cụm nút bên phải (🔄 Cập nhật Keyword · ▣ LeDat Thời Vụ · ◇ Lưu Keyword · ⛶ Toàn màn hình):
      - Thu gọn 6 nút tiện ích phụ (🖌 Vẽ, ◉ Chụp, ＋ Mới, ↻ Làm mới, ⌫ Xóa hình, ⇩ Tải ảnh) thành nút icon 29x29px sắc nét (có chú thích khi rê chuột).
      - Cho phép .trend-chart-toolbar và .trend-chart-actions tự động xuống dòng mượt (flex-wrap: wrap) khi bật full pill LeDat Thời Vụ hoặc trên màn hình nhỏ, đảm bảo 100% nút luôn hiển thị trọn vẹn, không bao giờ bị đè hay cắt góc phải!
   ========================================================================== */
#marketingHouseOpenToolbar,
.trend-chart-toolbar .trend-chart-actions #marketingHouseOpenToolbar,
#multiYearRangeBtn,
#rangeButtons button[data-range="2y"],
#rangeButtons button[data-range="3y"],
#rangeButtons button[data-range="4y"] {
  display: none !important;
}

@media (min-width: 1101px) {
  #mscMobileQuickKeyword,
  #mscMobileQuickShare,
  #mscMobileOpenDraw,
  #mscMobileInsights,
  #mscMobileActionsMore,
  .trend-chart-actions .msc-mobile-quick-keyword,
  .trend-chart-actions .msc-mobile-quick-share,
  .trend-chart-actions .msc-mobile-more {
    display: none !important;
  }

  .trend-chart-toolbar,
  body.trend-fullscreen-workspace .trend-chart-toolbar {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    justify-content: space-between !important;
    height: auto !important;
    min-height: 42px !important;
    max-height: none !important;
    padding: 5px 10px !important;
    gap: 6px 10px !important;
    overflow: visible !important;
  }

  .trend-chart-toolbar .trend-ranges,
  body.trend-fullscreen-workspace .trend-chart-toolbar .trend-ranges {
    display: inline-flex !important;
    align-items: center !important;
    flex-wrap: nowrap !important;
    gap: 3px !important;
    flex: 0 0 auto !important;
    min-width: max-content !important;
    overflow: visible !important;
  }

  .trend-chart-toolbar .trend-chart-actions,
  body.trend-fullscreen-workspace .trend-chart-toolbar .trend-chart-actions {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 4px !important;
    flex: 1 1 auto !important;
    min-width: 0 !important;
    max-width: 100% !important;
    height: auto !important;
    min-height: 30px !important;
    max-height: none !important;
    overflow: visible !important;
    margin-left: auto !important;
    padding: 0 !important;
  }

  .trend-chart-toolbar .trend-chart-actions > *:first-child {
    margin-left: 0 !important;
  }

  /* Compact secondary icon tools on desktop so primary right-side buttons NEVER get squeezed or overlapped */
  .trend-chart-toolbar .trend-chart-actions #toggleFloatingTools .trend-action-label,
  .trend-chart-toolbar .trend-chart-actions #analysisSnapshot .trend-action-label,
  .trend-chart-toolbar .trend-chart-actions #newProject .trend-action-label,
  .trend-chart-toolbar .trend-chart-actions #refreshTrendData .trend-action-label,
  .trend-chart-toolbar .trend-chart-actions #clearAllDrawings .trend-action-label,
  .trend-chart-toolbar .trend-chart-actions #downloadImage .trend-action-label {
    display: none !important;
  }

  .trend-chart-toolbar .trend-chart-actions #toggleFloatingTools,
  .trend-chart-toolbar .trend-chart-actions #analysisSnapshot,
  .trend-chart-toolbar .trend-chart-actions #newProject,
  .trend-chart-toolbar .trend-chart-actions #refreshTrendData,
  .trend-chart-toolbar .trend-chart-actions #clearAllDrawings,
  .trend-chart-toolbar .trend-chart-actions #downloadImage {
    width: 29px !important;
    min-width: 29px !important;
    height: 29px !important;
    padding: 0 !important;
    justify-content: center !important;
    flex: 0 0 29px !important;
  }

  /* Guarantee primary right-side buttons (Cập nhật Keyword, LeDat Thời Vụ, Lưu Keyword, Toàn màn hình) are never clipped or overlapped */
  .trend-chart-toolbar .trend-chart-actions #updateProjectBtn,
  .trend-chart-toolbar .trend-chart-actions #seasonalityToggle,
  .trend-chart-toolbar .trend-chart-actions #saveProject,
  .trend-chart-toolbar .trend-chart-actions #fullscreenChart,
  .trend-chart-toolbar .trend-chart-actions #backtestToggle,
  .trend-chart-toolbar .trend-chart-actions #autoScaleY,
  .trend-chart-toolbar .trend-chart-actions #astroGeoOpenToolbar {
    width: auto !important;
    min-width: max-content !important;
    max-width: none !important;
    height: 29px !important;
    padding: 0 8px !important;
    flex: 0 0 auto !important;
    overflow: visible !important;
  }

  .trend-chart-toolbar .trend-chart-actions #updateProjectBtn .trend-action-label,
  .trend-chart-toolbar .trend-chart-actions #seasonalityToggle .trend-action-label,
  .trend-chart-toolbar .trend-chart-actions #saveProject .trend-action-label,
  .trend-chart-toolbar .trend-chart-actions #fullscreenChart .trend-action-label,
  .trend-chart-toolbar .trend-chart-actions #backtestToggle .trend-action-label,
  .trend-chart-toolbar .trend-chart-actions #autoScaleY .trend-action-label,
  .trend-chart-toolbar .trend-chart-actions #astroGeoOpenToolbar .trend-action-label {
    display: inline !important;
    max-width: none !important;
    overflow: visible !important;
    text-overflow: clip !important;
    white-space: nowrap !important;
  }
}

#scVipUpsellModal[hidden] { display: none !important; }


/* v20.709.0: Fix độ tương phản thanh #trendGeoBreadcrumb & chống đè dropdown #countryPicker */
#trendGeoBreadcrumb.trend-geo-breadcrumb span {
  color: #f8fafc !important;
}
#trendGeoBreadcrumb.trend-geo-breadcrumb .msc-bc-prov {
  color: #fde047 !important;
}
#trendGeoBreadcrumb.trend-geo-breadcrumb .msc-bc-cluster {
  color: #7dd3fc !important;
}
#trendGeoBreadcrumb.trend-geo-breadcrumb .msc-bc-districts {
  color: #a7f3d0 !important;
}


/* v20.716.0: Luxury Royal Gradients for the 2 Top Header Connection VIP Menu Pills (Image 4) */
.trend-account-nav .connection-nav-open {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  padding: 5px 12px !important;
  border-radius: 999px !important;
  background: linear-gradient(135deg, #78350f 0%, #b45309 48%, #d97706 100%) !important;
  color: #ffffff !important;
  border: 1.5px solid #fde68a !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  box-shadow: 0 3px 12px rgba(217, 119, 6, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.28) !important;
  text-decoration: none !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35) !important;
}
.trend-account-nav .connection-nav-open.connection-nav-love,
.trend-account-nav a.connection-nav-open[href*="love"] {
  background: linear-gradient(135deg, #881337 0%, #be123c 48%, #e11d48 100%) !important;
  border: 1.5px solid #fda4af !important;
  box-shadow: 0 3px 12px rgba(225, 29, 72, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.28) !important;
}
.trend-account-nav .connection-nav-open b {
  color: #ffffff !important;
  font-weight: 800 !important;
}
.trend-account-nav .connection-nav-open:hover {
  border-color: #fef08a !important;
  box-shadow: 0 5px 16px rgba(251, 191, 36, 0.52), inset 0 1px 0 rgba(255, 255, 255, 0.4) !important;
  transform: translateY(-1px) !important;
  filter: brightness(1.08) !important;
}
.astro-workspace-nav .connection-nav-open {
  background: linear-gradient(135deg, #78350f 0%, #b45309 52%, #d97706 100%) !important;
  border: 1px solid #fde68a !important;
  color: #ffffff !important;
  font-weight: 800 !important;
  box-shadow: 0 2px 10px rgba(217, 119, 6, 0.35) !important;
}
.astro-workspace-nav .connection-nav-open.connection-nav-love,
.astro-workspace-nav a.connection-nav-open[href*="love"] {
  background: linear-gradient(135deg, #881337 0%, #be123c 52%, #e11d48 100%) !important;
  border: 1px solid #fda4af !important;
  box-shadow: 0 2px 10px rgba(225, 29, 72, 0.38) !important;
}


/* ==========================================================================
 * v20.759.0 SYSTEM-WIDE UNIFIED TYPOGRAPHY & FONT SCALE ("Be Vietnam Pro", "Inter", "Roboto", "Segoe UI", Arial, )
 * ========================================================================== */
:root {
  --msc-sys-font: "Be Vietnam Pro", "Inter", "Roboto", "Segoe UI", Arial, -apple-system, BlinkMacSystemFont, "Be Vietnam Pro", "Inter", "Roboto", "Segoe UI", Arial, sans-serif;
  --msc-fs-xs: 11.5px;
  --msc-fs-sm: 12.5px;
  --msc-fs-md: 13.5px;
  --msc-fs-lg: 15px;
  --msc-fs-xl: 18px;
}

body.trend-workspace-body,
body.trend-workspace-body *:not(code):not(pre),
#astrologyWorkspace,
#astrologyWorkspace *:not(code):not(pre),
#marketingHouseWorkspace,
#marketingHouseWorkspace *:not(code):not(pre),
#seasonalityPanel,
#seasonalityPanel *:not(code):not(pre) {
  font-family: var(--msc-sys-font) !important;
  font-variant-numeric: tabular-nums !important;
  -webkit-font-smoothing: antialiased !important;
  -moz-osx-font-smoothing: grayscale !important;
}


/* v20.772.0: 100% Vietnamese-Complete Luxury Typography (Zero Helvetica Glyph Mismatch) */
:root, html, body, .trend-shell, #astrologyWorkspace, #seasonalityPanel, #marketingHouseWorkspace, #astroGeoWorkspace, .msc-pnl-modal-backdrop {
  --msc-sys-font: "Be Vietnam Pro", "Inter", "Roboto", "Segoe UI", Arial, sans-serif !important;
  --msc-mono-font: "Be Vietnam Pro", "Inter", "Roboto", "Segoe UI", Arial, sans-serif !important;
  --bm-font: "Be Vietnam Pro", "Inter", "Roboto", "Segoe UI", Arial, sans-serif !important;
  --ar-font: "Be Vietnam Pro", "Inter", "Roboto", "Segoe UI", Arial, sans-serif !important;
  --farmer-luxury-font: "Be Vietnam Pro", "Inter", "Roboto", "Segoe UI", Arial, sans-serif !important;
  --farmer-mono-font: "Be Vietnam Pro", "Inter", "Roboto", "Segoe UI", Arial, sans-serif !important;
  font-family: "Be Vietnam Pro", "Inter", "Roboto", "Segoe UI", Arial, sans-serif !important;
  text-rendering: optimizeLegibility !important;
  -webkit-font-smoothing: antialiased !important;
  -moz-osx-font-smoothing: grayscale !important;
}
body, button, input, select, textarea, table, th, td, h1, h2, h3, h4, h5, h6, p, span, div, a, label, small, strong, b, em {
  font-family: "Be Vietnam Pro", "Inter", "Roboto", "Segoe UI", Arial, sans-serif;
}
