body.technical-analysis-active .content-area > :not(#technical-analysis-panel) {
  display: none !important;
}

body.technical-analysis-active .content-area {
  overflow-x: hidden !important;
  overflow-y: auto !important;
  overscroll-behavior-y: contain;
}

.technical-analysis-panel {
  position: relative;
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  padding: 18px 22px 24px;
  color: #1f2937;
  background: #f5f7f9;
  letter-spacing: 0;
  overflow-x: hidden;
}

#technical-analysis-panel {
  padding: 12px 8px 18px;
}

#technical-analysis-panel .technical-page-header {
  margin-bottom: 8px;
}

#technical-analysis-panel .technical-kicker {
  font-size: 9px;
}

#technical-analysis-panel .technical-heading h1 {
  font-size: 20px;
  line-height: 1.2;
}

#technical-analysis-panel .technical-stock-identity {
  margin-top: 3px;
}

#technical-analysis-panel .technical-stock-name {
  font-size: 14px;
}

#technical-analysis-panel .technical-stock-meta {
  font-size: 11px;
}

#technical-analysis-panel .technical-search-input,
#technical-analysis-panel .technical-header-actions .technical-primary-button,
#technical-analysis-panel .technical-header-actions .technical-segmented button {
  height: 30px;
}

#technical-analysis-panel .technical-header-actions .technical-icon-button {
  width: 30px;
  height: 30px;
  flex-basis: 30px;
}

#technical-analysis-panel .technical-periods {
  margin-bottom: 6px;
  padding: 1px;
}

#technical-analysis-panel .technical-periods button {
  height: 24px;
}

#technical-analysis-panel .technical-chart-toolbar {
  min-height: 36px;
  padding: 2px 6px;
}

#technical-analysis-panel .technical-chart-toolbar .technical-toggle,
#technical-analysis-panel .technical-chart-toolbar .technical-osc-button,
#technical-analysis-panel .technical-chart-toolbar .technical-icon-button {
  height: 26px;
}

#technical-analysis-panel .technical-chart-toolbar .technical-icon-button {
  width: 26px;
  flex-basis: 26px;
}

.technical-load-overlay {
  position: absolute;
  inset: 0;
  z-index: 30;
  display: flex;
  min-height: 520px;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  padding: 24px;
  background: rgba(247, 249, 252, 0.96);
}

.technical-load-overlay[hidden] {
  display: none !important;
}

.technical-load-overlay.is-error {
  background: rgba(255, 247, 247, 0.98);
}

.technical-load-overlay.is-error .technical-loading-card {
  border-color: #e0b4b4;
}

.technical-load-overlay.is-error .technical-load-title {
  color: #9d3434;
}

.technical-load-progress {
  width: 100%;
}

.technical-load-title,
.technical-load-detail {
  display: block;
}

.technical-load-title {
  margin-top: 16px;
  color: #16243a;
  font-size: 18px;
}

.technical-load-detail {
  min-height: 1.5em;
  margin-top: 8px;
  color: #64748b;
}

.terminator-monochrome .technical-load-overlay {
  background: rgba(244, 244, 244, 0.97);
}

.technical-analysis-panel[hidden] {
  display: none !important;
}

.technical-analysis-inline-panel {
  box-sizing: border-box;
  display: block;
  width: 100%;
  max-width: none;
  min-height: 0;
  margin: 0;
  padding: 0;
  background: #fff;
}

.technical-analysis-inline-panel .technical-page-header {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  max-width: none;
  margin: 0;
  padding: 6px 8px;
  border-bottom: 1px solid #d4dde4;
  background: #fff;
}

.technical-analysis-inline-panel .technical-heading,
.technical-analysis-inline-panel .technical-search {
  display: none;
}

.technical-analysis-inline-panel .technical-periods,
.technical-analysis-inline-panel .technical-chart-toolbar,
.technical-analysis-inline-panel .technical-warning,
.technical-analysis-inline-panel .technical-status,
.technical-analysis-inline-panel .technical-chart-shell,
.technical-analysis-inline-panel .technical-data-note,
.technical-analysis-inline-panel .technical-chart-height-resizer {
  max-width: none;
}

