* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  background: #020617;
  overscroll-behavior: none;
}

:root {
  --primary: #6366f1;
  --primary-glow: rgba(99, 102, 241, 0.4);
  --secondary: #a855f7;
  --bg: #020617;
  --card: rgba(30, 41, 59, 0.7);
  --card-border: rgba(255, 255, 255, 0.1);
  --text: #f8fafc;
  --text-muted: #94a3b8;
  --success: #10b981;
  --danger: #ef4444;
}

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&family=Outfit:wght@400;600;700&display=swap');

body {
  font-family: 'Outfit', 'Inter', sans-serif;
  background: radial-gradient(circle at top right, #1e1b4b, #020617 60%);
  background-attachment: fixed;
  color: var(--text);
  margin: 0;
  padding: 12px;
  font-size: 12px;
  box-sizing: border-box;
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.view-transition {
  /* 효과 없음 */
}

.grabbing {
  cursor: grabbing !important;
  transition: none !important;
}

.snap-back {
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
}

.card,
.slim-scroll {
  overscroll-behavior: none;
  -webkit-overflow-scrolling: touch;
}

.order-scroll-area {
  overscroll-behavior-y: none;
  overscroll-behavior-x: auto !important;
  -webkit-overflow-scrolling: touch;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: 1.5fr 1fr 1.5fr;
  grid-template-areas: "order" "monthly" "chart";
  gap: 8px;
  width: 100%;
  height: calc(100vh - 48px);
  animation: fadeIn 0.6s ease-out;
}

.dashboard-grid.hide-order-panel .panel-order {
  display: none !important;
}

.dashboard-grid.perf-metrics-layout {
  grid-template-areas: "stats" "monthly" "chart";
}

.dashboard-grid.perf-metrics-layout .panel-order {
  display: none !important;
}

.dashboard-grid.perf-metrics-layout .panel-stats {
  display: flex !important;
  grid-area: stats;
}

.dashboard-grid.order-expanded {
  grid-template-areas: "order" "order" "chart" !important;
  grid-template-rows: 1fr 1.5fr 1.5fr !important;
}

.dashboard-grid.force-3-col.order-expanded {
  grid-template-areas: "order order settings" "chart chart chart" !important;
  grid-template-rows: 1fr 1fr !important;
}

.dashboard-grid.order-expanded .panel-monthly {
  display: none !important;
}

.dashboard-grid.monthly-expanded {
  grid-template-areas: "order" "monthly" "chart";
}

.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 36px;
  background: rgba(30, 41, 59, 0.5);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--card-border);
  padding: 0 16px;
  margin-bottom: 4px;
  border-radius: 12px;
}

.top-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.top-right {
  display: flex;
  align-items: center;
  gap: 15px;
}

.led-lamp {
  width: 10px;
  height: 10px;
  background: #475569;
  border-radius: 50%;
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
  transition: all 0.3s;
  flex-shrink: 0;
  display: block;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.led-on {
  background: #10b981 !important;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.8), inset 0 0 4px rgba(255, 255, 255, 0.5);
}

.led-loading {
  background: #f59e0b !important;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.8), inset 0 0 4px rgba(255, 255, 255, 0.5);
  animation: blink 1s infinite;
}

@keyframes blink {
  50% {
    opacity: 0.3;
  }
}

.top-icon-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  font-size: 18px;
  padding: 5px 8px;
  gap: 5px;
  font-family: inherit;
  font-weight: 600;
  white-space: nowrap;
}

.top-icon-btn .btn-text {
  font-size: 12px;
}

.top-icon-btn:hover {
  color: var(--primary);
  transform: translateY(-2px);
}

.top-icon-btn.active {
  color: var(--primary);
  filter: drop-shadow(0 0 8px var(--primary-glow));
}

.settings-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(2, 6, 23, 0.8);
  backdrop-filter: blur(15px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s forwards;
}

