
:root {
  --page: #0b0e14;
  --panel: rgba(32, 24, 22, 0.6);
  --bg: #131722;
  --panel-solid: #181513;
  --line: #2a2e3e;      
  --line-2: #3a3f52;    
  --fg: #d1d4dc;        
  --fg-dim: #9a9dab;    
  --muted: #787b86;     
  --dim: #5b5f6e;       
  --accent: #8a4a3d;    
  --accent-2: #a35c4c;  
  --accent-fg: #d9917a; 
  --accent-soft: rgba(138, 74, 61, 0.12);  
  --accent-line: rgba(138, 74, 61, 0.3);
  --ok: #26a69a;        
  --err: #ef5350;       
  --glass: blur(18px) saturate(160%);
  --header-h: 52px;
}
[hidden] { display: none !important; }
* { box-sizing: border-box; }
html { background: var(--page); }
body {
  margin: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  background: transparent;
  color: var(--fg);
  font: 13px/1.5 -apple-system, "Segoe UI", "Malgun Gothic", sans-serif;
}
body::before,
body::after {
  content: "";
  position: fixed;
  border-radius: 50%;
  filter: blur(10px);
  pointer-events: none;
  z-index: -1;
}
body::before {
  width: 38vw;
  height: 38vw;
  min-width: 420px;
  min-height: 420px;
  top: -9vh;
  right: -5vw;
  background: radial-gradient(circle, rgba(138, 74, 61, .55), transparent 70%);
}
body::after {
  width: 34vw;
  height: 34vw;
  min-width: 380px;
  min-height: 380px;
  bottom: -8vh;
  left: 9vw;
  background: radial-gradient(circle, rgba(38, 166, 154, .22), transparent 70%);
}
header,
#sym-head, #rail, #favorites, #flyout,
.pop, .modal, .float,
#chats, #cond, .bub {
  backdrop-filter: var(--glass);
  -webkit-backdrop-filter: var(--glass);
}
header, #chats, #cond, #rail, #favorites, #sym-head {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05);
}
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: var(--line); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--line-2); }
::-webkit-scrollbar-track { background: transparent; }
.ico {
  width: 24px;
  height: 24px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
header {
  display: flex;
  align-items: center;
  gap: 14px;
  height: var(--header-h);
  flex: none;
  padding: 0 16px;
  border-bottom: 1px solid var(--line);
  background: var(--panel);
  position: relative;
  z-index: 5;
}
.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .2px;
  white-space: nowrap;
  color: var(--fg);
  text-decoration: none;
}
a.brand:hover .brand-word { color: var(--accent-fg); }
.brand-mark { width: 26px; height: 26px; flex: none; }
.brand-word {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: .1em;
}
.spacer { flex: 1; }
.status {
  position: fixed;
  top: calc(var(--header-h) + 9px);
  left: 50%;
  z-index: 220;                    
  display: inline-block;
  max-width: min(72vw, 560px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--fg-dim);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 16px 7px 31px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .35);
  backdrop-filter: var(--glass);
  -webkit-backdrop-filter: var(--glass);
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -8px);
  transition: opacity .18s ease, transform .18s ease;
}
.status.show {
  opacity: 1;
  transform: translate(-50%, 0);
  pointer-events: auto;
}
.loading {
  position: fixed;
  top: calc(var(--header-h) + 9px);
  left: 50%;
  z-index: 219;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: min(72vw, 560px);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--fg-dim);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 16px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .35);
  backdrop-filter: var(--glass);
  -webkit-backdrop-filter: var(--glass);
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -8px);
  transition: opacity .18s ease, transform .18s ease;
}
.loading.show {
  opacity: 1;
  transform: translate(-50%, 0);
}
#loading-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.loading-track {
  position: relative;
  flex: none;
  width: 64px;
  height: 3px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--line);
}
.loading-track > i {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 45%;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, var(--accent-fg), transparent);
  animation: loading-slide 1.05s linear infinite;
}
@keyframes loading-slide {
  from { transform: translateX(-100%); }
  to   { transform: translateX(240%); }
}
@media (prefers-reduced-motion: reduce) {
  .loading-track > i {
    width: 100%;
    background: var(--accent-fg);
    animation: loading-pulse 1.6s ease-in-out infinite;
  }
  @keyframes loading-pulse {
    0%, 100% { opacity: .25; }
    50%      { opacity: .9; }
  }
}
.status::before {
  content: "✓";
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  color: var(--muted);
}
.status:empty,
.status { cursor: pointer; }
.status.ok {
  color: var(--ok);
  background: rgba(38, 166, 154, .12);
  border-color: rgba(38, 166, 154, .35);
}
.status.ok::before { content: "✓"; color: var(--ok); }
.status.err {
  color: var(--err);
  font-weight: 700;
  background: rgba(239, 83, 80, .14);
  border-color: rgba(239, 83, 80, .4);
}
.status.err::before {
  content: "!";
  color: var(--err);
  font-size: 14px;
  font-weight: 900;
}
#settings-toggle {
  display: flex;
  align-items: center;
  gap: 7px;
  flex: none;
  margin: 0;
  padding: 8px 13px;
  font-size: 13px;
}
#settings-toggle { padding: 7px; }
#settings-toggle .ico { width: 17px; height: 17px; stroke-width: 1.8; }
#sym-box { position: relative; flex: none; }
#sym-input {
  width: 142px;
  height: 34px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .3px;
}
#sym-input:focus { outline: none; border-color: var(--accent); }
#sym-list {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 240;
  width: 260px;
  max-height: 320px;
  overflow-y: auto;
  background: var(--panel-solid);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, .5);
  padding: 4px;
}
#sym-list.hidden { display: none; }
.sym-item {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 7px 8px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 12px;
}
.sym-item:hover { background: var(--bg); }
.sym-item.on { background: var(--bg); }
.sym-item.on b { color: var(--accent-fg); }
.sym-item b {
  flex: 1;
  min-width: 0;
  font-size: 12.5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sym-item em {
  flex: none;
  font-style: normal;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: .3px;
}
.sym-item.add { border-top: 1px solid var(--line); margin-top: 4px; padding-top: 8px; }
.sym-item.add b { color: var(--ok); flex: none; }
.sym-empty { color: var(--muted); font-size: 11px; padding: 10px; text-align: center; }
.seg {
  display: flex;
  align-items: center;
  flex: none;
  gap: 2px;
  padding: 3px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 6px;
}
.seg button {
  width: auto;
  margin: 0;
  padding: 7px 11px;
  border: none;
  border-radius: 4px;
  background: none;
  color: var(--muted);
  font-size: 13px;
}
.seg button.seg-gap { margin-left: 9px; position: relative; }
.seg button.seg-gap::before {
  content: "";
  position: absolute;
  left: -5px;
  top: 3px;
  bottom: 3px;
  width: 1px;
  background: var(--line);
}
.seg button:hover { background: rgba(255, 255, 255, .05); color: var(--fg); }
.seg button.on { background: var(--accent); color: #fff; }
.res-fold .ico {
  width: 13px;
  height: 13px;
  stroke-width: 2.2;
  pointer-events: none;
}
.res-menu { min-width: 0; padding: 6px; }
.res-menu button {
  padding: 7px 9px;
  text-align: center;
  font-size: 13px;
}
.res-menu button:first-child { margin-top: 0; }
.res-menu button.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.res-menu button.on:hover { background: var(--accent-2); border-color: var(--accent-2); }
main {
  flex: 1;
  display: grid;
  grid-template-columns: 68px 1fr 246px;
  min-height: 0;
  position: relative;
}
body.fav-closed main { grid-template-columns: 68px 1fr 30px; }
#stage {
  display: grid;
  grid-template-rows: auto 1fr;
  min-width: 0;
  min-height: 0;
}
#chart { min-height: 0; background: var(--bg); position: relative; overflow: hidden; }
#chart-water {
  position: absolute;
  left: 16px;
  bottom: 34px;          
  pointer-events: none;
  z-index: 1;
  font-size: 40px;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.05;
  color: var(--fg);
  opacity: 0.06;
  user-select: none;
  white-space: pre-line;
}
#chart-water .sub { font-size: 18px; font-weight: 500; }
#chart-text { position: absolute; z-index: 5; }
#chart-text .ct-input {
  display: block;
  min-width: 140px;
  padding: 0;
  font-family: -apple-system, "Segoe UI", "Malgun Gothic", sans-serif;
  font-weight: 700;
  line-height: 1.2;
  background: transparent;   
  border: 0;
  border-bottom: 1px dashed currentColor;
  outline: none;
}
#chart-text .ct-input::placeholder { color: var(--dim); font-weight: 400; }
#chart-text .ct-bar {
  display: flex;
  gap: 4px;
  align-items: center;
  margin-bottom: 4px;
  padding: 3px 5px;
  background: var(--panel-solid);
  border: 1px solid var(--line);
  border-radius: 4px;
  width: max-content;
}
#chart-text .ct-size {
  width: 46px;
  padding: 1px 4px;
  font: 12px/1.4 inherit;
  color: var(--fg);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 3px;
}
#chart-text .ct-color {
  width: 14px; height: 14px;
  padding: 0;
  border: 1px solid var(--line-2);
  border-radius: 50%;
  cursor: pointer;
}
#chart-text .ct-color.on { outline: 2px solid var(--fg); outline-offset: 1px; }
#sym-head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-areas:
    "logo id    star"
    "logo quote star";
  align-items: center;
  column-gap: 12px;
  padding: 7px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--panel);
}
#sh-logo { grid-area: logo; display: flex; }
.sh-id { grid-area: id; display: flex; align-items: baseline; gap: 7px; min-width: 0; }
#sh-name {
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
#sh-tick { color: var(--muted); font-size: 11.5px; letter-spacing: .4px; flex: none; }
.sh-quote { grid-area: quote; display: flex; align-items: baseline; gap: 9px; }
#sh-price { font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; }
#sh-chg { font-size: 12px; font-variant-numeric: tabular-nums; color: var(--muted); }
#sh-star {
  grid-area: star;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  margin: 0;
  padding: 0;
  font-size: 17px;
  line-height: 1;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--line-2);
}
#sh-star:hover { border-color: var(--line-2); color: var(--fg-dim); }
#sh-star.on { color: var(--accent-fg); border-color: var(--accent-line); }
#rail {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 12px 0;
  border-right: 1px solid var(--line);
  background: var(--panel);
  overflow-y: auto;
  z-index: 4;
}
#rail button {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 58px;
  height: 60px;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 9px;
  background: none;
  color: var(--muted);
}
#rail button em {
  font-style: normal;
  font-size: 11px;
  line-height: 1;
  color: currentColor;
}
#rail button:hover { background: rgba(255, 255, 255, .05); color: var(--fg); }
#rail button.on { background: var(--accent-soft); color: var(--accent-fg); }
#rail .spacer { flex: 1; }
.rail-sep {
  width: 38px;
  height: 1px;
  background: var(--line);
  margin: 7px 0;
  flex: none;
}
#magnet-btn { height: 68px; }
#magnet-dots {
  font-style: normal;
  font-size: 13px;
  line-height: 9px;
  letter-spacing: 3px;
  padding: 3px 8px 3px 11px;
  border-radius: 7px;
  background: rgba(138, 74, 61, .22);
  color: var(--accent-fg);
}
#magnet-dots:empty { display: none; }
#favorites {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--panel);
  border-left: 1px solid var(--line);
  overflow: hidden;
}
#fav-head {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 9px 8px 9px 10px;
  border-bottom: 1px solid var(--line);
  font-size: 11.5px;
  white-space: nowrap;
}
#fav-head .spacer { flex: 1; }
.fav-sub { color: var(--muted); font-size: 10.5px; font-variant-numeric: tabular-nums; }
.fav-sub:empty { display: none; }
.fav-sub.full { color: var(--err); font-weight: 700; }
#fav-head button {
  width: auto;
  margin: 0;
  padding: 2px 6px;
  font-size: 12px;
  line-height: 1;
  background: transparent;
  border: none;
  color: var(--fg-dim);
}
#fav-head button:hover { color: var(--fg); }
#fav-toggle { transition: transform .18s; }
body.fav-closed #fav-toggle { transform: rotate(180deg); }
body.fav-closed #fav-head > *:not(#fav-toggle) { display: none; }
body.fav-closed #fav-head { padding: 9px 4px; }
body.fav-closed #fav-body { display: none; }
#fav-body { flex: 1; overflow-y: auto; padding: 4px; }
.fav-empty { color: var(--muted); font-size: 10.5px; line-height: 1.6; padding: 10px 6px; }
.fav-row {
  display: grid;
  grid-template-columns: 22px 1fr auto 14px 16px;
  grid-template-areas: "logo name price off grip" "logo name chg off grip";
  align-items: center;
  gap: 0 7px;
  padding: 7px 5px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12.5px;
}
.fav-row > .logo.logo-sm { width: 22px; height: 22px; font-size: 11px; }
.fav-row:hover { background: var(--line-2); }
.fav-row.on { background: var(--line-2); box-shadow: inset 2px 0 0 var(--accent-fg); }
.fav-row.dragging { opacity: .45; }
.fav-row > .logo { grid-area: logo; }
.fav-grip {
  grid-area: grip;
  color: var(--line);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -3px;
  line-height: 1;
  text-align: center;
  cursor: grab;
  align-self: stretch;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
  touch-action: none;
}
.fav-row:hover .fav-grip { color: var(--fg-dim); }
.fav-grip:hover { color: var(--accent-fg); }
.fav-grip:active { cursor: grabbing; }
.fav-row.dragging .fav-grip { color: var(--accent-fg); }
.fav-name {
  grid-area: name;
  font-size: 13px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.fav-price {
  grid-area: price;
  font-variant-numeric: tabular-nums;
  text-align: right;
  white-space: nowrap;
}
.fav-live {
  display: inline-block;
  margin-right: 4px;
  padding: 0 3px;
  border: 1px solid var(--line);
  border-radius: 3px;
  font-size: 9px;
  font-style: normal;
  font-weight: 600;
  line-height: 13px;
  color: var(--muted);
  vertical-align: 1px;
}
.fav-chg {
  grid-area: chg;
  font-size: 11px;
  text-align: right;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.fav-off {
  grid-area: off;
  width: auto;
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  color: transparent;
  font-size: 12px;
  line-height: 1;
}
.fav-row:hover .fav-off { color: var(--fg-dim); }
.fav-off:hover { color: var(--err) !important; }
.logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  border-radius: 50%;
  overflow: hidden;
  color: #fff;
  font-weight: 700;
  line-height: 1;
  user-select: none;
}
.logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 50%;
  background: #fff;
}
.logo-sm { width: 18px; height: 18px; font-size: 9.5px; }
.logo-md { width: 26px; height: 26px; font-size: 13px; }
#flyout {
  position: absolute;
  top: 0;
  left: 68px;
  bottom: 0;
  z-index: 120;
  width: 310px;
  display: flex;
  flex-direction: column;
  background: var(--panel);
  border-right: 1px solid var(--line);
  box-shadow: 8px 0 24px rgba(0, 0, 0, .35);
}
#flyout.hidden { display: none; }
#flyout > section {
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  padding: 14px;
}
#flyout > section > * { flex-shrink: 0; }
.fly-head {
  display: flex;
  align-items: center;
  height: 44px;
  flex: none;
  padding: 0 8px 0 14px;
  border-bottom: 1px solid var(--line);
}
.fly-head b { font-size: 13px; font-weight: 700; }
.fly-head button {
  width: 26px;
  height: 26px;
  margin: 0;
  padding: 0;
  font-size: 15px;
  line-height: 1;
  border-color: transparent;
  background: none;
  color: var(--muted);
}
.fly-head button:hover { background: rgba(255, 255, 255, .06); color: var(--fg); }
#flyout h3 {
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: .3px;
  margin: 16px 0 8px;
}
#flyout h3:first-child { margin-top: 0; }
input, select, button {
  width: 100%;
  padding: 7px 9px;
  background: var(--bg);
  color: var(--fg);
  border: 1px solid var(--line);
  border-radius: 6px;
  font: inherit;
  font-size: 12px;
}
input:focus, select:focus { outline: none; border-color: var(--accent); }
input[type="number"] {
  appearance: textfield;
  -moz-appearance: textfield;
}
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
header select, header button, header input { width: auto; }
.ai-page header > button:not(#settings-toggle) {
  min-width: 76px;
  padding: 7px 9px;
  font-size: 12px;
  text-align: center;
}
button { cursor: pointer; margin-top: 4px; }
button:hover { border-color: var(--line-2); }
button.primary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px;
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  font-size: 12.5px;
  font-weight: 600;
}
button.primary:hover { background: var(--accent-2); border-color: var(--accent-2); }
button.primary .ico { width: 17px; height: 17px; stroke-width: 1.8; }
button.danger { color: var(--err); border-color: rgba(239, 83, 80, .4); background: transparent; }
button.danger:hover { background: rgba(239, 83, 80, .1); border-color: var(--err); }
#flyout > section > label,
.modal > label {
  display: grid;
  grid-template-columns: 62px 1fr;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  font-size: 11.5px;
  color: var(--muted);
}
.field { display: flex; align-items: center; gap: 7px; }
.field input { flex: 1; width: auto; min-width: 0; }
.field em { font-style: normal; font-size: 11.5px; color: var(--muted); flex: none; }
.row { display: flex; gap: 8px; }
.row > * { flex: 1; }
.hint { color: var(--muted); font-size: 11px; line-height: 1.6; margin: 8px 0; }
.tip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 13px;
  height: 13px;
  margin-left: 4px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--dim, #6b7280);
  font-style: normal;
  font-size: 9px;
  font-weight: 700;
  line-height: 1;
  vertical-align: middle;
  cursor: help;
  user-select: none;
}
.tip:hover, .tip:focus { color: var(--fg); border-color: var(--accent); outline: none; }
.lim-row, .wh-add-row { align-items: flex-end; }
.lim-row > button { flex: 0 0 auto; width: auto; padding-inline: 14px; }
.lim-row .lbl { display: flex; align-items: center; white-space: nowrap; }
.lim-row > label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  margin: 0;
  font-size: 11.5px;
  color: var(--muted);
}
.wh-add-row > label { flex: 7 1 0; min-width: 0; margin: 0; }
.wh-add-row > button { flex: 3 1 0; width: auto; min-width: 0; }
.warn {
  color: var(--err);
  font-size: 11px;
  line-height: 1.5;
  margin: 0 0 10px;
  padding: 7px 10px;
  border: 1px solid rgba(239, 83, 80, .35);
  border-radius: 6px;
  background: rgba(239, 83, 80, .08);
}
.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 8px;
}
.grid button {
  margin-top: 0;
  padding: 12px 6px;
  font-size: 12px;
  color: var(--fg-dim);
}
.grid button:hover { border-color: var(--accent-fg); color: var(--fg); }
.grid button.on { background: var(--accent); border-color: var(--accent); color: #fff; }
#indicators h4 {
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
  margin: 0 0 8px;
}
#indicators h4 + .grid { margin-bottom: 16px; }
#indicators h4:not(:first-child) { margin-top: 2px; }
.ind-item {
  display: flex;
  align-items: center;
  gap: 2px;
  padding-right: 4px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 7px;
}
.ind-item:hover { border-color: var(--line-2); }
.ind-item:has(button.on) {
  background: var(--accent-soft);
  border-color: var(--accent-line);
}
.ind-item > button {
  margin: 0;
  background: none;
  border: none;
  border-radius: 6px;
}
.ind-item > button[data-ind] {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: left;
  padding: 9px 4px 9px 10px;
  color: var(--fg-dim);
}
.ind-item > button[data-ind].on { color: var(--fg); font-weight: 600; }
.ind-cfg {
  width: 20px;
  flex: none;
  padding: 0;
  font-size: 12px;
  color: var(--accent-fg);
}
.ind-cfg:hover { color: #8fb4ff; }
.ind-cfg.hidden { display: none; }
#ind-add.hidden { display: none; }
.lv-del.hidden { visibility: hidden; }
.list { margin-bottom: 8px; }
.list .item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
  padding: 7px 8px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 6px;
  margin-bottom: 4px;
  font-size: 11.5px;
}
.list .item em { color: var(--muted); font-style: normal; font-size: 11px; }
.list .item > span:first-child { min-width: 0; }
.list .item button {
  width: auto;
  margin: 0 0 0 3px;
  padding: 4px 7px;
  font-size: 10px;
}
.list .item button.on { background: var(--ok); border-color: var(--ok); color: #fff; }
.list .item.off { opacity: .5; }
.list .item.off:hover { opacity: .8; }
.list .item > span:first-child { overflow: hidden; text-overflow: ellipsis; }
.list .item > span:last-child { flex: none; white-space: nowrap; }
#watcher {
  padding: 9px 10px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--fg-dim);
  margin: 0 0 8px;
}
table { width: 100%; border-collapse: collapse; margin-top: 12px; font-size: 11.5px; }
th { color: var(--muted); font-weight: 500; text-align: left; }
th, td { padding: 5px 4px; border-bottom: 1px solid var(--line); }
td:nth-child(2), td:nth-child(3) { text-align: right; font-variant-numeric: tabular-nums; }
tr.touched { color: var(--ok); font-weight: 600; }
.c-server { color: var(--ok); }
.c-up { color: var(--ok); }
.c-down { color: var(--err); }
.c-err { color: var(--err); }
.pop {
  position: fixed;
  z-index: 100;
  min-width: 170px;
  padding: 8px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, .5);
}
.pop.hidden { display: none; }
.pop-title {
  font-size: 11px;
  color: var(--muted);
  padding: 0 2px 7px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 6px;
}
.pop button {
  margin-top: 2px;
  text-align: left;
  border-color: transparent;
  background: none;
}
.pop button:hover { background: var(--bg); border-color: var(--line); }
.pop label { margin-bottom: 6px; }
.backdrop {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, .55);
}
.backdrop.hidden { display: none; }
#exit-pop { z-index: 210; }
.modal {
  width: 300px;
  max-height: 82vh;
  overflow-y: auto;
  padding: 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, .6);
}
.modal-title {
  display: flex;
  align-items: center;
  font-size: 13px;
  font-weight: 700;
  padding-bottom: 11px;
  margin-bottom: 13px;
  border-bottom: 1px solid var(--line);
}
.modal-title button {
  width: auto;
  margin: 0;
  padding: 2px 8px;
  font-size: 14px;
  line-height: 1;
}
.modal.ask { width: min(520px, 92vw); }
.ask-q { margin-bottom: 15px; }
.ask-q:last-child { margin-bottom: 4px; }
.ask-q > b {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--fg);
  margin-bottom: 7px;
}
.ask-opts { display: flex; flex-direction: column; gap: 5px; }
.ask-opts button {
  width: 100%;
  margin: 0;
  padding: 8px 10px;
  text-align: left;
  font-size: 12px;
  line-height: 1.45;
  background: var(--bg);
  border: 1px solid var(--line);
  color: var(--fg);
}
.ask-opts button:hover { border-color: var(--line-2); background: rgba(255, 255, 255, .04); }
.ask-opts button.on {
  background: var(--accent);
  border-color: var(--accent-2);
  color: #fff;
}
.ask-opts em {
  display: block;
  font-style: normal;
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
}
.ask-opts button.on em { color: rgba(255, 255, 255, .75); }
.modal.wide {
  width: min(880px, 92vw);
  max-height: 86vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;      
}
#set-pop .modal.wide { height: min(660px, 86vh); }
.set-body {
  display: grid;
  grid-template-columns: 132px 1fr;
  gap: 16px;
  min-height: 0;         
  flex: 1;
}
#set-nav {
  display: flex;
  flex-direction: column;
  gap: 3px;
  border-right: 1px solid var(--line);
  padding-right: 12px;
  overflow-y: auto;
}
#set-nav button {
  width: 100%;
  margin: 0;
  padding: 8px 10px;
  text-align: left;
  font-size: 11.5px;
  background: transparent;
  border-color: transparent;
}
#set-nav button:hover { background: var(--bg); border-color: var(--line); }
#set-nav button.on {
  background: var(--bg);
  border-color: var(--line-2);
  color: var(--accent-fg);
  font-weight: 600;
}
#set-main { overflow-y: auto; padding-right: 4px; }
#set-main h3:first-child { margin-top: 0; }
#set-safety { margin-top: 22px; }
.save-stages { display: grid; gap: 6px; margin-bottom: 10px; }
.save-stages > h4 {
  margin: 0; font-size: 11.5px; font-weight: 600; color: var(--muted);
}
.stage-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto auto;
  align-items: center;
  gap: 8px;
}
.stage-row .stage-where {
  min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: 12px; color: var(--fg-dim);
}
.stage-row .stage-what { font-size: 11px; font-weight: 700; }
.stage-row .stage-what.buy { color: var(--ok); }
.stage-row .stage-what.sell { color: var(--err); }
.stage-row .stage-all { font-size: 12px; color: var(--muted); }
.stage-row .field { width: auto; }
.stage-row .field input { width: 92px; }
.stage-row .stage-unit button { padding: 4px 8px; font-size: 11px; }
#acct-halt { display: flex; }
#acct-halt > button { flex: 1; }
.pos-foot { display: flex; justify-content: flex-end; margin-top: 10px; }
button.sm { width: auto; margin: 0; padding: 5px 10px; font-size: 11px; }
.bal-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}
.bal-card {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
}
.bal-card em {
  display: block;
  font-style: normal;
  font-size: 10.5px;
  color: var(--muted);
  margin-bottom: 5px;
}
.bal-card b .krw {
  font-style: normal;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0;
}
.bal-card .fx {
  display: block;
  margin-top: 5px;
  font-size: 10.5px;
  line-height: 1.4;
}
.bal-card .fx a { color: var(--accent-fg); text-decoration: none; }
.bal-card .fx a:hover { text-decoration: underline; }
.bal-card b {
  display: block;
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -.3px;
  font-variant-numeric: tabular-nums;
}
.bal-card b i {
  font-style: normal;
  font-size: 13px;
  font-weight: 400;
  color: var(--muted);
}
.bal-card span {
  display: block;
  margin-top: 4px;
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
}
.bal-card span.muted { color: var(--muted); }
@media (max-width: 720px) {
  .bal-cards { grid-template-columns: 1fr; }
}
table.kv { margin-top: 6px; }
table.kv td { padding: 6px 4px; }
table.kv td:first-child { color: var(--muted); width: 40%; }
table.kv td:nth-child(2) { text-align: left; }
table.kv i { font-style: normal; font-size: 11px; }
.score {
  margin-bottom: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}