.technical-analysis-inline-panel .technical-periods {
  margin-top: 0;
}

.technical-page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  box-sizing: border-box;
  width: 100%;
  max-width: none;
  margin: 0 auto 14px;
}

.technical-heading {
  min-width: 0;
}

.technical-kicker {
  display: block;
  margin-bottom: 3px;
  color: #597086;
  font-size: 11px;
  font-weight: 700;
}

.technical-heading h1 {
  margin: 0;
  color: #162536;
  font-size: 24px;
  line-height: 1.25;
  letter-spacing: 0;
}

.technical-stock-identity {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-top: 6px;
}

.technical-stock-name {
  color: #172b3d;
  font-size: 16px;
}

.technical-stock-meta,
.technical-data-note {
  color: #6b7f91;
  font-size: 12px;
}

.technical-header-actions,
.technical-search,
.technical-segmented,
.technical-periods,
.technical-chart-toolbar,
.technical-legend-group,
.technical-indicator-legends,
.technical-legend-row,
.technical-osc-controls,
.technical-subpanel-controls,
.technical-dialog-actions {
  display: flex;
  align-items: center;
}

.technical-header-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.technical-search {
  gap: 6px;
}

.technical-search-field {
  position: relative;
}

.technical-search-input {
  box-sizing: border-box;
  width: 220px;
  height: 36px;
  padding: 0 11px;
  border: 1px solid #becbd7;
  border-radius: 4px;
  outline: 0;
  background: #fff;
  color: #1f2937;
  font: inherit;
  font-size: 13px;
}

.technical-search-input:focus {
  border-color: #3475a8;
  box-shadow: 0 0 0 3px rgba(52, 117, 168, 0.14);
}

.technical-search-suggestions {
  position: absolute;
  z-index: 30;
  top: calc(100% + 5px);
  right: 0;
  width: 300px;
  overflow: hidden;
  border: 1px solid #cad5df;
  border-radius: 4px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(23, 43, 61, 0.16);
}

.technical-search-suggestions[hidden],
.technical-dialog-overlay[hidden],
.technical-status[hidden],
.technical-warning[hidden] {
  display: none !important;
}

.technical-search-option {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border: 0;
  border-bottom: 1px solid #edf1f4;
  background: #fff;
  color: #263849;
  text-align: left;
  cursor: pointer;
}

.technical-search-option:hover,
.technical-search-option:focus-visible {
  background: #eef5fa;
}