.settings-modal {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 24px;
  padding: 24px;
  width: 90%;
  max-width: 400px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.status-panel {
  background: rgba(15, 23, 42, 0.4);
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: 12px;
  padding: 12px;
  margin-top: 15px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.2);
}

.status-panel-title {
  font-size: 10px;
  color: var(--primary);
  font-weight: 800;
  text-transform: uppercase;
  margin-bottom: 4px;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.status-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
}

.status-row span:first-child {
  color: var(--text-muted);
  font-weight: 600;
}

.status-row span:last-child {
  color: #fbbf24;
  font-weight: 700;
  font-family: 'Inter', sans-serif;
}

.settings-modal h3 {
  margin: 0 0 20px 0;
  font-size: 18px;
  color: var(--primary);
  text-align: center;
}

.panel-order h2,
.panel-monthly h2 {
  font-size: 14px !important;
  letter-spacing: -0.01em;
  margin-bottom: 4px;
}

.sub-actions-container {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.hidden {
  display: none !important;
}

.card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 8px;
  backdrop-filter: blur(16px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
  min-height: 0;
  height: 100%;
}

.panel-settings,
#alwaysVisibleInputs {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.panel-settings>* {
  margin: 0 !important;
}

.panel-order {
  grid-area: order;
}

.panel-monthly {
  grid-area: monthly;
}

.panel-settings {
  grid-area: settings;
  overflow-y: auto;
}

.panel-stats {
  grid-area: stats;
  overflow-y: auto;
}

.panel-chart {
  grid-area: chart;
  border: 1px solid rgba(99, 102, 241, 0.2);
  position: relative;
}

#chartBox {
  flex: 1;
  width: 100%;
  min-height: 0;
  position: relative;
}

.btn-action {
  width: 100%;
  height: 38px;
  border: none;
  border-radius: 6px;
  font-weight: 700;
  cursor: pointer;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s;
  color: white;
  text-transform: uppercase;
  font-size: 12px;
  padding: 0 10px;
  box-sizing: border-box;
}

