/* r321: Chart settings (double-click a candle / Settings) in a pro two-column layout. Theme variables only. */
.modal-box.set321 { width: min(760px, calc(100vw - 32px)); height: min(600px, 88dvh); max-height: none; padding: 0; display: flex; flex-direction: column; overflow: hidden; border-radius: 12px; }
.set321 > .mh { display: flex; align-items: center; gap: 10px; padding: 14px 14px 12px 18px; border-bottom: 1px solid var(--hair); flex: none; }
.set321 > .mh b { font-size: 16px; font-weight: 650; }
.set321 .set321-sym { padding: 3px 8px; border-radius: 6px; background: var(--fill); color: var(--t2); font-size: 11.5px; font-weight: 600; white-space: nowrap; }
.set321 .st-wrap { flex: 1; min-height: 0; display: grid; grid-template-columns: 200px minmax(0, 1fr); }
.set321 .st-nav { display: flex; flex-direction: column; gap: 2px; padding: 10px 8px; border-right: 1px solid var(--hair); background: transparent; overflow-y: auto; }
.set321 .st-nav button { display: flex; align-items: center; gap: 10px; min-height: 38px; padding: 0 12px; border: 0; border-radius: 8px; background: transparent; color: var(--t2); font: inherit; font-size: 13px; font-weight: 500; text-align: left; cursor: pointer; }
.set321 .st-nav button svg { width: 17px; height: 17px; flex: none; color: var(--t3); }
.set321 .st-nav button:hover { background: var(--fill); color: var(--t1); }
.set321 .st-nav button.on { background: var(--fill-2); color: var(--t1); font-weight: 650; }
.set321 .st-nav button.on svg { color: var(--t1); }
.set321 .st-body { min-height: 0; overflow-y: auto; padding: 6px 22px 18px; overscroll-behavior: contain; }
.set321 .st-h { margin: 16px 0 6px; padding: 0; font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--t3); }
.set321 .st-h:first-child { margin-top: 10px; }
.set321 .st-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 40px; padding: 2px 0; border: 0; }
.set321 .st-l { font-size: 13px; color: var(--t1); }
.set321 .st-ck { display: inline-flex; align-items: center; gap: 10px; font-size: 13px; color: var(--t1); cursor: pointer; }
.set321 .st-ck input[type=checkbox] { width: 16px; height: 16px; margin: 0; accent-color: var(--t1); }
.set321 .st-sws { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; }
.set321 .st-sws .bb { height: 28px; padding: 0 8px; border-radius: 7px; font-size: 11.5px; color: var(--t3); }
.set321 .sw-c.big { width: 30px; height: 30px; border-radius: 7px; border: 1px solid var(--hair); box-shadow: inset 0 0 0 3px var(--card); background: var(--c); }
.set321 .st-row select, .set321 .st-body select, .set321 .st-body input[type=number], .set321 .st-body input[type=text] { width: 230px; max-width: 58%; height: 34px; padding: 0 10px; border: 1px solid var(--hair); border-radius: 8px; background: var(--fill); color: var(--t1); font: inherit; font-size: 13px; }
.set321 .st-body select:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); }
.set321 .st-note { margin: 8px 0 4px; padding: 10px 12px; border-radius: 8px; background: var(--fill); color: var(--t3); font-size: 11.5px; line-height: 1.5; }
.set321 .st-foot { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--hair); background: var(--card); flex: none; }
.set321 .st-foot select { height: 34px; padding: 0 10px; border: 1px solid var(--hair); border-radius: 8px; background: var(--fill); color: var(--t1); font: inherit; font-size: 12.5px; }
.set321 .st-foot .btn, .set321 .st-foot .bb { height: 34px; }
@media (max-width: 640px) {
  .modal-box.set321 { width: 100%; height: 100%; border-radius: 0; }
  .set321 .st-wrap { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
  .set321 .st-nav { flex-direction: row; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--hair); padding: 8px; scrollbar-width: none; }
  .set321 .st-nav button { flex: none; min-height: 34px; border: 1px solid var(--hair); border-radius: 999px; }
  .set321 .st-nav button svg { display: none; }
  .set321 .st-body { padding: 4px 14px 16px; }
  .set321 .st-row { min-height: 46px; }
  .set321 .st-body select { max-width: 55%; height: 40px; }
  .set321 .st-foot { flex-wrap: wrap; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); }
  .set321 .st-foot #stTpl { flex: 1; }
}