.technical-search-option span {
  overflow: hidden;
  color: #708294;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.technical-primary-button,
.technical-secondary-button,
.technical-toggle,
.technical-osc-button,
.technical-segmented button,
.technical-periods button,
.technical-icon-button {
  box-sizing: border-box;
  height: 34px;
  border: 1px solid #bdcad5;
  border-radius: 4px;
  background: #fff;
  color: #33475a;
  font-family: inherit;
  font-size: 13px;
  letter-spacing: 0;
  cursor: pointer;
}

.technical-primary-button {
  padding: 0 15px;
  border-color: #286c9e;
  background: #286c9e;
  color: #fff;
}

.technical-secondary-button {
  padding: 0 13px;
}

.technical-icon-button {
  display: inline-flex;
  width: 34px;
  flex: 0 0 34px;
  align-items: center;
  justify-content: center;
  padding: 0;
  font-size: 17px;
  line-height: 1;
}

.technical-primary-button:hover,
.technical-icon-button:hover,
.technical-secondary-button:hover,
.technical-toggle:hover,
.technical-osc-button:hover,
.technical-segmented button:hover,
.technical-periods button:hover {
  border-color: #6190b3;
}

.technical-primary-button:disabled,
.technical-icon-button:disabled,
.technical-search-submit:disabled {
  cursor: wait;
  opacity: 0.58;
}

.technical-segmented,
.technical-periods {
  gap: 2px;
  padding: 2px;
  border: 1px solid #cbd5df;
  border-radius: 5px;
  background: #e9eef2;
}

.technical-segmented button,
.technical-periods button {
  height: 30px;
  padding: 0 12px;
  border-color: transparent;
  background: transparent;
}

.technical-segmented button.active,
.technical-periods button.active,
.technical-toggle.active,
.technical-osc-button.active {
  border-color: #7e9fba;
  background: #fff;
  color: #174f78;
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(27, 56, 82, 0.1);
}

.technical-periods {
  box-sizing: border-box;
  width: 100%;
  max-width: none;
  margin: 0 auto 8px;
  overflow-x: auto;
  background: #e7ecef;
}

.technical-periods button {
  min-width: 72px;
  flex: 0 0 auto;
}

.technical-chart-toolbar {
  box-sizing: border-box;
  width: 100%;
  max-width: none;
  min-height: 44px;
  margin: 0 auto;
  padding: 5px 8px;
  flex-wrap: wrap;
  gap: 8px 14px;
  border: 1px solid #d4dde4;
  border-bottom: 0;
  background: #fff;
}

.technical-main-legend,
.technical-osc-controls {
  gap: 4px;
}

.technical-toggle,
.technical-osc-button {
  height: 30px;
  padding: 0 10px;
}

.technical-chart-toolbar .technical-icon-button {
  width: 30px;
  height: 30px;
  flex-basis: 30px;
  font-size: 14px;
}

.technical-subpanel-controls {
  gap: 4px;
  margin-left: auto;
}

.technical-subpanel-controls .technical-toggle {
  white-space: nowrap;
}

.technical-indicator-legends {
  min-width: 0;
  flex: 1 1 420px;
  gap: 10px;
}

.technical-legend-row {
  min-width: 0;
  gap: 5px;
  color: #405366;
  font-size: 12px;
}

.technical-legend-values {
  overflow: hidden;
  max-width: 140px;
  color: #718294;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.technical-status,
.technical-warning,
.technical-data-note,
.technical-chart {
  box-sizing: border-box;
  width: 100%;
  max-width: none;
  margin-right: auto;
  margin-left: auto;
}

.technical-warning {
  padding: 8px 12px;
  border: 1px solid #e6c879;
  border-bottom: 0;
  background: #fff9e8;
  color: #795d16;
  font-size: 12px;
}

.technical-status {
  display: flex;
  min-height: 62px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid #d4dde4;
  border-bottom: 0;
  background: #fff;
}

.technical-status-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.technical-status-copy small {
  color: #6f8191;
}

.technical-status-error {
  background: #fff5f5;
  color: #9d3434;
}

.technical-status-warning {
  background: #fff9e8;
  color: #795d16;
}

.technical-header-actions .technical-status {
  width: auto;
  max-width: 360px;
  min-height: 34px;
  margin: 0;
  padding: 5px 8px;
  justify-content: flex-start;
  border: 1px solid #d4dde4;
  border-radius: 4px;
  font-size: 12px;
}

.technical-header-actions .technical-status-copy {
  min-width: 0;
  flex-direction: row;
  align-items: baseline;
  gap: 5px;
}

.technical-header-actions .technical-status-copy strong,
.technical-header-actions .technical-status-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.technical-header-actions .technical-spinner {
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
}

.technical-status-action {
  height: 26px;
  flex: 0 0 auto;
  padding: 0 8px;
  border: 1px solid currentColor;
  border-radius: 4px;
  background: #fff;
  color: inherit;
  cursor: pointer;
}

.technical-status-action:disabled {
  cursor: wait;
  opacity: 0.62;
}

.technical-spinner {
  box-sizing: border-box;
  width: 20px;
  height: 20px;
  border: 2px solid #c7d7e4;
  border-top-color: #286c9e;
  border-radius: 50%;
  animation: technical-spin 700ms linear infinite;
}

@keyframes technical-spin {
  to { transform: rotate(360deg); }
}

.technical-chart-shell {
  position: relative;
  box-sizing: border-box;
  width: 100%;
  max-width: none;
  height: var(--technical-chart-height, 960px);
  margin-right: auto;
  margin-left: auto;
}

.technical-chart {
  width: 100%;
  height: var(--technical-chart-height, 960px);
  border: 1px solid #d4dde4;
  background: #fff;
}

.technical-chart-resize-layer {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
}

.technical-chart-value-layer {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.technical-chart-value-label {
  position: absolute;
  left: 72px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 12px;
  max-width: none;
  min-height: 18px;
  padding: 0 4px;
  border: 0;
  background: rgba(255, 255, 255, .78);
  color: #405366;
  font-size: 11px;
  line-height: 18px;
  overflow: hidden;
}

.technical-chart-value-entry {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}

.technical-chart-value-name {
  color: #405366;
}

.technical-chart-value-number {
  font-variant-numeric: tabular-nums;
}

.technical-chart-resize-handle {
  position: absolute;
  left: 54px;
  right: 12px;
  height: 9px;
  padding: 0;
  border: 0;
  border-top: 2px solid transparent;
  background: transparent;
  cursor: row-resize;
  pointer-events: auto;
  transform: translateY(-50%);
}

.technical-chart-resize-handle::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 50%;
  width: 42px;
  height: 3px;
  border-radius: 2px;
  background: #c8d5e1;
  opacity: .35;
  transform: translateX(-50%);
  transition: opacity .15s, background .15s, width .15s;
}

.technical-chart-resize-handle:hover,
.technical-chart-resize-handle:focus,
.technical-chart-resize-handle.active {
  outline: none;
  border-top-color: rgba(37, 99, 166, .35);
}

.technical-chart-resize-handle:hover::after,
.technical-chart-resize-handle:focus::after,
.technical-chart-resize-handle.active::after {
  width: 72px;
  background: #2563a6;
  opacity: .9;
}

body.technical-chart-resizing {
  cursor: row-resize !important;
  user-select: none !important;
}

.technical-chart-height-resizer {
  position: relative;
  box-sizing: border-box;
  display: block;
  width: 100%;
  max-width: none;
  height: 14px;
  margin: 0;
  padding: 0;
  border: 1px solid #d4dde4;
  border-top: 0;
  background: #f7f9fb;
  cursor: ns-resize;
}

.technical-chart-height-resizer::after {
  content: '';
  position: absolute;
  top: 5px;
  left: 50%;
  width: 52px;
  height: 3px;
  border-radius: 2px;
  background: #b8c6d2;
  transform: translateX(-50%);
  transition: width .15s, background .15s;
}

.technical-chart-height-resizer:hover,
.technical-chart-height-resizer:focus,
.technical-chart-height-resizer.active {
  outline: none;
  background: #eef4f8;
}

.technical-chart-height-resizer:hover::after,
.technical-chart-height-resizer:focus::after,
.technical-chart-height-resizer.active::after {
  width: 88px;
  background: #2563a6;
}

body.technical-chart-height-resizing {
  cursor: ns-resize !important;
  user-select: none !important;
}

.technical-data-note {
  min-height: 32px;
  padding: 8px 10px;
  border: 1px solid #d4dde4;
  border-top: 0;
  background: #fff;
  text-align: right;
}

.technical-data-note.is-stale {
  color: #9a6c18;
}

.technical-dialog-overlay {
  position: fixed;
  z-index: 3000;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(20, 32, 43, 0.46);
}

.technical-dialog {
  box-sizing: border-box;
  width: min(420px, 100%);
  max-height: calc(100vh - 40px);
  overflow: auto;
  padding: 18px;
  border: 1px solid #c8d2db;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 18px 50px rgba(20, 32, 43, 0.24);
}

.technical-dialog h3 {
  margin: 0 0 4px;
  font-size: 17px;
  letter-spacing: 0;
}

.technical-dialog-note {
  margin: 0 0 14px;
  color: #6d7f8f;
  font-size: 12px;
}

.technical-parameter-rows {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}

.technical-parameter-row,
.technical-kdj-field {
  display: flex;
  align-items: center;
  gap: 6px;
}

.technical-parameter-input {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  height: 34px;
  padding: 0 9px;
  border: 1px solid #bdcad5;
  border-radius: 4px;
  font: inherit;
}

.technical-kdj-field {
  justify-content: space-between;
  margin-bottom: 9px;
}

.technical-kdj-field .technical-parameter-input {
  width: 160px;
}

.technical-remove {
  color: #a33f48;
}

.technical-dialog-actions {
  justify-content: flex-end;
  gap: 8px;
  margin-top: 16px;
}

.stock-detail-technical-button {
  box-sizing: border-box;
  height: 36px;
  padding: 0 13px;
  border: 1px solid #6f92ad;
  border-radius: 4px;
  background: #fff;
  color: #1b5a83;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}

.stock-detail-technical-button:hover {
  background: #eef5fa;
}

@media (max-width: 900px) {
  .technical-analysis-panel { padding: 14px 12px 20px; }
  .technical-page-header { align-items: stretch; flex-direction: column; gap: 10px; }
  .technical-header-actions { justify-content: flex-start; }
  .technical-search { flex: 1 1 260px; }
  .technical-search-field { flex: 1; }
  .technical-search-input { width: 100%; }
  .technical-indicator-legends { order: 3; flex-basis: 100%; flex-wrap: wrap; }
}

@media (min-width: 1100px) {
  .technical-chart-value-label {
    flex-wrap: nowrap;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

@media (max-width: 560px) {
  .technical-heading h1 { font-size: 21px; }
  .technical-header-actions { display: grid; grid-template-columns: minmax(0, 1fr) auto; }
  .technical-search { grid-column: 1 / -1; }
  .technical-header-actions .technical-status { grid-column: 1 / -1; width: 100%; max-width: none; }
  .technical-search-suggestions { right: auto; left: 0; width: min(300px, calc(100vw - 24px)); }
  .technical-periods button { min-width: 64px; padding: 0 8px; }
  .technical-main-legend { flex: 1 1 100%; }
  .technical-indicator-legends { display: grid; grid-template-columns: 1fr; }
  .technical-osc-controls { overflow-x: auto; width: 100%; }
  .technical-data-note { text-align: left; line-height: 1.6; }
  .technical-parameter-rows { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .technical-spinner { animation-duration: 1.4s; }
}
.technical-analysis-loading-shell {
  position: fixed;
  inset: 66px 0 0;
  z-index: 880;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  padding: 24px;
  background: #f7f9fc;
}

.technical-analysis-loading-shell[hidden] {
  display: none !important;
}

.technical-loading-card {
  width: min(420px, calc(100vw - 48px));
  padding: 28px;
  border: 1px solid #d8e2ef;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 12px 36px rgba(37, 99, 166, 0.12);
  text-align: center;
}

.technical-loading-progress {
  width: 100%;
  margin-bottom: 16px;
}

.technical-loading-progress-track {
  display: block;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #e7edf5;
}

.technical-loading-progress-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #2563a6;
  transition: width 180ms ease;
}

.technical-loading-title,
.technical-loading-detail {
  display: block;
}

.technical-loading-title {
  color: #16243a;
  font-size: 18px;
}

.technical-loading-detail {
  min-height: 1.5em;
  margin-top: 8px;
  color: #64748b;
}

.technical-loading-reload {
  margin-top: 20px;
  padding: 8px 20px;
  border: 1px solid #b9c9dc;
  border-radius: 6px;
  background: #fff;
  color: #2563a6;
  cursor: pointer;
}

.technical-loading-reload:hover {
  border-color: #2563a6;
  background: #f1f6fc;
}

.terminator-monochrome .technical-analysis-loading-shell {
  background: #f4f4f4;
}

.terminator-monochrome .technical-loading-card {
  border-color: #aaa;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.12);
}

.terminator-monochrome .technical-loading-progress-fill {
  background: #333;
}

@media (max-width: 720px) {
  .technical-analysis-loading-shell {
    inset: 92px 0 0;
    padding: 16px;
  }

  .technical-loading-card {
    padding: 22px 18px;
  }
}