.score-sum {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 10px;
}
.score-sum em {
  font-style: normal;
  font-size: 11px;
  color: var(--muted);
}
.score-sum b { font-size: 21px; }
.set-table { overflow-x: auto; }   
.set-table table { margin-top: 6px; white-space: nowrap; }
.set-table td, .set-table th { padding: 6px 8px 6px 0; }
.set-table td:nth-child(2), .set-table td:nth-child(3) { text-align: left; }
.set-table td.wrap { white-space: normal; min-width: 160px; color: var(--muted); }
.set-table input {
  width: 84px;
  margin: 0;
  padding: 4px 6px;
  font-size: 11px;
}
.set-table button { width: auto; margin: 0 0 0 4px; padding: 4px 8px; font-size: 10px; }
.set-table button.on { background: var(--ok); border-color: var(--ok); color: #fff; }
.tag {
  font-style: normal;
  font-size: 9.5px;
  padding: 1px 4px;
  border-radius: 3px;
  background: var(--line-2);
  color: var(--fg-dim);
}
.tag.bad { color: var(--err); background: rgba(239, 83, 80, .12); }
.lv-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: var(--muted);
  margin: 14px 0 7px;
}
.lv-head button { width: auto; margin: 0; padding: 4px 9px; font-size: 11px; }
.lv-rows {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px 8px;
}
.lv-row { display: flex; gap: 5px; }
.lv-row .lv-input { flex: 1; font-variant-numeric: tabular-nums; }
.lv-row .lv-del {
  width: 30px;
  margin: 0;
  padding: 0;
  color: var(--muted);
  flex: none;
}
.lv-row .lv-del:hover { color: var(--err); border-color: var(--err); }
#edit-pop .modal { width: 380px; }
.modal.plan-edit { width: 500px; }
.modal.plan-edit label { font-size: 12px; }
.modal.plan-edit input { font-size: 13px; }
.float {
  position: fixed;
  z-index: 150;
  top: 68px;
  right: 16px;
  width: 380px;
  max-width: calc(100vw - 24px);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, .5);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.float.hidden { display: none; }
