/* Independent DeFi canvas: no legacy chart overlays or price-scale transforms. */
#position-admin-range-chart.defi-chart-host {display:block;height:auto;min-height:0;min-width:0;padding:0;overflow:hidden;background:#0c1118}
#position-admin-range-chart.defi-chart-host[hidden] {display:none}
.defi-chart-toolbar {display:flex;gap:3px;padding:5px;border-bottom:1px solid #28364a;min-width:0}
.defi-chart-toolbar button {flex:1;min-width:0;width:auto;height:30px;min-height:30px;padding:0 2px;border:1px solid #303b4b;border-radius:6px;background:#1b242e;color:#b7c1d0;font-size:10px;touch-action:manipulation}
.defi-chart-toolbar button.selected {background:#4c3c12;border-color:#b89a34;color:#ffd45d}
.defi-chart-toolbar button[data-defi-refresh] {flex:0 0 32px;font-size:22px;color:#95c4ff}
.defi-chart-canvas {display:block;width:100%;height:clamp(360px,65vh,650px);touch-action:none;cursor:crosshair}
.defi-chart-host,.defi-chart-host * {-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}
.defi-chart-legend {display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:3px 14px;padding:7px 9px;border-bottom:1px solid #233248;background:linear-gradient(110deg,#101c2c,#0c141f);font-size:10px;line-height:1.45;color:#80aeff}
.defi-chart-legend[hidden],.defi-chart-legend [hidden] {display:none}
.defi-position-status {padding:8px 9px;color:#8fe0c7;font:600 12px/1.5 system-ui;overflow-wrap:anywhere}
.defi-position-status[hidden] {display:none}
.defi-position-status[data-side="above"],.defi-position-status[data-side="below"] {color:#f0c975}
.defi-position-status[data-side="stale"] {color:#aebdd0}
.defi-chart-legend [data-price-basis] {flex-basis:100%;color:#aebdd0}
.defi-chart-next-info {display:flex;flex-wrap:wrap;align-items:baseline;gap:0 6px;min-width:0;color:#80aeff}
.defi-chart-legend [data-next-range] {color:#80aeff;font-weight:600}
.defi-chart-legend [data-next-range]::before {content:"";display:inline-block;width:12px;height:2px;margin-right:5px;vertical-align:middle;background:#3478ff;box-shadow:0 0 5px #3478ff66}
.defi-chart-legend [data-position-range] {color:#e8b649}
.defi-chart-legend [data-position-range]::before {content:"";display:inline-block;width:12px;margin-right:5px;vertical-align:middle;border-top:1px dashed currentColor}
.defi-chart-stage {position:relative;isolation:isolate}
.defi-chart-heading {position:absolute;z-index:2;top:14px;left:8px;right:calc(var(--defi-axis-width, 62px) + 4px);display:flex;align-items:center;justify-content:space-between;gap:8px;height:26px;box-sizing:border-box;pointer-events:none}
.defi-chart-pair {min-width:0;max-width:45%;color:#edf3fa;font-size:12px;font-weight:700;line-height:18px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-shadow:0 1px 4px #000;padding:3px 6px;border-radius:6px;background:#0b1423dc}
.defi-chart-summary {flex:0 1 auto;min-width:0;box-sizing:border-box;margin-left:auto;padding:3px 7px;text-align:right;color:#e6c784;font-size:13px;line-height:18px;font-weight:600;font-variant-numeric:tabular-nums;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;border:1px solid #a4874738;border-radius:7px;background:linear-gradient(120deg,#192333f0,#121a26e8);box-shadow:0 2px 8px #0003;paint-order:normal;-webkit-text-stroke:0}
#price-chart-section:has(.defi-chart-host:not([hidden])) > .position-market-chart-head {display:none}
.defi-chart-mode-note {padding:0;font:inherit;color:#80aeff}
.defi-chart-mode-note::before {content:"· ";color:inherit}
.defi-chart-save-note {position:absolute;z-index:2;bottom:30px;left:9px;right:66px;padding:5px 8px;border:1px solid #30445f;border-radius:7px;background:#101c2cf0;box-sizing:border-box;color:#d1d8e6;font-size:10px;line-height:1.4;pointer-events:none}
.defi-chart-save-note:empty {display:none}
.farm-range-save-status {font-size:12px;line-height:1.4;color:#d1d8e6}
.farm-range-save-status:empty {display:none}
.defi-chart-summary[hidden] {display:block;visibility:hidden}
.defi-chart-heading>.defi-chart-pair,.defi-chart-heading>.defi-chart-summary{position:static;transform:none;margin-top:0;margin-bottom:0;height:26px;display:flex;align-items:center;box-sizing:border-box}
.defi-chart-inspection {position:absolute;z-index:3;top:42px;right:calc(var(--defi-axis-width, 62px) + 4px);width:104px;height:22px;box-sizing:border-box;padding:0;border:0;border-radius:0;background:none;box-shadow:none;text-align:right;font:600 12px/22px ui-monospace,monospace;color:#38d58a;pointer-events:none}
.defi-chart-inspection[data-empty="true"] {visibility:hidden}
.defi-chart-inspection.negative {color:#ff8490}
.defi-chart-host + .position-chart-mode {margin-top:10px}

/* Compact overview: keep every value and the estimate disclaimer readable. */
#pool-overview.pool-overview {display:grid;grid-template-columns:1fr 2fr;row-gap:2px;height:auto;min-height:0;max-height:none;padding:4px 12px;overflow:visible}
#pool-overview .pool-overview-head,#pool-overview .pool-yield {display:contents}
#pool-overview h2 {grid-column:1;grid-row:1;height:auto;font-size:11px;line-height:14px;white-space:nowrap}
#pool-overview .pool-yield small {grid-column:2;grid-row:1;text-align:right;font-size:12px;line-height:14px;white-space:normal;overflow:visible}
#pool-overview .pool-yield em {grid-column:1 / -1;grid-row:3;text-align:right;font-size:9px;line-height:11px;white-space:normal;overflow:visible}
#pool-overview #pool-overview-values {grid-column:1 / -1;grid-row:2;height:auto;gap:6px;align-items:start}
#pool-overview #pool-overview-values span {height:auto;min-height:13px;font-size:10px;line-height:13px;overflow:visible}
#pool-overview #pool-overview-values strong {height:auto;font-size:18px;line-height:20px;overflow:visible;overflow-wrap:anywhere;white-space:normal}
body.position-pool-only #content > #pool-overview.pool-overview {display:grid!important}
@media(max-width:360px){
  #pool-overview.pool-overview {padding:4px 8px}
  #pool-overview #pool-overview-values strong {font-size:16px;line-height:20px}
}
.defi-chart-loading{position:absolute;left:12px;right:12px;top:46px;z-index:3;padding:6px 8px;border-radius:6px;background:rgba(12,17,24,.9);color:#c7d4e1;font:11px/1.35 system-ui;text-align:center;pointer-events:none}
.defi-chart-loading[hidden]{display:none}
