.fc-card{position:fixed;width:560px;height:390px;min-width:300px;min-height:260px;max-width:100vw;max-height:100dvh;resize:both;overflow:hidden;display:flex;flex-direction:column;border:1px solid var(--line);border-radius:18px;background:color-mix(in srgb,var(--panel) 88%,transparent);backdrop-filter:blur(28px);box-shadow:0 20px 70px #0005;color:var(--tx)}
.fc-head{display:flex;align-items:center;gap:8px;padding:12px 16px;cursor:grab;touch-action:none;border-bottom:1px solid var(--line)}.fc-head strong{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}.fc-card button,.fc-actions button,.sf-chart-actions button{cursor:pointer;border:1px solid var(--line);border-radius:8px;background:transparent;color:inherit;padding:5px 9px}.fc-plot{flex:1;min-height:0}.fc-card footer{padding:8px 16px;font-size:12px;display:flex;gap:12px;align-items:center;flex-wrap:wrap}.fc-card footer button{margin-left:auto}.fc-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,360px),1fr));gap:18px;margin-top:20px}.fc-saved{min-width:0}.fc-mini{height:200px}.fc-actions{display:flex;flex-wrap:wrap;gap:8px}.fc-search{width:min(100%,420px)}.sf-chart-actions{display:flex;gap:8px;justify-content:flex-end;margin:4px 0}.sf-chart-snapshot{font-size:11px;opacity:.7}
@media(max-width:600px){.fc-card{left:0!important;top:auto!important;bottom:0;width:100%!important;height:55dvh;max-height:85dvh;min-width:0;resize:none;border-radius:18px 18px 0 0}.fc-head{padding-top:20px}.fc-head:before{content:'';position:absolute;top:7px;left:45%;width:10%;height:4px;border-radius:4px;background:#94a3b8}.fc-head button{font-size:12px}}

.fc-card>.chart-box{flex:1;min-height:0}.fc-card>.chart-box>.fc-plot{height:100%;width:100%}.fc-head,.fc-card footer{flex-shrink:0}.fc-saved h3,.fc-mini{cursor:pointer}

.fc-note{margin:0;padding:0 16px;max-height:44px;overflow:auto;flex-shrink:0;font-size:12px;color:var(--tx-2)}.fc-search{padding:9px 12px;border:1px solid var(--line);background:var(--panel);color:var(--tx);border-radius:9px;font:inherit}.fc-grid .fc-saved h3{overflow-wrap:anywhere}.fc-close{font-size:20px;line-height:1}.fc-star[aria-pressed="true"]{color:var(--pri)}

.fc-layer{position:fixed;inset:0;z-index:1300;pointer-events:none}.fc-layer>.fc-card{pointer-events:auto}:root[data-skin="alice"] .fc-layer{z-index:1300}

/* 「我的图表」卡片自定义大小（用户 2026-11-12：要能自己拉高、拉宽）。
   宽度走 grid 列跨度而不是绝对宽度：grid 里给元素写死宽度只会让它压到邻居头上。
   高度只改 .fc-mini（图表区），标题与按钮排保持原高，卡片不会被拉得头重脚轻。 */
.fc-saved{grid-column:span var(--fc-span,1);position:relative}
.fc-grid .fc-mini{height:var(--fc-h,200px)}
.fc-actions{padding-right:22px}/* 给右下角手柄让位，按钮多到换行时也不会被压住 */
.fc-rs{position:absolute;right:5px;bottom:5px;width:18px;height:18px;padding:0;border:0;background:transparent;
  color:var(--tx-2);cursor:nwse-resize;touch-action:none;opacity:0;transition:opacity .15s,color .15s}
.fc-saved:hover .fc-rs,.fc-rs:focus-visible{opacity:.85}
.fc-rs:hover,.fc-rs:focus-visible{color:var(--pri)}
.fc-rs::before{content:'';position:absolute;inset:3px;border-right:2px solid currentColor;border-bottom:2px solid currentColor;border-bottom-right-radius:3px}
.fc-saved.rs{user-select:none}
.fc-saved.rs .fc-rs{opacity:1}

.chart-tear-title{cursor:grab}.chart-tear-placeholder{display:block;width:100%;padding:10px;border:1px dashed var(--line);border-radius:8px;background:var(--panel);color:var(--tx-2);cursor:pointer}.chart-tear-ghost{position:fixed!important;z-index:10000;pointer-events:none;opacity:.55;background:var(--panel);border:1px solid var(--line);border-radius:12px;margin:0;padding:12px;max-height:240px;overflow:hidden}.chart-tear-ghost .sf-chart-plot,.chart-tear-ghost .ct-chart{height:140px}@media(max-width:899px){.chart-tear-title{cursor:auto}}

.sf-chart{margin:12px 0;padding:12px;border:1px solid var(--line);border-radius:12px;min-width:0}.sf-chart-plot{height:240px;width:100%}.sf-chart figcaption{font-weight:600}.sf-chart figcaption small{font-weight:400}

/* 收藏 / 关闭：成对的图标钮（2026-11-13） */
body .fc-card .fc-head :is(.fc-star,.fc-close){flex:none;width:32px;height:32px;padding:0;display:inline-grid;place-items:center;border-radius:10px;border:1px solid transparent;background:transparent;color:var(--tx-2);cursor:pointer;transition:background .15s,color .15s,border-color .15s,transform .15s}
body .fc-card .fc-head :is(.fc-star,.fc-close):hover{background:color-mix(in srgb,var(--tx-1,currentColor) 8%,transparent);border-color:var(--line);color:var(--tx-1,inherit)}
.fc-head .fc-close svg{width:16px;height:16px}
.ex-fav{display:inline-flex;align-items:center;gap:6px}
.ex-fav .ex-fav-i{width:16px;height:16px;flex:none;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linejoin:round;transition:fill .15s,stroke .15s,transform .2s}
.ex-fav.on{color:#f5b301}
.ex-fav.on .ex-fav-i{fill:#f5b301;stroke:#f5b301}
.ex-fav:active .ex-fav-i{transform:scale(.85)}
body .fc-card .fc-head .fc-star.on{background:rgba(245,179,1,.12);border-color:rgba(245,179,1,.35)}
.fc-head .fc-star .ex-fav-i{width:17px;height:17px}