.float-head {
  display: flex;
  align-items: center;
  gap: 9px;
  flex: none;
  padding: 12px 12px 12px 14px;
  border-bottom: 1px solid var(--line);
  cursor: grab;
  user-select: none;
}
.float-head:active { cursor: grabbing; }
.float-head b { font-size: 13px; font-weight: 700; white-space: nowrap; }
.float-head .grip {
  width: 14px;
  height: 14px;
  flex: none;
  fill: var(--muted);
  stroke: none;
}
.float-head button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  flex: none;
  margin: 0;
  padding: 0;
  background: none;
  border-color: transparent;
  color: var(--muted);
}
.float-head button:hover { background: rgba(255, 255, 255, .06); color: var(--fg); }
.float-head button.danger:hover { background: rgba(239, 83, 80, .12); color: var(--err); }
.float-head .ico { width: 14px; height: 14px; stroke-width: 1.8; }
.float-body {
  overflow-y: auto;
  max-height: 62vh;
  padding: 8px 10px 12px;
}
.mon-sym { padding: 2px 0; }
.mon-sym + .mon-sym { border-top: 1px solid var(--line); margin-top: 4px; padding-top: 6px; }
.mon-sym.off { opacity: .5; }
.mon-sym-head {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 6px 4px;
}
.mon-name { font-size: 14px; font-weight: 700; }
.mon-sym-head .mon-lv {
  font-size: 10.5px;
  color: var(--muted);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 1px 7px;
}
.mon-price {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  font-size: 14px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.mon-src {
  font-size: 10px;
  color: var(--muted);
  background: var(--bg);
  border-radius: 4px;
  padding: 2px 6px;
  font-weight: 400;
}
.mon-rule {
  margin: 2px 0 4px 30px;
  padding: 6px 8px;
  border-left: 2px solid var(--line);
  border-radius: 0 6px 6px 0;
  cursor: pointer;
  font-size: 11px;
}
.mon-rule:hover { border-left-color: var(--line-2); background: rgba(255, 255, 255, .03); }
.mon-rule.hit {
  border-left: 3px solid var(--ok);
  background: rgba(38, 166, 154, .1);
}
.mon-rule.idle { opacity: .45; }
.mon-quiet { gap: 6px; padding-left: 0; }
.mon-rule-head { display: flex; align-items: center; gap: 8px; }
.mon-rule-head .mon-target,
.mon-rule-head .mon-lv[data-rule] { cursor: pointer; }
.mon-rule-head { flex-wrap: nowrap; }
.mon-rule-head > * { flex: 0 0 auto; }
.mon-plan .mon-left {
  flex: 0 1 auto;
  min-width: 3em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mon-rule-head .mon-target {
  flex: 0 1 auto;
  min-width: 6em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mon-target { font-size: 12.5px; font-weight: 600; color: var(--fg); }
.mon-rule-head .mon-lv { font-size: 11px; color: var(--muted); }
.mon-left {
  margin-left: auto;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -.3px;
  color: var(--accent-fg);
  font-variant-numeric: tabular-nums;
}
.mon-left.hit {
  font-size: 13px;
  color: var(--ok);
  background: rgba(38, 166, 154, .16);
  border-radius: 5px;
  padding: 3px 9px;
}
.mon-detail {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 3px 8px;
  color: var(--fg-dim);
  font-size: 11px;
  margin-top: 3px;
  padding-left: 2px;
  font-variant-numeric: tabular-nums;
}
.mon-levels .mon-detail { margin-top: 0; }
.mon-lv-tag {
  font-size: 9px;
  color: #c8cad6;
  background: var(--line);
  border-radius: 3px;
  padding: 1px 5px;
  flex: none;
}
.mon-empty {
  color: var(--muted);
  font-size: 11.5px;
  padding: 14px 12px;
  margin: 4px 0;
  border: 1px dashed var(--line);
  border-radius: 6px;
  text-align: center;
  line-height: 1.7;
}
.mon-plan { cursor: default; }
.mon-plan .mon-left {
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
}
.mon-rule-head .mon-lv.buy { color: var(--ok); }
.mon-rule-head .mon-lv.sell { color: var(--err); }
.mon-trade { gap: 6px; padding-left: 0; }
.mon-trade-on { color: var(--accent-fg); font-weight: 600; }
.mon-card { gap: 6px; padding-left: 0; }
.mon-orders {
  margin: 2px 0 8px;
  padding: 7px 10px;
  border-radius: 6px;
  background: var(--bg);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
}
.mon-orders em { display: block; font-style: normal; color: var(--dim); font-size: 10.5px; }
.mon-x {
  width: auto;
  margin: 0;
  padding: 2px 6px;
  font-size: 12px;
  line-height: 1;
  opacity: 0;
  transition: opacity .12s ease;
}
.mon-rule:hover .mon-x, .mon-rule:focus-within .mon-x { opacity: 1; }
.sw { position: relative; width: 32px; height: 18px; flex: none; }
.sw input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.sw span {
  position: absolute;
  inset: 0;
  background: var(--line-2);
  border-radius: 999px;
  transition: background .15s;
  pointer-events: none;
}
.sw span::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 14px;
  height: 14px;
  background: var(--fg-dim);
  border-radius: 50%;
  transition: transform .15s, background .15s;
}
.sw input:checked + span {
  background: var(--accent);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08);
}
.sw input:checked + span::after { transform: translateX(14px); background: #fff; }
.sw-sm { width: 24px; height: 14px; }
.sw-sm span::after { width: 10px; height: 10px; }
.sw-sm input:checked + span::after { transform: translateX(10px); }
.mon-rule.hit .sw input:checked + span { background: var(--ok); }
@media (max-width: 720px) {
  #flyout { width: calc(100vw - 68px); }
  .status { max-width: 160px; }
}
@media (max-width: 420px) {
  .mon-rule-head { gap: 5px; }
  .mon-rule-head .mon-target { min-width: 4.5em; }
  .mon-plan .mon-left { min-width: 2.5em; }
}
.ai-main {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 220px 1fr 380px;
  grid-template-rows: 1fr;
}
#chats {
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: var(--panel);
  border-right: 1px solid var(--line);
  padding: 12px 10px;
}
.chats-head {
  flex: none;
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 8px;
}
.chats-head b { font-size: 13px; }
.chats-head button { width: auto; margin: 0; padding: 4px 8px; font-size: 11px; }
#chat-list { flex: 1; min-height: 0; overflow-y: auto; margin: 0; }
#chat-list .item {
  flex-direction: column;
  align-items: stretch;
  gap: 2px;
  cursor: pointer;
  padding: 10px 10px 10px 13px;
  border-radius: 9px;
  background: transparent;
  border-color: transparent;
}
#chat-list .item:hover { background: rgba(255, 255, 255, .04); }
#chat-list .item.on {
  background: rgba(255, 255, 255, .05);
  border-color: transparent;
}
#chat-list .item.on::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 2.5px;
  border-radius: 2px;
  background: var(--accent-fg);
  box-shadow: 0 0 8px rgba(217, 145, 122, .6);
}
#chat-list .item b { color: var(--fg-dim); }
#chat-list .item.on b { color: #f2ede9; font-weight: 600; }
#chat-list .item.on em { color: var(--fg-dim); }
#chat-list .item b {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 500;
}
#chat-list .item em { color: var(--muted); font-size: 10.5px; font-style: normal; }
#chat-list .item .row-x {
  position: absolute;
  right: 6px;
  top: 6px;
  width: auto;
  margin: 0;
  padding: 1px 5px;
  opacity: 0;
}
#chat-list .item { position: relative; }
#chat-list .item:hover .row-x { opacity: 1; }
#chat {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  padding: 16px 20px 10px;
}
#chat-log {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding-right: 6px;
}
.ai-intro { max-width: 620px; margin: 6vh auto 0; text-align: center; }
.ai-intro h2 { font-size: 20px; font-weight: 600; margin: 0 0 10px; }
.ai-intro p { color: var(--muted); line-height: 1.7; margin: 0 0 22px; }
.samples {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
}
.samples button {
  width: auto;           
  margin: 0;
  border-radius: 999px;
  padding: 9px 18px;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--fg-dim);
  font-size: 12px;
}
.samples button:hover {
  color: var(--fg);
  border-color: var(--accent-fg);
  background: var(--accent-soft);
}
.msg { display: flex; gap: 10px; max-width: 640px; margin-bottom: 14px; }
.msg.user { margin-left: auto; justify-content: flex-end; }
.msg .who {
  flex: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(138, 74, 61, .16);
  color: var(--accent-fg);
}
.msg .who .ico { width: 14px; height: 14px; }
.bub {
  padding: 10px 14px;
  border-radius: 12px 12px 12px 2px;
  background: var(--panel);
  border: 1px solid var(--line);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.5;
}
.msg.user .bub {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  border-radius: 12px 12px 2px 12px;
}
.bub.dots { color: var(--muted); font-style: italic; }
.bub.dots i {
  display: inline-block;
  width: 3.5px;
  height: 3.5px;
  margin-left: 3px;
  border-radius: 50%;
  background: currentColor;
  vertical-align: 2px;
  animation: dot-bob 1.15s ease-in-out infinite;
}
.bub.dots i:nth-of-type(2) { animation-delay: .16s; }
.bub.dots i:nth-of-type(3) { animation-delay: .32s; }
.bub.dots .waited { margin-left: .35em; font-style: normal; font-variant-numeric: tabular-nums; }
@keyframes dot-bob {
  0%, 70%, 100% { transform: translateY(0); opacity: .3; }
  35% { transform: translateY(-3px); opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .bub.dots i { animation: none; opacity: .55; }
}
#chat-box {
  flex: none;
  display: flex;
  align-items: flex-end;
  gap: 8px;
  margin-top: 10px;
  padding: 10px 10px 10px 14px;
  border-radius: 10px;
  background: var(--panel);
  backdrop-filter: var(--glass);
  -webkit-backdrop-filter: var(--glass);
  border: 1px solid var(--line);
}
#chat-box:focus-within { border-color: var(--accent-fg); }
#chat-input {
  flex: 1;
  min-width: 0;
  min-height: 44px;
  resize: none;
  overflow-y: auto;
  line-height: 1.5;
  font: inherit;
  font-size: 13px;
  padding: 4px 0;
  background: transparent;
  border: none;
  color: var(--fg);
}
#chat-input:focus { outline: none; }
#chat-input:disabled { opacity: .5; }
#chat-input::placeholder { color: var(--muted); }
#chat-send {
  flex: none;
  width: 34px;          
  height: 34px;
  margin: 0;
  padding: 0;
  border-radius: 8px;
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
#chat-send:hover { background: var(--accent-2); border-color: var(--accent-2); }
#chat-send .ico { width: 15px; height: 15px; fill: currentColor; stroke: none; }
.chat-note { flex: none; margin: 8px 2px 0; color: var(--dim); }
.chat-note a { color: var(--accent-fg); text-decoration: none; }
.chat-note a:hover { text-decoration: underline; }
.res-pick {
  width: auto;
  padding: 5px 8px;
  font-size: 11.5px;
  color: var(--fg);
  background: rgba(20, 15, 14, .55);
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 7px;
  appearance: none;
  -webkit-appearance: none;
}
.res-pick:hover { border-color: rgba(255, 255, 255, .16); }
.res-pick option { background: var(--panel-solid); color: var(--fg); }
#cond {
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: var(--panel);
  border-left: 1px solid var(--line);
  padding: 12px 14px;
}
.cond-head {
  flex: none;
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 10px;
}
.cond-head b { font-size: 13px; }
#cond-body {
  flex: 1;
  min-height: 90px;
  overflow-y: auto;
}
.cond-empty { color: var(--muted); font-size: 12px; line-height: 1.8; margin: 10px 2px; }
.c-node {
  display: flex;
  align-items: baseline;
  gap: 7px;
  padding: 4px 0;
  line-height: 1.6;
  overflow-wrap: anywhere;
}
.c-node .c-dot, .c-node .c-branch {
  flex: none;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  transform: translateY(-1px);
}
.c-node .c-dot { background: var(--accent-fg); }
.c-node .c-branch { border: 1.5px solid var(--muted); }
.c-node:has(.c-branch) > span { color: var(--muted); font-size: 11.5px; }
.c-card .c-node { font-size: 11.5px; color: var(--fg-dim); }
.c-target {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
  padding-bottom: 9px;
  border-bottom: 1px solid var(--line);
}
.c-target > b { font-size: 11px; color: var(--muted); font-weight: 500; }
.c-target.none { display: block; }
.c-target.none b { display: block; font-size: 12px; color: var(--err); font-weight: 600; }
.c-target.none em { display: block; font-style: normal; font-size: 11px; color: var(--muted); margin-top: 3px; }
.t-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px 3px 4px;
  border-radius: 999px;
  background: var(--bg);
  border: 1px solid var(--line);
  font-size: 12px;
  color: var(--fg);
}
.c-card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}
.c-card-head {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}
.c-tag {
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--panel);
  backdrop-filter: var(--glass);
  -webkit-backdrop-filter: var(--glass);
  color: var(--muted);
  font-size: 10px;
}
#cond-back.hidden { display: none; }
.so-col.hidden,
.so-limits.hidden,
.field.hidden,
.snap-chart.hidden,
.snap-note.hidden,
.run-sum.hidden,
.run-when.hidden,
.save-over.hidden { display: none; }
.save-numbers {
  margin: 8px 0 2px;
  padding: 9px 11px;
  border-radius: 8px;
  border: 1px solid var(--line);
  font-size: 11px;
}
.save-numbers.hidden { display: none; }
.save-numbers.must {
  background: color-mix(in srgb, var(--err) 7%, transparent);
  border-color: color-mix(in srgb, var(--err) 35%, transparent);
}
.save-numbers > b { display: block; font-size: 12px; }
.save-numbers.must > b { color: var(--err); }
.save-numbers > em { font-style: normal; color: var(--fg-dim); }
.src-list { list-style: none; margin: 6px 0 0; padding: 0; max-height: 160px; overflow-y: auto; }
.src-list li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: 8px;
  padding: 3px 0;
  border-top: 1px solid var(--line);
}
.src-list li span { min-width: 0; overflow-wrap: anywhere; color: var(--fg-dim); }
.src-list li b { font-variant-numeric: tabular-nums; }
.src-list li i { grid-column: 1 / -1; font-style: normal; font-size: 10px; color: var(--fg-dim); }
.src-list li.src-unknown span,
.src-list li.src-unknown i { color: var(--err); }
.src-ok { display: flex; gap: 6px; align-items: center; margin-top: 8px; font-size: 12px; }
.c-numbers {
  margin-top: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 11px;
  background: color-mix(in srgb, var(--err) 7%, transparent);
  border: 1px solid color-mix(in srgb, var(--err) 30%, transparent);
}
.c-numbers b { display: block; color: var(--err); font-size: 12px; }
.c-numbers b + em, .c-numbers em + em { margin-top: 2px; }
.c-numbers em { display: block; font-style: normal; overflow-wrap: anywhere; }
.c-numbers em b { display: inline; color: inherit; }
.c-numbers i { display: block; margin: 4px 0 6px; font-style: normal; font-size: 10px; color: var(--fg-dim); }
.c-numbers.c-unused {
  background: transparent;
  border: 1px dashed var(--line-2);
}
.c-numbers.c-unused b { color: var(--fg); }
.src-unused { margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--line-2); }
.src-unused b { display: block; font-size: 12px; }
.src-unused em { display: block; font-style: normal; overflow-wrap: anywhere; margin-top: 2px; }
.src-unused i { display: block; margin-top: 4px; font-style: normal; font-size: 10px; color: var(--fg-dim); }
.save-numbers > .src-unused:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
#cond-back {
  flex: none;
  max-height: 34vh;
  overflow-y: auto;
}
.bt-label { color: var(--muted); font-size: 11px; margin-bottom: 8px; }
.bt-who {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  font-size: 12px;
}
.bt-who + .bt { margin-top: 4px; }
.bt {
  flex: none;
  margin-top: 14px;
}
.bt.bad {
  padding: 10px 11px;
  border-radius: 8px;
  background: var(--bg);
  border: 1px solid var(--line);
}
.bt b { display: block; font-size: 13px; color: var(--ok); }
.bt.bad b { color: var(--err); }
.bt em { display: block; color: var(--muted); font-style: normal; font-size: 11px; margin-top: 3px; }
.bt-row .bt-door {
  font-style: normal; font-size: 10px; color: var(--muted);
  flex: 1; min-width: 0; margin: 0 10px; text-align: center;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.bt-rows { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.bt-rows:empty { display: none; }
.bt-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 10px;
  border-radius: 6px;
  background: var(--bg);
  border: 1px solid var(--line);
  color: var(--fg);
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
}
.bt-row s { color: var(--ok); font-weight: 600; text-decoration: none; }
.bt-row[data-fire] { cursor: pointer; }
.bt-row[data-fire]:hover { background: var(--panel); outline: 1px solid var(--line); }
.snap-chart { flex: none; height: 380px; width: 100%; }
.snap-note {
  flex: none;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.7;
  margin: 10px 2px 0;
}
.bt-rest { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; }
.bt-rest.hidden { display: none; }
.bt-toggle {
  width: 100%;
  margin: 8px 0 0;
  padding: 5px;
  background: none;
  border: 1px dashed var(--line);
  border-radius: 6px;
  color: var(--muted);
  font-size: 11px;
  cursor: pointer;
}
.bt-toggle:hover { color: var(--fg); border-color: var(--muted); }
.bt-more { text-align: center; padding-top: 8px; color: var(--muted); font-size: 11px; line-height: 1.5; }
.bt-approx {
  margin-top: 8px;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent-fg);
  border-radius: 6px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
}
.cond-foot { flex: none; margin-top: 10px; }
.cond-foot button { width: 100%; margin: 0; justify-content: center; }
.cond-foot button:disabled { opacity: .4; cursor: not-allowed; }
.cond-saved {
  flex: 1;
  min-height: 100px;
  display: flex;
  flex-direction: column;
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}
#saved-list { flex: 1; min-height: 0; overflow-y: auto; }
#saved-list .item {
  padding: 7px 9px;
  gap: 8px;
  position: relative;
}
#saved-list .item > span:last-child {
  opacity: 0;
  transition: opacity .12s ease;
}
#saved-list .item:hover > span:last-child,
#saved-list .item:focus-within > span:last-child { opacity: 1; }
#saved-list .item > span:first-of-type { flex: 1; min-width: 0; overflow: hidden; }
#saved-list .item > span:last-child { flex: none; }
#saved-list .item b { display: block; }
#saved-list .item em { display: block; margin-top: 2px; line-height: 1.45; }
#saved-list .item em.bad { color: var(--err); }
#saved-list .item.off { opacity: .55; }
.sw-money input:checked + span {
  background: var(--ok);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12), 0 0 0 2px rgba(38, 166, 154, .28);
}
.mon-rule-head .sw + .sw,
.list .item .sw + .sw { margin-left: 3px; }
.list .item > .sw { margin: 0; flex: none; }
.save-preview {
  margin: 10px 0 4px;
  padding: 10px 11px;
  border-radius: 8px;
  background: var(--bg);
  border: 1px solid var(--line);
  max-height: 210px;
  overflow-y: auto;
}
.sp-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  padding-bottom: 7px;
  margin-bottom: 4px;
  border-bottom: 1px solid var(--line);
}
.save-over {
  margin: 8px 0 2px;
  padding: 9px 11px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--err) 9%, transparent);
  border: 1px solid color-mix(in srgb, var(--err) 35%, transparent);
}
.save-over b { display: block; font-size: 12px; color: var(--err); }
.save-over em { display: block; font-style: normal; font-size: 11px; color: var(--fg-dim); margin-top: 4px; }
.save-over i { font-style: normal; font-size: 10px; }
.save-over i.on {
  margin-left: 5px;
  padding: 1px 5px;
  border-radius: 3px;
  background: var(--err);
  color: #fff;
}
.save-over > i { display: block; margin-top: 6px; font-size: 11px; color: var(--err); }
@media (max-width: 900px) {
  .ai-main { grid-template-columns: 1fr; grid-template-rows: 1fr auto; }
  #chats { display: none; }
  #cond { border-left: none; border-top: 1px solid var(--line); max-height: 46vh; }
}
.btn-link .ico { width: 17px; height: 17px; }
.hint b.bad, em.bad { color: var(--err); }
#ind-verify div { margin-top: 4px; font-variant-numeric: tabular-nums; }
.refuse-note {
  margin-top: 6px;
  padding: 6px 10px;
  border-left: 2px solid var(--err);
  background: rgba(239, 83, 80, .08);
  border-radius: 0 6px 6px 0;
  color: var(--fg-dim);
  font-size: 11.5px;
}
.refuse-note a { color: var(--accent-fg); }
.bub-wrap { min-width: 0; }
#manual-pop .modal.wide { width: min(600px, 92vw); }
.manual-body { max-height: 62vh; overflow-y: auto; padding-right: 6px; }
.manual-body h3 { margin: 14px 0 8px; font-size: 12px; color: var(--muted); }
.manual-body h3:first-child { margin-top: 0; }
.m-row {
  padding: 9px 11px;
  margin-bottom: 6px;
  border-radius: 8px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-left: 2px solid var(--ok);
}
.m-row.bad { border-left-color: var(--err); }
.m-row b { display: block; font-size: 12.5px; }
.m-row em, .m-row i {
  display: block;
  margin-top: 3px;
  font-style: normal;
  font-size: 11px;
  color: var(--muted);
}
.m-row i { color: var(--fg-dim); }
.save-modal { width: min(520px, 94vw); }
.save-buy {
  padding: 11px;
  border-radius: 9px;
  background: var(--bg);
  border: 1px solid var(--line);
}
.sb-head b { display: block; font-size: 12.5px; font-weight: 600; }
.sb-head em {
  display: block;
  margin-top: 3px;
  font-style: normal;
  font-size: 11px;
  line-height: 1.5;
  color: var(--muted);
}
.sb-rows { display: flex; flex-direction: column; gap: 7px; margin-top: 9px; }
.save-order {
  padding: 11px;
  border-radius: 9px;
  background: var(--bg);
  border: 1px solid var(--line);
}
.so-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.so-row .field { margin: 0; }
.so-row .field input { width: 88px; }
.so-why { margin: 0; font-size: 11px; line-height: 1.55; color: var(--muted); }
.so-why b { color: var(--accent-fg); font-weight: 600; }
.so-limits { gap: 14px; }
.so-limits label { display: flex; align-items: center; gap: 6px; margin: 0; font-size: 12px; }
.so-lock {
  margin: 0;
  padding: 8px 9px;
  border-radius: 7px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  font-size: 11px;
  line-height: 1.6;
  color: var(--muted);
}
.so-lock b { color: var(--fg); }
.so-lock b.on { color: var(--err); }
.so-lock code { font-size: 10.5px; color: var(--accent-fg); }
.so-lock:empty { display: none; }
.sb-row { display: grid; grid-template-columns: 1fr auto 1fr; gap: 8px; align-items: center; }
.sb-row .t-chip { justify-content: flex-start; overflow: hidden; }
.sb-arrow { width: 15px; height: 15px; flex: none; color: var(--dim); }
.sb-row select { width: 100%; margin: 0; padding: 6px 8px; font-size: 12px; }
.sb-row.must select { border-color: var(--accent-fg); }
.edit-live {
  margin: 0 0 12px;
  padding: 7px 9px;
  border-radius: 7px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
}
.edit-live p { margin: 0 0 6px; font-size: 11.5px; line-height: 1.5; }
.edit-live label { display: flex; gap: 6px; align-items: center; font-size: 11.5px; }
.edit-live input { width: auto; margin: 0; }
.buy-at { color: var(--accent-fg); font-weight: 600; }
.live-tag {
  margin-left: 6px;
  padding: 1px 5px;
  border-radius: 4px;
  font-style: normal;
  font-size: 10px;
  font-weight: 600;
  vertical-align: 1px;
  color: var(--accent-fg);
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
}
.run-sum { padding: 12px; border-radius: 9px; background: var(--bg); border: 1px solid var(--line); }
.bt-pair .run-sum { overflow-y: auto; }
.rs-big { font-size: 30px; font-weight: 700; letter-spacing: -0.5px; }
.rs-big.up, .rt .up, .rs-grid b.up { color: var(--ok); }
.rs-big.down, .rt .down, .rs-grid b.down { color: var(--err); }
.rs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 6px 14px;
  margin-top: 9px;
  font-size: 12px;
  color: var(--muted);
}
.rs-grid b { color: var(--fg); font-weight: 600; }
.rs-grid em { font-style: normal; font-size: 11px; color: var(--dim); }
.rs-open, .rs-none { margin: 9px 0 0; font-size: 11.5px; line-height: 1.6; color: var(--muted); }
.rs-open b { color: var(--accent-fg); }
.rs-assume {
  margin: 10px 0 0;
  padding-top: 8px;
  border-top: 1px solid var(--line);
  font-size: 11px;
  line-height: 1.65;
  color: var(--muted);
}
.rs-assume em { font-style: normal; opacity: .82; }
.rs-assume .rs-skip { display: block; margin-top: 3px; color: var(--err); opacity: 1; }
.run-list { max-height: 26vh; overflow-y: auto; }
.run-list:empty { display: none; }
.rt { width: 100%; border-collapse: collapse; font-size: 12px; }
.rt th {
  position: sticky;
  top: 0;
  padding: 5px 8px;
  text-align: left;
  font-weight: 600;
  color: var(--muted);
  background: var(--panel);
  border-bottom: 1px solid var(--line);
}
.rt td { padding: 5px 8px; border-bottom: 1px solid var(--line); }
.rt td:nth-child(2), .rt td:nth-child(4), .rt td:last-child { text-align: right; }
.rt tr.open td { color: var(--muted); font-style: italic; }
.acct-badge {
  flex: none;
  margin-left: 8px;
  padding: 2px 7px;
  border-radius: 5px;
  font-size: 10.5px;
  font-weight: 600;
  white-space: nowrap;
}
.acct-badge.off, .acct-badge.paper {
  border: 1px solid var(--line);
  color: var(--dim);
}
.acct-badge.real {
  border: 1px solid var(--err);
  background: var(--err);
  color: #fff;
}
.order-tag.idle {
  border: 1px dashed var(--line-2);
  background: none;
  color: var(--dim);
}
.pl-chip.money.half { border-style: dashed; }
.order-tag {
  margin-left: 6px;
  padding: 1px 5px;
  border-radius: 4px;
  font-style: normal;
  font-size: 10px;
  font-weight: 600;
  vertical-align: 1px;
  white-space: nowrap;
}
.order-tag.off { color: var(--muted); border: 1px solid var(--line-2); }
.order-tag.buy { color: var(--ok); background: rgba(38, 166, 154, .12); border: 1px solid rgba(38, 166, 154, .35); }
.order-tag.sell { color: var(--err); background: rgba(239, 83, 80, .12); border: 1px solid rgba(239, 83, 80, .35); }
.m-lead { margin: -2px 0 8px; }
.manual-body .m-sub {
  margin: 10px 0 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .02em;
  color: var(--accent-fg);
}
.m-word {
  display: grid;
  grid-template-columns: 74px 1fr;
  gap: 2px 10px;
  padding: 7px 11px;
  margin-bottom: 4px;
  border-radius: 8px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-left: 2px solid var(--accent);
}
.m-word b { grid-column: 1; grid-row: 1 / span 2; font-size: 12.5px; color: var(--accent-fg); }
.m-word span { grid-column: 2; font-size: 11.5px; color: var(--muted); }
.m-word em {
  grid-column: 2;
  font-style: normal;
  font-size: 11px;
  color: var(--fg-dim);
}
.c-side {
  display: inline-block;
  margin-bottom: 7px;
  padding: 2px 7px;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 600;
}
.c-side.buy { color: var(--ok); background: rgba(38, 166, 154, .12); border: 1px solid rgba(38, 166, 154, .35); }
.c-side.sell { color: var(--err); background: rgba(239, 83, 80, .12); border: 1px solid rgba(239, 83, 80, .35); }
.so-sides { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px; }
.so-col {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px;
  border-radius: 8px;
  background: var(--bg-2, var(--bg));
  border: 1px solid var(--line);
}
.so-col-head { font-size: 11.5px; font-weight: 700; }
.so-col-head.buy { color: var(--ok); }
.so-col-head.sell { color: var(--err); }
.so-col .seg button { padding: 4px 9px; font-size: 11.5px; }
.so-col .field input { width: 92px; }
.so-limits { display: flex; flex-wrap: wrap; gap: 8px 12px; }
.so-limits label { display: flex; align-items: center; gap: 6px; margin: 0; font-size: 11.5px; color: var(--muted); }
.so-limits .field input { width: 76px; }
.edit-what { margin: 0 0 12px; line-height: 1.55; }
.edit-sym {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.edit-sym .logo-sm { width: 24px; height: 24px; font-size: 11px; flex: none; }
.edit-what b {
  font-size: 16px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.edit-what i {
  font-style: normal;
  font-size: 11px;
  letter-spacing: .4px;
  color: var(--muted);
  flex: none;
}
.edit-what em {
  display: block;
  margin-top: 8px;
  padding: 9px 11px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 6px;
  font-style: normal;
  font-size: 13px;
  line-height: 1.6;
  color: var(--fg-dim);
  white-space: pre-wrap;
  word-break: break-word;
}
.list .item.clickable { cursor: pointer; }
.list .item.clickable:hover { background: var(--accent-soft); }
.mon-stage .stage-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.stage-chain { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.stage-at { color: var(--ok); font-weight: 700; }
.stage-off { color: var(--dim); }
.stage-arrow { color: var(--line-2); }
.stage-doors { margin: 0; padding: 0; list-style: none;
  display: flex; flex-direction: column; gap: 2px; }
.stage-doors li { display: flex; gap: 6px; align-items: baseline; flex-wrap: wrap; }
.stage-do { color: var(--fg); font-weight: 600; white-space: nowrap; }
.stage-when { color: var(--fg-dim); min-width: 0; }
.stage-goto { color: var(--dim); white-space: nowrap; }
.stage-held { color: var(--accent-fg); }
.plans-main {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 14px 18px 18px;
  gap: 12px;
}
.pl-search {
  display: flex;
  align-items: center;
  gap: 7px;
  flex: 0 1 320px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--bg);
}
.pl-search:focus-within { border-color: var(--accent); }
.pl-search .ico { width: 15px; height: 15px; color: var(--dim); }
.pl-search input {
  flex: 1;
  min-width: 0;
  margin: 0;
  padding: 7px 0;
  border: none;
  background: none;
  font-size: 12px;
}
.pl-search input:focus { outline: none; }
.pl-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}
.pl-filter { display: flex; align-items: center; gap: 7px; }
.pl-lab { color: var(--muted); font-size: 11px; white-space: nowrap; }
.pl-bar .seg button { padding: 5px 10px; font-size: 11.5px; }
.pl-sel {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}
.pl-sel select,
.pl-sel button { width: auto; margin: 0; padding: 5px 7px; font-size: 11.5px; }
.pl-sel.hidden { display: none; }
.pl-sel button.on {
  border-color: var(--accent-fg);
  color: var(--accent-fg);
}
.pl-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding-right: 4px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(max(340px, (100% - 32px) / 3), 1fr));
  gap: 14px;
  align-items: start;
}
.pl-list > .cond-empty { grid-column: 1 / -1; }
.pl-group {
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--panel);
  min-width: 0;
}
.pl-group-head {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: -10px -11px 8px;
  padding: 9px 11px 7px;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  color: var(--fg-dim);
}
.pl-group-head b {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12.5px;
  color: var(--fg);
}
.pl-group-head > .logo { flex: none; }
.pl-syms {
  display: flex;
  flex: none;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}
