#stdPanes { display: contents; }
#chartCol { min-height: 0; overflow: hidden; }
#chartCol:has(.stdPane) #price { min-height: 120px; }
.stdPane { flex: 2.2 1 0; min-height: 56px; display: flex; flex-direction: column; min-width: 0; }
.stdSplit { height: 5px; flex: none; cursor: ns-resize; background: var(--border); touch-action: none; }
.stdSplit:hover, .stdSplit.drag { background: var(--orange); }
.stdBody { flex: 1; min-height: 0; position: relative; }
.stdLegend { position: absolute; left: 8px; top: 4px; z-index: 3; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; max-width: calc(100% - 110px); max-height: calc(100% - 36px); overflow: hidden; pointer-events: none; }
.lgTotals { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.lgRow { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 2px 8px; max-width: 100%; background: color-mix(in srgb, var(--panel) 82%, transparent); border: 1px solid var(--border); border-radius: 6px; padding: 0 3px 0 7px; min-height: 22px; font-size: 11px; color: var(--muted); pointer-events: auto; }
.stdLabel { position: static; }
.lgHead { display: flex; align-items: flex-start; gap: 2px; min-width: 0; max-width: 100%; pointer-events: none; }
.stdBody > .lgHead, #zpane > .lgHead { position: absolute; left: 8px; top: 4px; z-index: 3; max-width: calc(100% - 16px); }
.lgHead[hidden], .lgHead.folded .lgRows { display: none; }
.lgRows { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-width: 0; max-width: 100%; }
.lgRows .paneLabel { position: static; }
.lgChev { pointer-events: auto; flex: none; display: inline-flex; align-items: center; justify-content: center; gap: 4px; min-width: 22px; min-height: 22px; padding: 0 4px; border: 1px solid var(--border); border-radius: 6px; background: color-mix(in srgb, var(--panel) 82%, transparent); color: var(--text); font: inherit; font-size: 11px; font-weight: 600; white-space: nowrap; cursor: pointer; }
.lgChev:hover, .lgChev:focus-visible { background: var(--panel2); }
.lgChev svg { transition: transform .12s; }
.lgChev[aria-expanded=true] svg { transform: rotate(90deg); }
.lgHead:not(.folded) .lgCount { display: none; }
.stdLegend:has(.lgHead:not(.folded) .lgRow) { overflow-y: auto; }
.lgName { color: var(--text); font-weight: 600; white-space: nowrap; }
.lgVals { display: inline-flex; gap: 8px; }
.lgVal { font-variant-numeric: tabular-nums; white-space: nowrap; }
.lgRow.hid .lgName, .lgRow.hid .lgVal { opacity: .45; text-decoration: line-through; text-decoration-color: rgba(136,153,170,.5); }
.lgBtns { display: inline-flex; margin-left: auto; opacity: 0; transition: opacity .12s; }
.lgRow:hover .lgBtns, .lgRow:focus-within .lgBtns, .lgRow.sel .lgBtns { opacity: 1; }
.lgBtn { border: 0; background: none; color: var(--muted); padding: 0; width: 22px; height: 22px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; border-radius: 4px; }
.lgBtn:hover, .lgBtn:focus-visible { color: var(--text); background: var(--panel2); }
.lgBtn.lgDel:hover { color: var(--bear); }
.ipModal { position: fixed; inset: 0; z-index: 400; background: rgba(0,0,0,.6); display: flex; align-items: center; justify-content: center; font-family: inherit; }
.ipBox { width: min(720px, 94vw); height: min(560px, 86vh); display: flex; flex-direction: column; overflow: hidden; background: var(--panel); border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 16px 50px rgba(0,0,0,.6); color: var(--text); }
.ipHead { display: flex; align-items: center; gap: 8px; padding: 10px; border-bottom: 1px solid var(--border); flex: none; }
.ipSearch { flex: 1; min-width: 0; background: var(--panel2); border: 1px solid var(--border); border-radius: 8px; color: var(--text); font: inherit; font-size: 15px; padding: 9px 12px; }
.ipSearch:focus { outline: 2px solid var(--orange); outline-offset: -1px; }
.ipClose { padding: 0; border: 0; background: none; color: var(--muted); width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; border-radius: 8px; flex: none; }
.ipClose:hover, .ipClose:focus-visible { color: var(--text); background: var(--panel2); }
.ipBody { flex: 1; min-height: 0; display: flex; }
.ipCats { width: 178px; flex: none; overflow-y: auto; padding: 8px; border-right: 1px solid var(--border); display: flex; flex-direction: column; gap: 2px; }
.ipCat { text-align: left; border: 0; background: none; color: var(--muted); font: inherit; font-size: 13px; padding: 8px 10px; border-radius: 8px; cursor: pointer; }
.ipCat:hover, .ipCat:focus-visible { background: var(--panel2); color: var(--text); }
.ipCat.sel { background: rgba(255,107,0,.14); color: var(--orangeText, var(--orange)); font-weight: 700; }
.ipList { flex: 1; min-width: 0; overflow-y: auto; padding: 6px 8px 10px; outline: none; }
.ipGroup { margin: 12px 8px 4px; font-size: 10px; letter-spacing: .8px; text-transform: uppercase; color: var(--orangeText, var(--orange)); }
.ipRow { display: flex; align-items: center; gap: 8px; min-height: 52px; padding: 6px 8px; border-radius: 8px; cursor: pointer; border: 1px solid transparent; }
.ipRow:hover { background: var(--panel2); }
.ipRow.hl { background: var(--panel2); border-color: var(--orange); }
.ipRow.off { opacity: .55; cursor: not-allowed; }
.ipMain { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ipName { font-weight: 700; font-size: 13px; }
.ipTag { color: var(--muted); font-size: 11px; font-weight: 400; margin-left: 8px; }
.ipDesc { color: var(--muted); font-size: 12px; line-height: 1.3; }
.ipBadge { font-size: 11px; color: var(--orangeText, var(--orange)); white-space: nowrap; min-width: 0; }
.ipRow.isOn .ipBadge { color: var(--bull); font-weight: 700; }
.ipFlash { font-size: 11px; font-weight: 700; color: var(--onBull, #04140d); background: var(--bull); border-radius: 6px; padding: 1px 7px; display: none; }
.ipFlash.on { display: inline-block; }
.ipStar { padding: 0; border: 0; background: none; color: var(--muted); width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; border-radius: 8px; flex: none; }
.ipStar:hover { color: #f6c445; background: var(--panel); }
.ipStar.on { color: #f6c445; }
.ipStar.on svg { fill: #f6c445; }
.ipNone { color: var(--muted); font-size: 13px; padding: 24px 12px; text-align: center; line-height: 1.5; }
.ipFoot { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-top: 1px solid var(--border); flex: none; min-height: 40px; }
.ipStyle { background: var(--panel2); border: 1px solid var(--border); border-radius: 6px; color: var(--text); font: inherit; font-size: 12px; padding: 4px 6px; max-width: 150px; }
.ipStatus { flex: 1; min-width: 0; font-size: 12px; color: var(--muted); }
.ipStatus.warn { color: var(--warnText, #ffa726); }
.ipKeys { font-size: 11px; color: var(--muted); text-align: right; }
.ipAdded { flex: none; max-height: 32%; overflow-y: auto; padding: 6px 10px 8px; border-bottom: 1px solid var(--border); }
.iaHead { font-size: 10px; letter-spacing: .8px; text-transform: uppercase; color: var(--orangeText, var(--orange)); margin: 2px 2px 4px; }
.iaNone { color: var(--muted); font-size: 12px; padding: 2px 2px 4px; }
.iaList { display: flex; flex-wrap: wrap; gap: 4px 6px; }
.iaRow { display: inline-flex; align-items: center; gap: 2px; max-width: 100%; border: 1px solid var(--border); border-radius: 8px; background: var(--panel2); padding: 0 2px 0 0; }
.iaRow.hid .iaText, .iaRow.hid .iaSw { opacity: .45; }
.iaName { display: inline-flex; align-items: center; gap: 6px; min-width: 0; min-height: 30px; padding: 0 8px; border: 0; background: none; color: var(--text); font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; border-radius: 8px; }
.iaName[aria-disabled="true"] { cursor: default; }
.iaName:hover:not([aria-disabled="true"]), .iaName:focus-visible { background: var(--panel); }
.iaText { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.iaSw { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.iaRow .lgBtn { width: 28px; height: 28px; }
.stSide { justify-content: flex-end; align-items: stretch; }
.stBox { width: min(380px, 100vw); height: 100%; display: flex; flex-direction: column; background: var(--panel); border-left: 1px solid var(--border); box-shadow: -12px 0 40px rgba(0,0,0,.5); color: var(--text); overflow: hidden; }
.stHead { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 10px 10px 16px; border-bottom: 1px solid var(--border); flex: none; }
.stHead h4 { margin: 0; font-size: 15px; text-transform: none; letter-spacing: 0; color: var(--text); }
.stTabs { display: flex; gap: 2px; padding: 8px 10px 0; border-bottom: 1px solid var(--border); flex: none; }
.stTab { border: 0; border-bottom: 2px solid transparent; background: none; color: var(--muted); font: inherit; font-size: 13px; padding: 8px 12px; cursor: pointer; }
.stTab.sel { color: var(--text); border-bottom-color: var(--orange); font-weight: 700; }
.stForm { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.stPanel { flex: 1; overflow-y: auto; padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; align-content: flex-start; }
.stPanel[hidden] { display: none; }
.stField { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 13px; color: var(--muted); min-height: 34px; }
.stField input, .stField select { background: var(--panel2); border: 1px solid var(--border); border-radius: 6px; color: var(--text); font: inherit; padding: 6px 8px; width: 150px; }
.stField input[type=color] { padding: 0 2px; height: 30px; width: 56px; }
.stField input[type=checkbox] { width: 18px; height: 18px; }
.stRadio { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--text); min-height: 34px; }
.stNote { margin: 0; font-size: 12px; color: var(--muted); line-height: 1.4; }
.stNote.warn { color: var(--warnText, #ffa726); }
.stActions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); border-top: 1px solid var(--border); flex: none; }
.stBtn { border: 1px solid var(--border); background: var(--panel2); color: var(--text); border-radius: 8px; padding: 8px 12px; font: inherit; font-size: 12px; cursor: pointer; }
.stBtn.stGo { background: var(--orange); border-color: var(--orange); color: var(--onOrange, #04080f); font-weight: 700; }
.stBtn.danger { margin-right: auto; color: var(--bear); }
#stdHint { position: fixed; left: 50%; top: 10px; transform: translateX(-50%); z-index: 95; background: var(--orange); color: var(--onOrange, #04080f); font-weight: 700; font-size: 12px; padding: 6px 14px; border-radius: 8px; }
#price.stdPicking, #price.stdPicking * { cursor: crosshair !important; }
@media (pointer: coarse) {
  .stdSplit { height: 12px; }
  .lgBtns { opacity: 1; }
  .lgBtn { width: 30px; height: 30px; }
  .lgRow { min-height: 30px; }
  .lgChev { min-width: 44px; min-height: 44px; }
  .iaName { min-height: 44px; }
  .iaRow .lgBtn { width: 44px; height: 44px; }
}
@media (max-width: 600px) {
  .stdPane { min-height: 72px; }
  .stdLabel { max-width: calc(100vw - 70px); }
  .lgRow { flex-wrap: nowrap; }
  .lgRow .lgName { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
  .lgRow .lgBtns { display: none; }
  .lgRow.sel { flex-wrap: wrap; }
  .lgRow.sel .lgBtns { display: inline-flex; }
  .stdLabel { min-height: 44px; padding: 0 3px 0 0; border: 0; background: none; }
  .stdLabel .lgName { display: inline-flex; align-items: center; min-height: 44px; padding: 0 8px; border-radius: 6px; background: linear-gradient(color-mix(in srgb, var(--panel) 72%, transparent), color-mix(in srgb, var(--panel) 72%, transparent)) center / 100% 22px no-repeat; }
  .stdLabel.sel { background: color-mix(in srgb, var(--panel) 90%, transparent); border: 1px solid var(--border); }
  .lgBtn { width: 44px; height: 44px; }
  .lgChev { min-width: 44px; min-height: 44px; }
  .ipModal { align-items: stretch; }
  .ipBox { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; border: 0; border-radius: 0; padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); }
  .ipSearch { font-size: 16px; }
  .ipBody { flex-direction: column; }
  .ipCats { width: auto; flex-direction: row; overflow-x: auto; overflow-y: hidden; border-right: 0; border-bottom: 1px solid var(--border); padding: 6px 8px; gap: 6px; flex: none; }
  .ipCat { white-space: nowrap; padding: 9px 14px; border: 1px solid var(--border); border-radius: 18px; font-size: 14px; flex: none;  min-height: 44px; }
  .ipStar, .ipClose { width: 44px; height: 44px; }
  .ipStyle { min-height: 44px; font-size: 16px; }
  .stTab { min-height: 44px; }
  .stBtn { min-height: 44px; padding: 10px 14px; font-size: 14px; }
  .stField, .stRadio { min-height: 44px; }
  .stField input, .stField select { min-height: 44px; }
  .stField input[type=color] { height: 44px; }
  .ipRow { min-height: 52px; }
  .ipKeys { display: none; }
  .iaName { min-height: 44px; }
  .iaRow .lgBtn { width: 44px; height: 44px; }
  .stBox { width: 100vw; border-left: 0; padding: env(safe-area-inset-top) env(safe-area-inset-right) 0 env(safe-area-inset-left); }
  .stField input, .stField select { font-size: 16px; }
  .lgRow { font-size: 11px; }
}