.btn-instant {
  background: linear-gradient(135deg, #8b5cf6, #7c3aed);
}

.btn-perf {
  background: linear-gradient(135deg, #0ea5e9, #0284c7);
}

.btn-run {
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.btn-save {
  background: linear-gradient(135deg, #10b981, #059669);
}

.btn-adv {
  background: rgba(51, 65, 85, 0.8);
}

.btn-action:hover {
  transform: translateY(-3px);
  filter: brightness(1.2);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.btn-action:active {
  transform: scale(0.96);
}

.input-group {
  margin-bottom: 2px;
  display: flex;
  align-items: center;
  gap: 4px;
}

label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  width: 60px;
  flex-shrink: 0;
  white-space: nowrap;
}

input,
select {
  flex: 1;
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid var(--card-border);
  border-radius: 4px;
  padding: 2px 4px;
  color: white;
  font-size: 11px;
  height: 22px;
  min-width: 0;
  outline: none;
  transition: all 0.2s;
  text-align: center;
}

input:focus {
  border-color: var(--primary);
  background: rgba(15, 23, 42, 0.8);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

input[type="date"]::-webkit-datetime-edit,
input[type="date"]::-webkit-datetime-edit-fields-wrapper {
  display: flex;
  justify-content: center;
  text-align: center;
}

.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 1px;
}

.data-table th {
  color: var(--text-muted);
  font-size: 11px !important;
  font-weight: 700;
  padding: 1px 0.5px;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: -0.1px;
  -webkit-user-select: none;
  user-select: none;
}

.slot-title {
  text-align: center;
  padding: 2px 0;
  font-weight: bold;
  font-size: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.data-table td {
  background: rgba(255, 255, 255, 0.04);
  padding: 2px 0.5px;
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.02);
  font-size: 11px !important;
  line-height: 1;
  -webkit-user-select: none;
  user-select: none;
}

.data-table tr td:first-child {
  border-radius: 3px 0 0 3px;
}

.data-table tr td:last-child {
  border-radius: 0 3px 3px 0;
}

.section-header {
  margin-bottom: 2px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 2px;
}

.section-header h2 {
  flex: 1;
  text-align: left;
}

.panel-header-stats {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  display: flex;
  gap: 12px;
  align-items: center;
}

.btn-icon-sub {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.btn-icon-sub:hover {
  color: var(--primary);
  transform: scale(1.1);
}

.btn-icon-sub.active {
  color: var(--primary);
  filter: drop-shadow(0 0 8px var(--primary-glow));
}

.metric-card {
  background: rgba(255, 255, 255, 0.05);
  padding: 6px 4px;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.03);
  transition: all 0.2s;
}

.metric-card:hover {
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-1px);
}

.metric-label {
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 2px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  line-height: 1.1;
}

.metric-value {
  color: #fff;
  font-size: 10px;
  font-weight: 400;
}

h2 {
  font-family: 'Outfit', sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: var(--primary);
  margin: 0;
  cursor: pointer;
  transition: opacity 0.2s;
}

h2:hover {
  opacity: 0.8;
}

.switch-container {
  background: rgba(99, 102, 241, 0.05);
  border: 1px solid rgba(99, 102, 241, 0.15);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0 10px;
  border-radius: 10px;
  height: 38px;
  flex-shrink: 0;
}

.user-id-box {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  color: var(--primary);
  cursor: pointer;
  font-size: 16px;
}

.user-id-box:hover {
  filter: brightness(1.2);
}

.login-container {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at top right, #1e1b4b, #020617 60%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 500;
  padding: 20px;
  box-sizing: border-box;
  animation: fadeIn 0.8s ease-out;
}

.login-container .login-inner {
  background: var(--card);
  padding: 50px;
  border-radius: 32px;
  width: 100%;
  max-width: 400px;
  backdrop-filter: blur(30px);
  border: 1px solid var(--card-border);
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}

.login-title {
  font-family: 'Outfit', sans-serif;
  font-size: 32px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 10px;
}

.login-input {
  width: 100%;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--card-border);
  padding: 16px;
  border-radius: 14px;
  color: white;
  margin-bottom: 16px;
  box-sizing: border-box;
  font-size: 14px;
  outline: none;
}

.login-btn {
  width: 100%;
  padding: 16px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border: none;
  border-radius: 14px;
  color: white;
  font-weight: 700;
  cursor: pointer;
  font-size: 15px;
  transition: all 0.3s;
}

.val-plus {
  color: var(--success) !important;
  font-weight: 700;
}

.val-minus {
  color: var(--danger) !important;
  font-weight: 700;
}

.buy {
  color: var(--danger);
  font-weight: 700;
}

.sell {
  color: var(--primary);
  font-weight: 700;
}

.chart-container {
  position: absolute;
  left: 0;
  top: 0;
  right: 0;
  bottom: 0;
}

/* 스크롤바 공통 스타일 */
::-webkit-scrollbar {
  width: 5px;
  height: 16px;
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.25);
  border-radius: 10px;
  border: 5px solid transparent;
  background-clip: padding-box;
}

::-webkit-scrollbar-track {
  background: transparent;
}

.status-icon {
  transition: all 0.3s;
  opacity: 0.3;
  font-size: 14px;
}

.status-ready {
  opacity: 1 !important;
  color: var(--success);
  filter: drop-shadow(0 0 8px rgba(16, 185, 129, 0.6));
}

.tier-footer {
  margin-top: auto;
  padding-top: 4px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  justify-content: center;
  gap: 10px;
  color: var(--text-muted);
  flex-shrink: 0;
  container-type: inline-size;
}

.tier-footer div {
  white-space: nowrap;
  display: flex;
  justify-content: center;
  align-items: center;
  min-width: 0;
}

.tier-footer span {
  color: #fff;
  margin-left: 1px;
}

@container (max-width: 250px) {
  .tier-footer {
    font-size: 10px;
    gap: 1px;
  }
}

@container (max-width: 200px) {
  .tier-footer {
    font-size: 9px;
    letter-spacing: -0.5px;
  }
}

@container (max-width: 160px) {
  .tier-footer {
    font-size: 8px;
    letter-spacing: -1px;
  }
}

@media (max-width: 400px) {
  .period-metrics { flex-direction: column; }
}

/* =========================================
   V3.14 리팩토링: 동적 DOM 전용 스타일 클래스
   ========================================= */

/* 주문 슬롯 컨테이너 */
.order-slot-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 160px;
  display: none;
}
.order-slot-container.has-border-left {
  border-left: 1px solid rgba(255, 255, 255, 0.1);
  padding-left: 4px;
}