.pl-chip {
  flex: none;
  width: auto;
  margin: 0;
  padding: 2px 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: none;
  color: var(--muted);
  font-size: 10.5px;
  font-style: normal;
  line-height: 1.45;
  white-space: nowrap;
}
button.pl-chip:hover { border-color: var(--line-2); color: var(--fg); }
.pl-chip.on { border-color: var(--accent-line); color: var(--accent-fg); }
.pl-chip.money.buy { border-color: var(--ok); color: var(--ok); }
.pl-chip.money.sell { border-color: var(--err); color: var(--err); }
.pl-chip.off { opacity: .4; }
.pl-batch {
  display: flex;
  flex: none;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}
.pl-batch em { font-style: normal; white-space: nowrap; }
.no-exit {
  flex: none;
  margin-left: 4px;
  font-size: 11px;
  font-style: normal;
  line-height: 1;
  color: var(--accent-fg);
  cursor: help;
}
.pl-batch button {
  width: auto;
  margin: 0;
  padding: 2px 7px;
  opacity: .45;
  font-size: 11px;
  line-height: 1.2;
  white-space: nowrap;
}
.pl-group:hover .pl-batch button { opacity: 1; }
.pl-group-head {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--panel-solid);
  border-radius: 8px 8px 0 0;
}
.pl-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 150px;
  padding: 5px;
  border: 1px solid var(--line-2);
  border-radius: 8px;
  background: var(--panel-solid);
  box-shadow: 0 10px 24px rgba(0, 0, 0, .45);
}
.pl-menu.hidden { display: none; }
.pl-menu button {
  width: 100%;
  margin: 0;
  padding: 7px 9px;
  border-color: transparent;
  background: none;
  text-align: left;
  font-size: 12px;
}
.pl-menu button:hover { background: var(--accent-soft); border-color: transparent; }
.pl-menu button.danger { margin-top: 3px; border-top: 1px solid var(--line); border-radius: 0; }
.pl-pick { grid-area: pick; display: flex; align-items: center; padding: 0 2px; }
.pl-pick input { margin: 0; cursor: pointer; }
.pl-row {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr) auto;
  grid-template-areas:
    "pick sw text x"
    "pick sw meta meta";
  align-items: center;
  gap: 2px 10px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--bg);
  cursor: pointer;
}
.pl-group .pl-row { margin-bottom: 5px; }
.pl-group .pl-row:last-child { margin-bottom: 0; }
.pl-row:hover { background: var(--accent-soft); }
.pl-row.picked {
  border-color: var(--accent-fg);
  box-shadow: 0 0 0 2px var(--accent-soft);
}
.pl-row.off { opacity: .55; }
.pl-row.off:hover { opacity: .85; }
.pl-row.broken { border-color: rgba(239, 83, 80, .5); }
.pl-sw {
  grid-area: sw;
  align-self: center;
  display: flex;
  gap: 8px;
}
.sw-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}
.sw-col em {
  font-style: normal;
  font-size: 9.5px;
  line-height: 1;
  color: var(--muted);
  white-space: nowrap;
}
.sw-col:last-child em { color: var(--fg-dim); }
.pl-text { grid-area: text; min-width: 0; }
.pl-text b { display: flex; align-items: center; gap: 6px; font-size: 12.5px; min-width: 0; }
.pl-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-text b .order-tag, .pl-text b .pl-stage { flex: none; }
.pl-text em {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-style: normal;
  font-size: 11px;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pl-text em > .logo { vertical-align: -3px; margin-right: 4px; }
.pl-sum { color: var(--dim); }
.pl-text em.bad { color: var(--err); white-space: normal; }
.pl-bad {
  flex: none;
  margin-left: 5px;
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 10px;
  font-style: normal;
  font-weight: 700;
  line-height: 1.5;
  color: var(--err);
  background: rgba(239, 83, 80, .14);
}
.pl-meta {
  grid-area: meta;
  display: flex;
  gap: 10px;
  color: var(--dim);
  font-size: 10.5px;
  white-space: nowrap;
  overflow: hidden;
}
.pl-card {
  color: var(--fg-dim);
}
.pl-card.warn {
  color: var(--accent-fg);
}
.pl-card.stale {
  font: inherit;
  color: var(--muted);
  background: none;
  border: 1px dashed var(--line-2);
  border-radius: 4px;
  padding: 0 5px;
  cursor: pointer;
}
.pl-card.stale:hover {
  color: var(--fg);
  border-color: var(--accent-line);
}
.num-compare {
  margin-top: 8px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 12px;
  color: var(--fg-dim);
}
.num-cmp-row {
  margin: 2px 0;
}
.num-cmp-k {
  display: inline-block;
  min-width: 64px;
  color: var(--muted);
}
.num-cmp-row.then {
  color: var(--fg);
}
.num-cmp-list {
  margin: 6px 0 0;
  padding-left: 18px;
}
.num-cmp-same {
  margin: 4px 0 0;
  color: var(--muted);
}
.pl-act {
  grid-area: x;
  align-self: start;
  display: flex;
  align-items: center;
  gap: 4px;
}
.pl-x,
.pl-put {
  width: auto;
  margin: 0;
  padding: 1px 6px;
  opacity: .3;
  font-size: 13px;
  line-height: 1.2;
}
.pl-put { font-size: 11px; padding: 2px 7px; }
.pl-row:hover .pl-x,
.pl-row:hover .pl-put { opacity: 1; }
.pl-stage {
  padding: 1px 7px;
  border-radius: 9px;
  border: 1px solid var(--line-2);
  color: var(--ok);
  font-style: normal;
  font-size: 10px;
  font-weight: 700;
}
.logo-xs { width: 14px; height: 14px; font-size: 8px; flex: none; }
.mon-off-line {
  display: block;
  margin: 6px 0 2px;
  padding: 6px 10px;
  border-radius: 6px;
  border: 1px dashed var(--line);
  color: var(--muted);
  font-size: 10.5px;
  text-align: center;
  text-decoration: none;
}
.mon-off-line:hover { color: var(--fg); border-color: var(--line-2); }
@media (max-width: 900px) {
  .plans-main { padding: 10px; }
  .pl-bar { gap: 9px; }
}
.wh-evs { display: flex; gap: 10px; margin-top: 5px; flex-wrap: wrap; }
.wh-ev {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  color: var(--muted);
  font-size: 10.5px;
  white-space: nowrap;
  cursor: pointer;
}
.wh-ev input { width: auto; margin: 0; }
.wh-item > span:first-child { min-width: 0; }
[data-notice-bell] {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 7px 11px;
  margin: 0;
}
header button.on {
  background: var(--accent-soft);
  border-color: var(--accent-line);
  color: var(--accent-fg);
}
header button.on:hover { background: var(--accent-soft); border-color: var(--accent-fg); }
.notice-dot {
  position: absolute;
  top: 1px;
  right: 1px;
  min-width: 15px;
  height: 15px;
  padding: 0 4px;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font-style: normal;
  font-size: 9.5px;
  font-weight: 700;
  line-height: 15px;
  text-align: center;
  pointer-events: none;
}
.notice-dot.lv-warn { background: var(--accent-fg); color: #1a0f0c; }
.notice-dot.lv-error { background: var(--err); }
.notice-dot.hidden { display: none; }
.deck-box { padding: 2px; gap: 0; }
.deck-box button {
  position: relative;      
  display: inline-flex;
  align-items: center;
  margin: 0;
  padding: 5px 9px;
  border: none;
  background: none;
  border-radius: 4px;
  color: var(--muted);
}
.deck-box button .ico { width: 17px; height: 17px; stroke-width: 1.8; }
.deck-box.solo button { padding: 5px; }
.deck-box button:hover { background: rgba(255, 255, 255, .06); color: var(--fg); }
.deck-box button.on {
  background: var(--accent-soft);
  color: var(--accent-fg);
}
.deck-tabs { padding: 2px; flex: none; }
.deck-tabs button {
  width: auto;
  height: auto;
  padding: 5px 12px;
  font-size: 11.5px;
  white-space: nowrap;
}
.deck { width: 380px; max-height: 66vh; top: 60px; right: 16px; }
.deck .float-body { max-height: calc(66vh - 62px); }
.notice {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  margin-bottom: 5px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--line-2);
  border-radius: 6px;
  background: var(--bg);
  font-size: 11.5px;
}
.notice > span:first-child { min-width: 0; }
.notice.lv-warn { border-left-color: var(--accent-fg); }
.notice.lv-error { border-left-color: var(--err); }
.notice.did-buy { border-left-color: var(--ok); }
.notice.did-sell { border-left-color: var(--err); }
.notice.did-place { border-left-color: var(--accent); }
.notice.did-buy, .notice.did-sell { border-left-width: 4px; }
.notice.fresh { background: var(--accent-soft); }
.notice b { display: block; font-size: 12px; }
.notice-head {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.notice-head .logo-sm { width: 18px; height: 18px; font-size: 9px; flex: none; }
.notice-sym {
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.notice-what {
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
  white-space: nowrap;
  flex: none;
}
.notice-money {
  display: flex !important;
  align-items: baseline;
  gap: 6px;
  margin-top: 5px !important;
  color: var(--fg-dim) !important;
  font-size: 11px !important;
}
.notice-money b {
  display: inline !important;
  font-size: 15px !important;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--fg);
}
.notice.did-buy .notice-money b { color: var(--ok); }
.notice.did-sell .notice-money b { color: var(--err); }
.notice em {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-style: normal;
  font-size: 11px;
  white-space: pre-wrap;
  word-break: break-word;
}
.notice .notice-when { color: var(--dim); font-size: 10px; }
.notice > span:last-child { flex: none; font-size: 10px; }
.pagebar {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 12px;
  border-top: 1px solid var(--line);
  background: var(--panel);
  position: relative;
  z-index: 5;
}
.pagebar-item {
  display: flex;
  flex: 0 1 168px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 0;
  padding: 8px 12px;
  border: none;
  border-radius: 999px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .01em;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: background .16s ease, color .16s ease;
}
.pagebar-item .ico {
  width: 16px;
  height: 16px;
  stroke-width: 1.7;
  transition: transform .16s ease;
}
.pagebar-item:hover { background: rgba(255, 255, 255, .06); color: var(--fg); }
.pagebar-item:hover .ico { transform: translateY(-1px); }
.pagebar-item.on {
  background: var(--accent-soft);
  color: var(--accent-fg);
  font-weight: 600;
  cursor: default;
  box-shadow: inset 0 0 0 1px var(--accent);
}
.pagebar-item.on:hover { background: var(--accent-soft); color: var(--accent-fg); }
@media (max-width: 560px) {
  .pagebar-item { flex: 0 1 64px; font-size: 0; gap: 0; padding: 9px; }
  .pagebar-item .ico { width: 18px; height: 18px; }
}
.bt-main {
  flex: 1;
  min-height: 0;
  display: flex;
  gap: 14px;
  padding: 14px 18px 18px;
}
.bt-side {
  flex: 0 0 288px;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
}
.bt-box {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 13px 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
}
.bt-box h3 {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 2px;
  font-size: 12px;
  font-weight: 600;
  color: var(--fg);
}
.bt-box .hint { margin: 2px 0 0; }
.bt-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 11.5px;
  color: var(--muted);
}
.bt-field select { width: 100%; }
.bt-num { flex-direction: row; align-items: center; justify-content: space-between; }
.bt-num .field { flex: 0 0 116px; }
.bt-num .field input { width: 100%; text-align: right; }
.bt-lab { font-size: 11.5px; color: var(--muted); }
.bt-dates { display: flex; align-items: center; gap: 6px; }
.bt-dates input { flex: 1; min-width: 0; }
.bt-dates em { font-style: normal; color: var(--dim); }
.bt-seg { display: flex; }
.bt-seg button { flex: 1; }
.bt-go { margin-top: 2px; }
.bt-box.off-live { border-color: var(--err); }
.bt-tag {
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  color: var(--err);
  background: rgba(239, 83, 80, .14);
}
.bt-tag.hidden { display: none; }
.bt-reset {
  margin-top: 2px;
  padding: 6px 8px;
  font-size: 11.5px;
}
.bt-view {
  flex: 1;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
}
.bt-viewrow.hidden { display: none; }
.bt-pair {
  flex: none;
  display: grid;
  grid-template-columns: 1fr 1fr 2fr;
  gap: 10px;
}
.bt-pair > * {
  height: 33vh;
  min-height: 200px;
  min-width: 0;
}
.bt-pair .run-list {
  max-height: none;
  padding: 0 2px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--panel);
  overflow: auto;
}
.bt-pair .rt { font-size: 11px; }
.bt-pair .rt th, .bt-pair .rt td { padding: 4px 6px; }
.bt-curve {
  display: flex;
  flex-direction: column;
  padding: 10px 12px 8px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--panel);
}
.bt-curve.hidden { display: none; }
.eq-grid {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 46px 1fr;
  grid-template-rows: 1fr auto;
}
.eq { display: block; grid-column: 2; width: 100%; height: 100%; min-height: 0; }
.eq-y {
  position: relative;
  min-height: 0;
}
.eq-y span {
  position: absolute;
  right: 7px;
  transform: translateY(-50%);
  font-size: 9.5px;
  font-variant-numeric: tabular-nums;
  color: var(--dim);
  white-space: nowrap;
}
.eq-x {
  grid-column: 2;
  display: flex;
  justify-content: space-between;
  margin-top: 3px;
  font-size: 9.5px;
  font-variant-numeric: tabular-nums;
  color: var(--dim);
}
.eq-foot {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-top: 4px;
  padding-top: 5px;
  border-top: 1px solid var(--line);
  font-size: 10.5px;
  color: var(--dim);
}
.eq-foot b { font-size: 12px; }
.bt-view .snap-chart {
  height: 48vh;
  min-height: 280px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--panel);
}
.run-who {
  flex: none;
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
}
.run-who.hidden { display: none; }
.run-who b { color: var(--fg); }
.run-who em {
  font-style: normal;
  font-size: 11px;
  color: var(--dim);
}
.acct-top { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.acct-top.solo { grid-template-columns: 1fr; }
.acct-box {
  min-width: 0;
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--panel);
}
.acct-box > em { display: block; margin-bottom: 6px; font-style: normal; font-size: 11px; color: var(--muted); }
.acct-box .hint { margin: 6px 0 0; }
.acct-box > em i { font-style: normal; opacity: .65; }
.spark { display: block; width: 100%; height: 64px; }
.spark-foot { display: flex; justify-content: space-between; align-items: baseline; margin-top: 4px; font-size: 10.5px; color: var(--dim); }
.spark-foot b { font-size: 11.5px; }
.pie-wrap { display: flex; align-items: center; gap: 10px; }
.pie { flex: none; width: 78px; height: 78px; }
.pie-key { flex: 1; min-width: 0; margin: 0; padding: 0; list-style: none; font-size: 10.5px; }
.pie-key li { display: flex; align-items: center; gap: 5px; line-height: 1.7; }
.pie-key i { flex: none; width: 8px; height: 8px; border-radius: 2px; }
.pie-key span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.pie-key b { flex: none; color: var(--fg); }
@media (max-width: 620px) {
  .acct-top { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .bt-pair { grid-template-columns: 1fr; }
  .bt-pair > * { height: auto; min-height: 220px; }
  .bt-pair .run-list { max-height: 26vh; }
  .bt-pair .eq-grid { min-height: 170px; }
}
@media (max-height: 700px) {
  .bt-view .snap-chart { height: auto; min-height: 260px; }
  .bt-pair > * { height: auto; min-height: 240px; }
}
.bt-view #bt-empty { margin: auto; text-align: center; }
#bt-empty.hidden { display: none; }
.rs-notlive {
  display: block;
  margin-bottom: 4px;
  color: var(--err);
  font-weight: 600;
}
@media (max-width: 900px) {
  .bt-main { flex-direction: column; padding: 10px; }
  .bt-side { flex: none; overflow: visible; }
}
.fire-head {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.fire-head b { font-size: 13px; }
.fire-do {
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 12px;
  background: var(--panel-2, rgba(255, 255, 255, .06));
}
.fire-do.buy { color: var(--ok); }
.fire-do.sell { color: var(--err); }
.fire-do.idle { color: var(--muted); }
.fire-head i { font-size: 11px; font-style: normal; color: var(--muted); }
.tool-group { display: contents; }
.tool-head {
  grid-column: 1 / -1;
  margin: 6px 0 2px;
  color: var(--muted);
  font-size: 10.5px;
  border-top: 1px solid var(--line);
  padding-top: 7px;
}
.tool-head i { font-style: normal; color: var(--dim); }
#set-orders .item > span:last-child { flex: none; white-space: nowrap; }
.pos-who {
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
body.login-page {
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.login-box {
  flex: none;
  width: min(320px, 100%);
}
.login-logo {
  display: flex;
  justify-content: center;
  margin-bottom: 28px;
}
.login-page .brand {
  gap: 12px;
  cursor: default;
  pointer-events: none;
}
.login-page .brand-mark { width: 40px; height: 40px; }
.login-page .brand-word { font-size: 27px; letter-spacing: .06em; }
.login-box form { margin: 0; }
.login-box input {
  display: block;
  box-sizing: border-box;
  width: 100%;
  height: 42px;
  margin: 0 0 9px;
  padding: 0 14px;
  font-family: inherit;
  font-size: 13.5px;
  line-height: 42px;          
  color: var(--fg);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  appearance: none;
}
.login-box input::placeholder { color: var(--dim); }
.login-box input:focus { outline: none; border-color: var(--accent); }
.login-code-row {
  display: grid;
  grid-template-columns: 7fr 3fr;
  gap: 9px;
  margin-bottom: 9px;
}
.login-code-field { position: relative; min-width: 0; }
.login-code-field input { margin-bottom: 0; padding-right: 52px; }
.login-code-left {
  position: absolute;
  top: 0;
  right: 12px;
  line-height: 42px;
  font-size: 12px;
  font-variant-numeric: tabular-nums;   
  color: var(--fg-dim);
  pointer-events: none;
}
.login-code-left.done { color: var(--down, #ef5350); }
#login-code-send {
  box-sizing: border-box;
  min-width: 0;               
  height: 42px;
  margin: 0;                  
  padding: 0 5px;
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--fg-dim);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
}
#login-code-send:hover:not(:disabled) { border-color: var(--line-2); color: var(--fg); }
#login-code-send:disabled { opacity: .55; cursor: default; }
.login-tabs {
  display: flex;
  gap: 9px;
  margin-top: 7px;
}
.login-tabs button {
  flex: 1;
  flex-basis: 0;
  box-sizing: border-box;
  min-width: 0;
  height: 42px;
  margin: 0;                  
  padding: 0 10px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  color: var(--fg-dim);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  appearance: none;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.login-tabs button:hover:not(:disabled) { border-color: var(--line-2); color: var(--fg); }
.login-tabs button.on {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
}
.login-tabs button.on:hover:not(:disabled) {
  background: var(--accent-2);
  border-color: var(--accent-2);
}
.login-tabs button:disabled { opacity: .55; cursor: default; }
.login-err {
  margin: 14px 0 0;
  font-size: 12px;
  line-height: 1.5;
  color: var(--err);
}
.login-err.ok { color: var(--up, #26a69a); }
.login-quiet {
  display: block;
  margin: 12px auto 0;
  padding: 4px 6px;
  border: 0;
  background: none;
  color: var(--muted, #8b93a7);
  font-size: 12px;
  cursor: pointer;
}
.login-quiet:hover { color: var(--fg, #e6e8ee); text-decoration: underline; }
.gauge {
  height: 8px;
  margin: 2px 0 6px;
  background: var(--panel-2, #12161f);
  border: 1px solid var(--line, #232a36);
  border-radius: 999px;
  overflow: hidden;             
}
.gauge > span {
  display: block;
  height: 100%;
  background: var(--accent, #5b9cff);
  border-radius: 999px;
  transition: width .25s ease;
}
.gauge.full > span { background: var(--down, #ef5350); }
.gauge + p { margin-top: 0; }
.me-exit {
  margin-top: 22px;
  padding-top: 14px;
  border-top: 1px solid var(--line, #232a36);
}
.me-exit-row {
  display: flex;
  justify-content: flex-end;    
  gap: 8px;
  margin-top: 10px;
}
.me-exit-row button { margin-top: 0; }
.acct-tabs { display: flex; gap: 6px; margin: 0 0 10px; }
.acct-tabs button {
  flex: 1;
  background: var(--panel-2, #12161f);
  border: 1px solid var(--line, #232a36);
  color: var(--muted, #929aa5);
  padding: 7px 10px;
  border-radius: 8px;
  font-size: 12px;
  cursor: pointer;
}
.acct-tabs button.on {
  color: var(--fg, #d1d4dc);
  border-color: var(--accent, #5b9cff);
  background: rgba(91, 156, 255, 0.10);
}
.acct-locked { font-style: normal; font-size: 10px; color: var(--dim, #6b7280); }
.jr-main {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 18px 18px 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 880px;
  width: 100%;
  margin: 0 auto;
}
.jr-intro h1 { margin: 0 0 6px; font-size: 19px; font-weight: 650; }
.jr-lead { margin: 0 0 10px; color: var(--fg-dim); font-size: 13px; line-height: 1.65; }
.jr-lead strong { color: var(--fg); font-weight: 600; }
.jr-safe {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 9px 11px;
  border: 1px solid rgba(38, 166, 154, .28);
  background: rgba(38, 166, 154, .08);
  border-radius: 8px;
  color: var(--fg-dim);
  font-size: 12px;
  line-height: 1.55;
}
.jr-safe strong { color: var(--ok); font-weight: 600; }
.jr-safe .ico { width: 16px; height: 16px; flex: none; stroke: var(--ok); }
.jr-in {
  padding: 12px;
  background: var(--panel);
  backdrop-filter: var(--glass);
  border: 1px solid var(--line);
  border-radius: 10px;
  transition: border-color .12s;
}
.jr-in.jr-over { border-color: var(--accent); }
.jr-lab {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: .02em;
}
.jr-in textarea {
  width: 100%;
  min-height: 148px;
  padding: 9px 10px;
  background: var(--bg);
  color: var(--fg);
  border: 1px solid var(--line);
  border-radius: 6px;
  font: inherit;
  font-size: 12px;
  line-height: 1.6;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  resize: vertical;
}
.jr-in textarea:focus { outline: none; border-color: var(--accent); }
.jr-in textarea::placeholder { color: var(--dim); }
.jr-acts { display: flex; align-items: center; gap: 8px; margin-top: 9px; flex-wrap: wrap; }
.jr-acts button { width: auto; margin-top: 0; padding: 7px 12px; white-space: nowrap; }
.jr-acts button.primary { padding: 7px 16px; }
.jr-hint { color: var(--dim); font-size: 11px; }
.jr-out { display: flex; flex-direction: column; gap: 12px; }
.jr-card {
  padding: 14px;
  background: var(--panel);
  backdrop-filter: var(--glass);
  border: 1px solid var(--line);
  border-radius: 10px;
}
.jr-who-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.jr-who h2 { margin: 3px 0 0; font-size: 17px; font-weight: 650; color: var(--accent-fg); }
.jr-sample { text-align: right; flex: none; }
.jr-sample strong { display: block; font-size: 21px; font-weight: 650; line-height: 1.2; }
.jr-sample span { color: var(--muted); font-size: 10.5px; }
.jr-rule { margin: 10px 0 0; color: var(--fg-dim); font-size: 12px; line-height: 1.6; }
.jr-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; }
.jr-tile {
  padding: 10px 12px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.jr-tile span { display: block; color: var(--muted); font-size: 11px; margin-bottom: 3px; }
.jr-tile strong { font-size: 15px; font-weight: 620; }
.jr-tile strong.up { color: var(--ok); }
.jr-tile strong.down { color: var(--err); }
.jr-tile.jr-wide { grid-column: 1 / -1; }
.jr-none { color: var(--dim); font-size: 12px; font-weight: 400; line-height: 1.6; }
.jr-pad { margin: 0; padding: 10px 12px; }
.jr-habits { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 8px; }
.jr-habit {
  padding: 11px 13px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-left: 2px solid var(--ok);
  border-radius: 8px;
}
.jr-habit.jr-warn { border-left-color: var(--accent-fg); }
.jr-habit h3 { margin: 0 0 4px; font-size: 12.5px; font-weight: 600; }
.jr-habit p { margin: 0; color: var(--fg-dim); font-size: 12px; line-height: 1.6; }
.jr-why {
  padding: 11px 13px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  border-radius: 8px;
}
.jr-why > span { display: block; color: var(--accent-fg); font-size: 11px; margin-bottom: 5px; }
.jr-why ul { margin: 0; padding-left: 16px; color: var(--fg-dim); font-size: 12px; line-height: 1.7; }
.jr-habit.jr-ok { border-left-color: var(--ok); }
.jr-habit.jr-next { border-left-color: var(--accent); background: var(--accent-soft); }
.jr-habit strong { color: var(--fg); font-weight: 600; }
.jr-eyebrow { margin: 0 0 4px; color: var(--accent-fg); font-size: 11.5px; letter-spacing: .02em; }
.jr-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  padding: 4px 6px 4px 8px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--fg-dim);
  font-size: 11.5px;
}
.jr-chip .ico { width: 14px; height: 14px; flex: none; }
.jr-chip button {
  width: auto;
  margin: 0;
  padding: 0 4px;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 14px;
  line-height: 1;
}
.jr-chip button:hover { color: var(--err); }
.jr-echo {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 11px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 12px;
}
.jr-echo .ico { width: 15px; height: 15px; flex: none; stroke: var(--muted); }
.jr-echo span { color: var(--muted); font-size: 11.5px; }
.jr-acts button:disabled { opacity: .45; cursor: not-allowed; }
.jr-acts button:disabled:hover { background: var(--accent); border-color: var(--accent); }
.jr-said { border-left: 2px solid var(--accent-fg); }
.jr-said p { margin: 6px 0 0; color: var(--fg); font-size: 13px; line-height: 1.75; }
.jr-send { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.jr-send button { width: auto; margin-top: 0; padding: 8px 16px; }
.jr-send .jr-hint strong { color: var(--fg-dim); }
.jr-ask {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0, 0, 0, .55);
  backdrop-filter: blur(2px);
}
.jr-ask-card {
  width: min(460px, 100%);
  max-height: 90vh;
  overflow-y: auto;
  padding: 18px;
  background: var(--panel-solid);
  border: 1px solid var(--line-2);
  border-radius: 12px;
}
.jr-ask-card h2 { margin: 0 0 10px; font-size: 15.5px; font-weight: 650; }
.jr-ask-list { margin: 0 0 12px; padding: 8px 10px; list-style: none;
  background: var(--bg); border: 1px solid var(--line); border-radius: 8px; }
.jr-ask-list li { display: flex; justify-content: space-between; gap: 10px;
  padding: 3px 0; font-size: 12px; }
.jr-ask-list span { color: var(--muted); }
.jr-ask-list b { font-weight: 600; }
.jr-ask-facts p { display: flex; gap: 8px; margin: 0 0 6px;
  color: var(--fg-dim); font-size: 12px; line-height: 1.6; }
.jr-ask-facts span { flex: none; width: 48px; color: var(--muted); }
.jr-ask-facts strong { color: var(--fg); font-weight: 600; }
.jr-ask-always { display: flex; align-items: center; gap: 7px; margin: 12px 0 14px;
  color: var(--fg-dim); font-size: 12px; cursor: pointer; }
.jr-ask-always input { width: auto; margin: 0; }
.jr-ask-acts { display: flex; justify-content: flex-end; gap: 8px; }
.jr-ask-acts button { width: auto; margin-top: 0; padding: 8px 14px; }
.jr-tools { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.jr-tools button { width: auto; margin-top: 0; padding: 6px 11px; font-size: 12px; }
.jr-mask { display: flex; align-items: center; gap: 6px; color: var(--fg-dim);
  font-size: 12px; cursor: pointer; }
.jr-mask input { width: auto; margin: 0; }
.jr-score-top { display: flex; align-items: center; gap: 16px; }
.jr-score-head { min-width: 0; }
.jr-score-head strong { display: block; font-size: 27px; font-weight: 650;
  line-height: 1.15; color: var(--accent-fg); }
.jr-score-head strong.jr-none { font-size: 15px; color: var(--dim); }
.jr-score-head > span { color: var(--muted); font-size: 11px; }
.jr-lab em { color: var(--dim); font-style: normal; font-size: 10.5px; }
.jr-dial {
  --deg: 0deg;
  position: relative;
  flex: none;
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: conic-gradient(var(--accent-fg) var(--deg), var(--line) 0);
}
.jr-dial b {
  position: absolute;
  inset: 9px;
  border-radius: 50%;
  background: var(--panel-solid);
}
.jr-parts { width: 100%; margin-top: 12px; border-collapse: collapse; font-size: 11.5px; }
.jr-parts th { padding: 4px 8px 4px 0; text-align: left; font-weight: 600;
  color: var(--fg-dim); white-space: nowrap; }
.jr-parts td { padding: 4px 8px 4px 0; color: var(--muted); }
.jr-parts .jr-got { color: var(--fg); font-weight: 600; white-space: nowrap; }
.jr-parts .jr-full { font-size: 10.5px; white-space: nowrap; }
.jr-parts .jr-bar { width: 100%; min-width: 60px; }
.jr-parts .jr-bar i { display: block; height: 5px; border-radius: 3px;
  background: var(--accent-fg); }
.jr-parts .jr-pt { text-align: right; color: var(--fg-dim); white-space: nowrap; }
.jr-parts .jr-wt { text-align: right; font-size: 10.5px; white-space: nowrap; }
.jr-fine { margin: 10px 0 0; color: var(--dim); font-size: 11px; line-height: 1.6; }
.jr-fine strong { color: var(--fg-dim); font-weight: 600; }
.jr-block { display: flex; flex-direction: column; gap: 8px; }
.jr-h { display: flex; align-items: baseline; gap: 8px; margin: 2px 0 0;
  font-size: 12.5px; font-weight: 600; color: var(--fg-dim); }
.jr-cals { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 10px; }
.jr-cal { padding: 10px 11px; background: var(--panel); backdrop-filter: var(--glass);
  border: 1px solid var(--line); border-radius: 10px; }
.jr-cal-top { display: flex; align-items: baseline; gap: 8px; margin-bottom: 8px; }
.jr-cal-top strong { font-size: 12.5px; font-weight: 650; }
.jr-cal-top span.up { color: var(--ok); font-weight: 600; font-size: 12px; }
.jr-cal-top span.down { color: var(--err); font-weight: 600; font-size: 12px; }
.jr-cal table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.jr-cal th { padding: 0 0 4px; color: var(--muted); font-size: 10px; font-weight: 500; }
.jr-cal th.jr-wk { color: var(--dim); }
.jr-day { height: 34px; padding: 2px; border: 1px solid transparent;
  border-radius: 5px; text-align: center; vertical-align: middle; }
.jr-day span { display: block; color: var(--dim); font-size: 9px; line-height: 1.1; }
.jr-day b { display: block; font-size: 10.5px; font-weight: 650; line-height: 1.25; }
.jr-day i { display: block; color: var(--muted); font-size: 8.5px;
  font-style: normal; line-height: 1.1; }
.jr-day.jr-empty b, .jr-day.jr-empty i { display: none; }
.jr-day.up { background: rgba(38, 166, 154, .13); border-color: rgba(38, 166, 154, .3); }
.jr-day.up b { color: var(--ok); }
.jr-day.down { background: rgba(239, 83, 80, .12); border-color: rgba(239, 83, 80, .28); }
.jr-day.down b { color: var(--err); }
.jr-wk { width: 46px; text-align: right; padding-right: 3px;
  font-size: 10px; font-weight: 600; color: var(--fg-dim); }
td.jr-wk.up { color: var(--ok); }
td.jr-wk.down { color: var(--err); }
td.jr-wk.jr-empty { color: transparent; }
.jr-wd { display: flex; flex-direction: column; gap: 5px; padding: 10px 11px;
  background: var(--bg); border: 1px solid var(--line); border-radius: 10px; }
.jr-wd-row { display: flex; align-items: center; gap: 9px; font-size: 11.5px; }
.jr-wd-name { flex: none; width: 16px; color: var(--fg-dim); font-weight: 600; }
.jr-wd-track { flex: 1; min-width: 40px; height: 6px; background: var(--line);
  border-radius: 3px; overflow: hidden; }
.jr-wd-track i { display: block; height: 100%; border-radius: 3px;
  background: var(--muted); }
.jr-wd-track i.up { background: var(--ok); }
.jr-wd-track i.down { background: var(--err); }
.jr-wd-row strong { flex: none; width: 84px; text-align: right; font-weight: 620; }
.jr-wd-row strong.up { color: var(--ok); }
.jr-wd-row strong.down { color: var(--err); }
@media print {
  header, .pagebar, .jr-in, .jr-tools, .jr-send, .jr-intro, #nav-mount,
  .jr-rt-new, .jr-ms-new, .jr-more, .jr-more-go,
  .jr-tabs, .jr-rep-bar { display: none; }
  body { background: #fff; color: #111; }
  .jr-card, .jr-tile, .jr-cal, .jr-wd, .jr-hr, .jr-rt, .jr-ms, .jr-why,
  .jr-habit, .jr-echo {
    background: #fff;
    border-color: #ccc;
    backdrop-filter: none;
    break-inside: avoid;
  }
  .jr-block, .jr-tiles { break-inside: avoid; }
  .jr-dial b { background: #fff; }
  .jr-lab, .jr-hint, .jr-fine, .jr-none, .jr-tile span, .jr-parts td { color: #555; }
  .jr-who h2, .jr-score-head strong { color: #111; }
}
.pl-adhere {
  margin: 0 0 10px;
  padding: 11px 13px;
  background: var(--panel);
  backdrop-filter: var(--glass);
  border: 1px solid var(--line);
  border-radius: 10px;
}
.pl-adh-top { display: flex; align-items: baseline; gap: 9px; flex-wrap: wrap; }
.pl-adh-lab { color: var(--accent-fg); font-size: 11.5px; }
.pl-adh-top strong { font-size: 19px; font-weight: 650; line-height: 1.2; }
.pl-adh-list { display: flex; flex-direction: column; gap: 3px; margin-top: 9px; }
.pl-adh-row { display: flex; align-items: baseline; gap: 9px; padding: 4px 0;
  border-top: 1px solid var(--line); font-size: 12px; }
.pl-adh-row:first-child { border-top: none; }
.pl-adh-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; color: var(--fg); }
.pl-adh-row strong { flex: none; width: 96px; text-align: right; font-weight: 620; }
.pl-adh-row strong.up { color: var(--ok); }
.pl-adh-row strong.down { color: var(--err); }
.pl-adh-hand { border-top: 1px solid var(--line-2); }
.pl-adh-hand .pl-adh-name { color: var(--accent-fg); }
.pl-adh-gone .pl-adh-name { color: var(--muted); }
.pl-adh-why { margin: 8px 0 0; color: var(--dim); font-size: 11px; line-height: 1.6; }
.jr-block:empty { display: none; }
.jr-band { display: flex; align-items: center; gap: 5px;
  color: var(--fg-dim); font-size: 12px; }
.jr-band input { width: 78px; margin: 0; padding: 4px 7px; text-align: right;
  background: var(--bg); border: 1px solid var(--line); border-radius: 6px;
  color: var(--fg); font-size: 12px; }
.jr-band input:focus { outline: none; border-color: var(--accent); }
.jr-rt, .jr-ms {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 10px 12px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 10px;
}
.jr-rt-phase { display: flex; flex-direction: column; gap: 3px; }
.jr-rt-lab { color: var(--accent-fg); font-size: 10.5px; letter-spacing: .02em; }
.jr-rt-row { display: flex; align-items: center; gap: 8px;
  padding: 3px 0; font-size: 12.5px; cursor: pointer; }
.jr-rt-row input { width: auto; margin: 0; flex: none; }
.jr-rt-text { flex: 1; min-width: 0; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; }
.jr-rt-row button, .jr-ms-list button {
  width: auto; margin: 0; padding: 0 4px; flex: none;
  background: none; border: none; color: var(--muted);
  font-size: 14px; line-height: 1;
}
.jr-rt-row button:hover, .jr-ms-list button:hover { color: var(--err); }
.jr-rt-off { opacity: .45; cursor: default; }
.jr-rt-new, .jr-ms-new { display: flex; align-items: center; gap: 6px;
  flex-wrap: wrap; padding-top: 7px; border-top: 1px solid var(--line); }
.jr-rt-new input[data-new], .jr-ms-new input {
  flex: 1; min-width: 110px; margin: 0; padding: 5px 8px;
  background: var(--page); border: 1px solid var(--line); border-radius: 6px;
  color: var(--fg); font-size: 12px;
}
.jr-rt-new select { width: auto; margin: 0; padding: 5px 7px; font-size: 12px; }
.jr-rt-new button, .jr-ms-new button {
  width: auto; margin: 0; padding: 5px 11px; font-size: 12px; white-space: nowrap;
}
.jr-rt-days { display: flex; gap: 2px; flex: none; }
.jr-rt-days label { display: flex; flex-direction: column; align-items: center;
  gap: 1px; color: var(--muted); font-size: 9.5px; cursor: pointer; }
.jr-rt-days input { width: auto; margin: 0; }
.jr-rt-hist { display: flex; align-items: flex-end; gap: 10px;
  flex-wrap: wrap; padding-top: 7px; border-top: 1px solid var(--line); }
.jr-rt-bars { display: flex; align-items: flex-end; gap: 3px;
  height: 34px; flex: none; }
.jr-rt-bars i { display: block; width: 8px; border-radius: 2px 2px 0 0;
  background: var(--muted); }
.jr-rt-bars i.up { background: var(--ok); }
.jr-rt-bars i.down { background: var(--err); }
.jr-rt-bars i.jr-wk-none { height: 2px !important; background: var(--line-2); }
.jr-ms-list { margin: 0; padding: 0; list-style: none;
  display: flex; flex-direction: column; gap: 2px; }
.jr-ms-list li { display: flex; align-items: baseline; gap: 8px;
  padding: 3px 0; font-size: 12px; }
.jr-ms-day { flex: none; color: var(--muted); font-size: 10.5px;
  font-variant-numeric: tabular-nums; }
.jr-ms-list strong { flex: none; font-weight: 620; }
.jr-ms-note { flex: 1; min-width: 0; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; color: var(--fg-dim); }
.jr-ms-new input[type="date"] { flex: none; min-width: 0; width: 132px; }
.jr-hr { display: flex; align-items: flex-end; gap: 3px;
  padding: 10px 11px; background: var(--bg);
  border: 1px solid var(--line); border-radius: 10px; }
.jr-hr-col { flex: 1; min-width: 0; display: flex; flex-direction: column;
  align-items: center; gap: 3px; }
.jr-hr-bar { display: flex; align-items: flex-end; justify-content: center;
  width: 100%; height: 46px; }
.jr-hr-bar i { display: block; width: 100%; max-width: 22px;
  border-radius: 2px 2px 0 0; background: var(--muted); }
.jr-hr-bar i.up { background: var(--ok); }
.jr-hr-bar i.down { background: var(--err); }
.jr-hr-col b { color: var(--muted); font-size: 9.5px; font-weight: 500; }
.jr-hr-col i { color: var(--dim); font-size: 9px; font-style: normal;
  line-height: 1; min-height: 9px; }
.jr-more {
  position: fixed;
  inset: 0;
  z-index: 70;
  overflow-y: auto;
  padding: 14px;
  background: rgba(0, 0, 0, .62);
  backdrop-filter: blur(3px);
}
.jr-more-card {
  max-width: 1040px;
  margin: 0 auto;
  background: var(--panel-solid);
  border: 1px solid var(--line-2);
  border-radius: 12px;
}
.jr-more-bar {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: var(--panel-solid);
  border-bottom: 1px solid var(--line);
  border-radius: 12px 12px 0 0;
}
.jr-more-bar h3 { margin: 0; font-size: 15px; font-weight: 650; }
.jr-more-bar button { width: auto; margin: 0; padding: 6px 13px; font-size: 12px; }
.jr-more-body { display: flex; flex-direction: column; gap: 12px; padding: 14px 16px 18px; }
.jr-more-go { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.jr-more-go button { width: auto; margin-top: 0; padding: 8px 16px; }
.jr-rep-top { margin: 0; color: var(--fg-dim); font-size: 12px; }
.jr-rep-top strong { color: var(--fg); font-weight: 600; }
.jr-rep-wide > * { margin: 0; }
.jr-rep-h { margin: 4px 0 0; font-size: 12.5px; font-weight: 600; color: var(--fg-dim); }
.jr-rep-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 10px; align-items: start; }
.jr-rep-card { padding: 11px 13px; background: var(--bg);
  border: 1px solid var(--line); border-radius: 10px; }
.jr-rep-card h4 { margin: 0 0 8px; font-size: 12.5px; font-weight: 600; }
.jr-rep-scroll { max-height: 320px; overflow: auto; }
.jr-rep-tb { width: 100%; border-collapse: collapse; font-size: 11.5px; }
.jr-rep-tb thead th {
  position: sticky;
  top: 0;
  padding: 3px 6px;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-weight: 500;
  text-align: right;
  white-space: nowrap;
}
.jr-rep-tb thead th:first-child { text-align: left; }
.jr-rep-tb td { padding: 3px 6px; border-bottom: 1px solid var(--line); }
.jr-rep-tb tbody tr:last-child td { border-bottom: none; }
.jr-rep-key { max-width: 150px; overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; color: var(--fg); font-weight: 600; }
.jr-num { text-align: right; font-variant-numeric: tabular-nums;
  color: var(--fg-dim); white-space: nowrap; }
.jr-num.up { color: var(--ok); }
.jr-num.down { color: var(--err); }
.jr-rep-card .jr-fine { margin-top: 7px; }
.jr-rep-card code { padding: 0 3px; background: var(--page);
  border-radius: 3px; font-size: 10.5px; }
.jr-rep-foot { margin: 2px 0 0; }
.jr-rep-foot a { color: var(--accent-fg); }
.jr-tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.jr-tabs button { width: auto; margin: 0; padding: 6px 12px; font-size: 12px;
  background: var(--bg); border: 1px solid var(--line); color: var(--fg-dim); }
.jr-tabs button:hover { border-color: var(--line-2); color: var(--fg); }
.jr-tabs button.primary { background: var(--accent); border-color: var(--accent);
  color: #fff; }
.jr-rep-pane { display: flex; flex-direction: column; gap: 12px; }
.jr-rep-bar { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; }
.jr-pick { display: flex; flex-direction: column; gap: 3px;
  color: var(--muted); font-size: 11px; }
.jr-pick select { width: auto; margin: 0; padding: 5px 8px; font-size: 12px;
  background: var(--bg); border: 1px solid var(--line); border-radius: 6px;
  color: var(--fg); }
.jr-panes { display: flex; flex-direction: column; gap: 2px;
  padding: 10px 11px; background: var(--bg);
  border: 1px solid var(--line); border-radius: 10px; }
.jr-pane { display: block; width: 100%; height: auto; overflow: visible; }
.jr-pane-low { margin-top: 2px; }
.jr-pane rect.up { fill: var(--ok); }
.jr-pane rect.down { fill: var(--err); }
.jr-pane rect.jr-flat { fill: var(--line-2); }
.jr-zero { stroke: var(--line-2); stroke-width: 1; stroke-dasharray: 3 3; }
.jr-ax { fill: var(--muted); font-size: 9px; }
.jr-trend { fill: none; stroke: var(--accent-fg); stroke-width: 1.8;
  stroke-linejoin: round; stroke-linecap: round; }
.jr-area { fill: var(--accent-soft); stroke: none; }
.jr-dot circle { fill: var(--muted); }
.jr-pt { fill-opacity: .55; stroke-width: 1; }
.jr-pt.up { fill: var(--ok); stroke: var(--ok); }
.jr-pt.down { fill: var(--err); stroke: var(--err); }
.jr-pt.jr-flat { fill: var(--line-2); stroke: var(--line-2); }
.jr-pt:hover, .jr-pt:focus { fill-opacity: .9; }
.jr-x-tb th { text-align: center; }
.jr-x-tb th:first-child { text-align: left; }
.jr-x, .jr-x-none { text-align: center; font-variant-numeric: tabular-nums;
  white-space: nowrap; }
.jr-x { --w: 0%; }
.jr-x.up { background: color-mix(in srgb, var(--ok) var(--w), transparent); }
.jr-x.down { background: color-mix(in srgb, var(--err) var(--w), transparent); }
.jr-x-none { color: var(--dim); }
.jr-x:focus { outline: 1px solid var(--accent-fg); outline-offset: -1px; }