/* 주문 스크롤 영역 */
.order-scroll-area {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
}

/* 뷰 패널 표시 토글 */
.view-pane-active {
  display: block;
}
.view-pane-hidden {
  display: none;
}

/* 슬롯 제목 (주문표/월별 등) */
.slot-title-sm {
  font-size: 0.8em;
  margin-bottom: 2px;
}

/* 티어 정보 푸터 */
.tier-footer {
  display: none;
  margin-top: auto;
  flex-shrink: 0;
}
.tier-footer-val {
  color: var(--success);
}

/* 월별 테이블 0번 슬롯 (년월 표시용) */
.monthly-slot-0 {
  flex: 0;
  min-width: fit-content;
  width: fit-content;
  padding-right: 1px;
  display: none;
}
.monthly-slot-0 .slot-title {
  color: var(--text-muted);
  padding-left: 0;
  padding-right: 0;
}
.period-table-0 {
  border-spacing: 0 1px;
}
.period-table-0 th,
.period-table-0 td {
  padding: 0 !important;
  text-align: center;
  height: 16px;
}
.period-table-0 th {
  white-space: nowrap;
  width: 1%;
  vertical-align: middle;
}

/* 월별 테이블 개별 슬롯 & 종합 슬롯 */
.monthly-slot-item,
.monthly-slot-combined {
  flex: 1;
  min-width: 120px;
  display: none;
  border-left: 1px solid rgba(255, 255, 255, 0.1);
  padding-left: 4px;
}

/* 테이블 셀 내 중앙 정렬 & 회색 텍스트 (대기 중) */
.table-empty-cell {
  padding: 15px;
  color: #94a3b8;
  text-align: center;
}

/* 보유 주식 목록 그리드 행 (현황판) */
.holdings-grid-row {
  display: grid;
  grid-template-columns: 24px 24px 60px 44px 75px 32px 1fr;
  gap: 4px;
  padding: 3px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  align-items: center;
  font-size: 10.5px;
  white-space: nowrap;
  text-align: center;
}
.holdings-empty {
  color: #64748b;
}

@media (max-width: 500px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
    grid-template-rows: 1.5fr 1fr 1.5fr;
    grid-template-areas: "order" "monthly" "chart";
  }

  .dashboard-grid.order-expanded {
    grid-template-areas: "order" "order" "chart" !important;
  }

  .dashboard-grid.hide-order-panel {
    grid-template-areas: "monthly" "monthly" "chart";
  }

  .panel-stats {
    display: none !important;
  }
}

.dashboard-grid.force-3-col {
  grid-template-columns: minmax(210px, 230px) minmax(300px, 1fr) minmax(210px, 240px) !important;
  grid-template-rows: 1fr 1fr !important;
  grid-template-areas: "order monthly settings" "chart chart chart" !important;
  height: calc(100vh - 16px) !important;
}

.dashboard-grid.force-2-col {
  grid-template-columns: 1fr 1fr !important;
  grid-template-rows: minmax(0, 36fr) minmax(0, 32fr) minmax(0, 32fr) !important;
  grid-template-areas: "order settings" "monthly monthly" "chart chart" !important;
  height: auto !important;
}

@media (max-width: 1200px) {
  .panel-monthly.dual-active .hide-on-narrow {
    display: none;
  }
}

.toast-container {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  pointer-events: none;
}

.q-slot-btn,
.q-strat-btn {
  flex: 1;
  height: 30px;
  background: rgba(51, 65, 85, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

#qSlot1.active {
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  color: white;
  border-color: var(--primary);
}

#qSlot2.active {
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
  border-color: var(--success);
}

#qSlot3.active {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  color: white;
  border-color: #d97706;
}

.q-strat-btn.active {
  background: linear-gradient(135deg, #a855f7, #9333ea);
  color: white;
  border-color: #a855f7;
  box-shadow: 0 0 10px rgba(168, 85, 247, 0.4);
}

.q-slot-btn:hover,
.q-strat-btn:hover {
  filter: brightness(1.2);
}

.toast {
  background: rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(10px);
  border: 1px solid var(--primary);
  color: white;
  padding: 10px 20px;
  border-radius: 99px;
  margin-bottom: 10px;
  font-weight: 600;
  font-size: 13px;
  box-shadow: 0 10px 25px -10px rgba(0, 0, 0, 0.5);
  animation: toastIn 0.3s ease-out, toastOut 0.3s ease-in 2s forwards;
  display: flex;
  align-items: center;
  gap: 8px;
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes toastOut {
  from {
    opacity: 1;
    transform: translateY(0);
  }

  to {
    opacity: 0;
    transform: translateY(-20px);
  }
}

@keyframes icon-rotate {
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.4) rotate(15deg);
  }

  100% {
    transform: scale(1) rotate(0);
  }
}

.icon-rotate {
  animation: icon-rotate 0.6s ease-out;
  display: inline-block;
}

.slim-scroll {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.12) transparent;
}

/* 📊 월별/연별 성과 차트 전용 스타일 */
#periodChartContainer {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 200px;
  padding: 10px 0;
}

#periodBarChartWrapper {
  flex: 1;
  width: 100%;
  height: 100% !important;
  position: relative;
}

#periodBarChart {
  width: 100% !important;
  height: 100% !important;
}

@media (max-width: 500px) {
  #periodChartContainer {
    min-height: 180px;
  }
}

/* ⭐️ 모바일 터치 친화적 가로 스크롤바 */
::-webkit-scrollbar:horizontal {
  height: 30px !important;
}

::-webkit-scrollbar-thumb:horizontal {
  background-color: rgba(148, 163, 184, 0.5);
  border-radius: 15px;
  border-top: 12px solid transparent !important;
  border-bottom: 12px solid transparent !important;
  background-clip: padding-box !important;
}

::-webkit-scrollbar-thumb:horizontal:hover {
  background-color: rgba(148, 163, 184, 0.8);
}

::-webkit-scrollbar-track:horizontal {
  background: transparent !important;
}

/* =========================================
   🚀 6슬롯 무한 확장용 추가 CSS
   ========================================= */

/* 1. 설정창 탭 버튼 (3개씩 2줄로 깔끔하게 정렬) */
#settingsTabContainer {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

#settingsTabContainer>button {
  flex: 1 1 30%;
  min-width: 80px;
}

/* 2. 퀵 설정 모달용 4, 5, 6번 색상 추가 */
#qSlot4.active {
  background: linear-gradient(135deg, #f43f5e, #e11d48);
  color: white;
  border-color: #e11d48;
}

#qSlot5.active {
  background: linear-gradient(135deg, #8b5cf6, #7c3aed);
  color: white;
  border-color: #7c3aed;
}

#qSlot6.active {
  background: linear-gradient(135deg, #06b6d4, #0891b2);
  color: white;
  border-color: #0891b2;
}

/* 3. 모바일에서 데이터/테이블이 매끄럽게 넘어가는 보정 */
#dualOrderContainer,
#periodTableContainer {
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}

/* 4. 테이블 셀 압축 방지 (6슬롯 데이터 늘어남 대응) */
.data-table th,
.data-table td {
  white-space: nowrap;
}
