/* /var/www/maple-app/Util/6/potential.css
   기능 설명: 메이플 레코드 잠재능력 시뮬레이터 전용 스타일시트
   - 기존 사이트(epic.css / style.css)의 다크 미니멀 톤(#131722, #0c1018, #ff7b54~#f0643b) 100% 통일 */

.pot-page-shell {
  padding-top: 22px;
  padding-bottom: 52px;
}

.pot-svg-icon {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  display: inline-block;
  vertical-align: middle;
}

/* 1. 상단 페이지 헤더 */
.pot-page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 18px;
  margin-bottom: 16px;
}

.pot-header-title-wrap {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.pot-eyebrow {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: #ff8c5a;
}

.pot-page-title {
  margin: 0;
  font-size: 1.55rem;
  font-weight: 900;
  color: #f8fafc;
  letter-spacing: -0.025em;
  line-height: 1.2;
}

.pot-page-subtitle {
  margin: 2px 0 0;
  font-size: 0.84rem;
  color: #8b949e;
  line-height: 1.45;
}

.pot-header-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.pot-type-segment {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #0c1018;
  border: 1px solid #1e2636;
  padding: 4px;
  border-radius: 10px;
}

.btn-pot-segment {
  background: transparent;
  color: #8b949e;
  border: 1px solid transparent;
  padding: 7px 14px;
  border-radius: 7px;
  font-size: 0.82rem;
  font-weight: 800;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.btn-pot-segment:hover {
  color: #e2e8f0;
}

.btn-pot-segment.active {
  background: linear-gradient(180deg, #ff7b54 0%, #f0643b 100%);
  color: #ffffff;
  border-color: rgba(255, 160, 122, 0.35);
  box-shadow: 0 3px 10px rgba(240, 100, 59, 0.28);
}

/* 공통 버튼 */
.btn-pot-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: linear-gradient(180deg, #ff7b54 0%, #f0643b 100%);
  color: #ffffff;
  border: 1px solid rgba(255, 160, 122, 0.32);
  padding: 10px 18px;
  border-radius: 10px;
  font-size: 0.86rem;
  font-weight: 800;
  font-family: inherit;
  cursor: pointer;
  transition: transform 0.15s ease, filter 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 4px 12px rgba(240, 100, 59, 0.25);
}

.btn-pot-primary:hover:not(:disabled) {
  filter: brightness(1.07);
  transform: translateY(-1px);
}

.btn-pot-triple {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: linear-gradient(180deg, #2b354b 0%, #1d2436 100%);
  color: #f8fafc;
  border: 1px solid rgba(240, 136, 62, 0.42);
  padding: 10px 18px;
  border-radius: 10px;
  font-size: 0.86rem;
  font-weight: 800;
  font-family: inherit;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.btn-pot-triple:hover:not(:disabled) {
  border-color: #ff8c5a;
  background: linear-gradient(180deg, #33405a 0%, #232c42 100%);
  transform: translateY(-1px);
}

.btn-pot-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: #1a202e;
  color: #cbd5e1;
  border: 1px solid #2b354a;
  padding: 9px 14px;
  border-radius: 10px;
  font-size: 0.82rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.btn-pot-secondary:hover:not(:disabled) {
  background: #232b3d;
  color: #ffffff;
  border-color: #3f4e6d;
}

.btn-pot-primary:disabled,
.btn-pot-triple:disabled,
.btn-pot-secondary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* 2. 상단 장비 설정 카드 */
.pot-config-card {
  background: #131722;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 16px;
  padding: 16px 20px;
  margin-bottom: 16px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.24);
}

.pot-config-grid {
  display: grid;
  grid-template-columns: 1fr 1.25fr 0.85fr 1.45fr;
  gap: 12px;
  align-items: end;
}

.pot-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.pot-field > span {
  font-size: 0.77rem;
  font-weight: 700;
  color: #8b949e;
}

.pot-select,
.pot-num-input {
  width: 100%;
  box-sizing: border-box;
  background: #0c1018;
  border: 1px solid #242d40;
  color: #f8fafc;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 700;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.pot-select:focus,
.pot-num-input:focus {
  border-color: #f0883e;
  box-shadow: 0 0 0 3px rgba(240, 136, 62, 0.14);
}

.pot-select.select-sm {
  width: auto;
  padding: 6px 10px;
  font-size: 0.78rem;
  border-radius: 8px;
}

.pot-inline-checks {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 41px;
}

.pot-check-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: #0c1018;
  border: 1px solid #242d40;
  border-radius: 10px;
  padding: 0 12px;
  height: 100%;
  font-size: 0.79rem;
  font-weight: 700;
  color: #cbd5e1;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
  flex: 1;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.pot-check-chip:hover {
  border-color: #3b4a68;
}

.pot-check-chip input {
  display: none;
}

.pot-check-box {
  width: 16px;
  height: 16px;
  border-radius: 5px;
  border: 1.5px solid #475569;
  background: #131722;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.15s ease;
}

.pot-check-chip input:checked + .pot-check-box {
  background: #f0643b;
  border-color: #ff7b54;
}

.pot-check-chip input:checked + .pot-check-box::after {
  content: "";
  width: 8px;
  height: 4px;
  border-left: 2px solid #ffffff;
  border-bottom: 2px solid #ffffff;
  transform: rotate(-45deg) translate(1px, -1px);
}

.pot-check-chip strong {
  color: #fbbf24;
}

.pot-check-chip.inline-allstat {
  height: auto;
  padding: 8px 12px;
  width: 100%;
  box-sizing: border-box;
  margin-bottom: 12px;
  white-space: normal;
  font-size: 0.78rem;
}

.pot-check-chip.compact-chip {
  height: auto;
  padding: 6px 11px;
  flex: 0 0 auto;
  font-size: 0.77rem;
}

/* 3. 4대 요약 KPI 카드 (epic.css 동일 구조) */
.pot-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.pot-stat-card {
  background: #131722;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 14px;
  padding: 15px 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-width: 0;
  box-sizing: border-box;
}

.stat-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 10px;
}

.stat-card-title-group {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.stat-icon-badge {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.icon-orange { background: rgba(240, 100, 59, 0.16); color: #ff8c5a; }
.icon-amber { background: rgba(251, 191, 36, 0.14); color: #fbbf24; }
.icon-emerald { background: rgba(52, 211, 153, 0.14); color: #34d399; }
.icon-sky { background: rgba(56, 189, 248, 0.14); color: #38bdf8; }

.stat-card-label {
  font-size: 0.8rem;
  font-weight: 800;
  color: #e2e8f0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stat-card-pill {
  font-size: 0.66rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 999px;
  white-space: nowrap;
}

.pill-orange { background: rgba(240, 100, 59, 0.16); color: #ff9f68; }
.pill-amber { background: rgba(251, 191, 36, 0.14); color: #fbbf24; }
.pill-green { background: rgba(52, 211, 153, 0.14); color: #34d399; }
.pill-sky { background: rgba(56, 189, 248, 0.14); color: #38bdf8; }

.stat-card-value {
  display: block;
  font-size: 1.52rem;
  font-weight: 900;
  margin-bottom: 4px;
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
}

.stat-card-desc {
  font-size: 0.74rem;
  color: #64748b;
  line-height: 1.35;
}

.text-white { color: #f8fafc; }
.text-amber { color: #fbbf24; }
.text-emerald { color: #34d399; }
.text-sky { color: #38bdf8; }

/* 4. 메인 2단 워크스페이스 */
.pot-workspace-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.38fr) minmax(340px, 0.96fr);
  gap: 16px;
  align-items: start;
}

.pot-side-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.pot-card {
  background: #131722;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 16px;
  padding: 18px 20px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
  box-sizing: border-box;
}

.pot-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding-bottom: 14px;
  margin-bottom: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.pot-card-head-simple {
  margin-bottom: 14px;
}

.pot-card-head-simple.row-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.pot-card-head h2,
.pot-card-head-simple h2 {
  margin: 0;
  font-size: 1rem;
  font-weight: 800;
  color: #f8fafc;
}

.pot-card-desc {
  margin: 4px 0 0;
  font-size: 0.77rem;
  color: #8b949e;
}

.pot-card-title-row {
  display: flex;
  align-items: center;
  gap: 9px;
}

/* 등급 배지 */
.grade-pill {
  font-size: 0.74rem;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid transparent;
}

.grade-pill.grade-rare {
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.14);
  border-color: rgba(56, 189, 248, 0.34);
}

.grade-pill.grade-epic {
  color: #c084fc;
  background: rgba(192, 132, 252, 0.14);
  border-color: rgba(192, 132, 252, 0.34);
}

.grade-pill.grade-unique {
  color: #facc15;
  background: rgba(250, 204, 21, 0.14);
  border-color: rgba(250, 204, 21, 0.36);
}

.grade-pill.grade-legendary {
  color: #4ade80;
  background: rgba(74, 222, 128, 0.14);
  border-color: rgba(74, 222, 128, 0.36);
}

/* 천장 프로그레스 */
.pot-pity-inline {
  min-width: 210px;
  flex: 0 1 250px;
}

.pity-text-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.74rem;
  color: #8b949e;
  margin-bottom: 5px;
}

.pity-text-row strong {
  color: #e2e8f0;
  font-variant-numeric: tabular-nums;
}

.pot-progress-track {
  width: 100%;
  height: 6px;
  background: #0c1018;
  border: 1px solid #1f2738;
  border-radius: 999px;
  overflow: hidden;
}

.pot-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #ff7b54 0%, #fbbf24 100%);
  border-radius: 999px;
  transition: width 0.25s ease;
}

.pot-progress-fill.is-full {
  background: linear-gradient(90deg, #34d399 0%, #38bdf8 100%);
}

/* 이벤트 알림 토스트 */
.pot-event-toast {
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 0.82rem;
  font-weight: 800;
  margin-bottom: 14px;
  text-align: center;
}

.pot-event-toast.is-upgrade {
  background: rgba(52, 211, 153, 0.13);
  border: 1px solid rgba(52, 211, 153, 0.38);
  color: #6ee7b7;
}

.pot-event-toast.is-pity {
  background: rgba(56, 189, 248, 0.13);
  border: 1px solid rgba(56, 189, 248, 0.38);
  color: #7dd3fc;
}

.pot-event-toast.is-goal {
  background: rgba(240, 136, 62, 0.16);
  border: 1px solid rgba(255, 140, 90, 0.55);
  color: #ffbe8f;
}

/* BEFORE / AFTER 박스 */
.pot-current-box {
  background: #0c1018;
  border: 1px solid #222b3e;
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 14px;
}

.pot-box-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-bottom: 10px;
  margin-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.pot-box-title-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.box-tag {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  padding: 2px 8px;
  border-radius: 6px;
}

.box-tag.tag-before {
  background: rgba(148, 163, 184, 0.12);
  color: #94a3b8;
}

.box-tag.tag-after {
  background: rgba(240, 100, 59, 0.16);
  color: #ff9f68;
}

.box-grade-text {
  font-size: 0.8rem;
  font-weight: 800;
}

.box-grade-text.grade-rare { color: #38bdf8; }
.box-grade-text.grade-epic { color: #c084fc; }
.box-grade-text.grade-unique { color: #facc15; }
.box-grade-text.grade-legendary { color: #4ade80; }

.box-sub-hint {
  font-size: 0.74rem;
  color: #64748b;
  font-weight: 600;
}

.pot-lines-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.pot-line-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 11px;
  border-radius: 9px;
  background: #131722;
  border: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.84rem;
  font-weight: 700;
}

.pot-line-row.grade-rare { color: #7dd3fc; }
.pot-line-row.grade-epic { color: #d8b4fe; }
.pot-line-row.grade-unique { color: #fde047; }
.pot-line-row.grade-legendary { color: #86efac; }

.pot-line-row.is-target-hit {
  background: rgba(240, 136, 62, 0.12);
  border-color: rgba(255, 140, 90, 0.48);
}

.pot-line-badges {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.mini-badge-prime {
  font-size: 0.65rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(251, 191, 36, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(251, 191, 36, 0.35);
}

.mini-badge-hit {
  font-size: 0.65rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(240, 100, 59, 0.2);
  color: #ff9f68;
  border: 1px solid rgba(255, 140, 90, 0.42);
}

/* AFTER 1회/3회 결과 영역 */
.pot-after-section {
  background: #0c1018;
  border: 1px solid #222b3e;
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 16px;
}

.pot-after-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}

.btn-keep-sm {
  background: #1a202e;
  color: #cbd5e1;
  border: 1px solid #2f3a52;
  padding: 5px 11px;
  border-radius: 8px;
  font-size: 0.74rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
}

.btn-keep-sm:hover {
  background: #252e42;
  color: #ffffff;
}

.pot-after-grid {
  display: grid;
  gap: 10px;
}

.pot-after-grid.cols-1 {
  grid-template-columns: 1fr;
}

.pot-after-grid.cols-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.pot-empty-stage {
  text-align: center;
  padding: 28px 14px;
  font-size: 0.83rem;
  color: #64748b;
  border: 1px dashed #252f44;
  border-radius: 10px;
}

.pot-empty-stage strong {
  color: #cbd5e1;
}

.pot-roll-result-card {
  background: #131722;
  border: 1px solid #252f44;
  border-radius: 12px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.pot-roll-result-card.is-upgraded {
  border-color: rgba(74, 222, 128, 0.55);
  box-shadow: 0 0 18px rgba(74, 222, 128, 0.12);
}

.pot-roll-result-card.is-goal-matched {
  border-color: rgba(255, 123, 84, 0.75);
  box-shadow: 0 0 18px rgba(240, 100, 59, 0.18);
}

.pot-roll-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.roll-seq-tag {
  font-size: 0.73rem;
  font-weight: 800;
  color: #94a3b8;
}

.pot-roll-card-lines {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.pot-after-grid.cols-3 .pot-line-row {
  padding: 6px 8px;
  font-size: 0.76rem;
}

.btn-apply-result {
  width: 100%;
  border: 1px solid rgba(52, 211, 153, 0.42);
  background: rgba(52, 211, 153, 0.14);
  color: #6ee7b7;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s ease;
}

.btn-apply-result:hover:not(:disabled) {
  background: rgba(52, 211, 153, 0.25);
  color: #ffffff;
}

.btn-apply-result:disabled {
  border-color: #242d40;
  background: #0e131d;
  color: #64748b;
  cursor: not-allowed;
}

/* 1회 / 3회 메인 버튼 */
.pot-roll-btn-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.btn-roll-main {
  flex-direction: column;
  gap: 3px;
  padding: 13px 16px;
}

.btn-roll-top {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.94rem;
  font-weight: 900;
}

.btn-roll-main small {
  font-size: 0.73rem;
  font-weight: 600;
  opacity: 0.88;
}

/* 5. 우측 원하는 인게임 옵션 빌더 */
.pot-quick-presets-wrap {
  margin-bottom: 12px;
}

.pot-mini-label {
  display: block;
  font-size: 0.73rem;
  font-weight: 700;
  color: #8b949e;
  margin-bottom: 6px;
}

.pot-quick-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.pot-quick-chip {
  background: #0c1018;
  color: #cbd5e1;
  border: 1px solid #242d40;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.74rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s ease;
}

.pot-quick-chip:hover {
  border-color: rgba(240, 136, 62, 0.55);
  color: #ff9f68;
  background: rgba(240, 136, 62, 0.1);
}

.pot-target-meta-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 10px;
}

.pot-conditions-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}

.pot-cond-row {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) 92px 76px 32px;
  gap: 6px;
  align-items: center;
  background: #0c1018;
  border: 1px solid #222b3e;
  border-radius: 10px;
  padding: 7px;
}

.pot-cond-row .pot-select,
.pot-cond-row .pot-num-input {
  padding: 7px 8px;
  font-size: 0.78rem;
  border-radius: 7px;
  background: #131722;
}

.pot-cond-val-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.pot-cond-val-wrap .pot-num-input {
  padding-right: 22px;
  text-align: right;
}

.pot-cond-unit {
  position: absolute;
  right: 7px;
  font-size: 0.72rem;
  font-weight: 700;
  color: #8b949e;
  pointer-events: none;
}

.btn-del-cond {
  width: 30px;
  height: 30px;
  border-radius: 7px;
  border: 1px solid #2a3449;
  background: #171d2b;
  color: #94a3b8;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
}

.btn-del-cond:hover {
  color: #fb7185;
  border-color: rgba(251, 113, 133, 0.4);
}

.pot-target-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.btn-add-cond,
.btn-auto-sim {
  width: 100%;
}

.pot-auto-result-box {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 11px;
  background: #0c1018;
  border: 1px solid rgba(240, 136, 62, 0.4);
  font-size: 0.8rem;
  line-height: 1.6;
  color: #cbd5e1;
}

/* 견적기 테이블 */
.pot-est-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 10px;
}

.pot-est-box {
  background: #0c1018;
  border: 1px solid #222b3e;
  border-radius: 10px;
  padding: 10px 12px;
}

.pot-est-box span {
  display: block;
  font-size: 0.72rem;
  color: #8b949e;
  margin-bottom: 3px;
}

.pot-est-box strong {
  font-size: 0.94rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.pot-est-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.77rem;
}

.pot-est-table th,
.pot-est-table td {
  padding: 7px 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.pot-est-table th:first-child,
.pot-est-table td:first-child {
  text-align: left;
}

.pot-est-table th {
  color: #8b949e;
  font-weight: 700;
}

.pot-miracle-tip {
  margin-top: 10px;
  padding: 8px 11px;
  border-radius: 8px;
  background: rgba(251, 191, 36, 0.08);
  border: 1px solid rgba(251, 191, 36, 0.25);
  font-size: 0.76rem;
  color: #fde047;
}

/* 6. 하단 최근 재설정 기록 */
.pot-history-card {
  margin-top: 16px;
}

.pot-history-title-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pot-history-count {
  font-size: 0.76rem;
  color: #8b949e;
  font-weight: 600;
}

.pot-history-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
  max-height: 340px;
  overflow-y: auto;
}

.pot-empty-history {
  text-align: center;
  padding: 26px;
  font-size: 0.82rem;
  color: #64748b;
}

.pot-history-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 12px;
  padding: 10px 14px;
  border-radius: 10px;
  background: #0c1018;
  border: 1px solid #1f2738;
  font-size: 0.8rem;
}

.pot-history-row.is-up {
  border-color: rgba(74, 222, 128, 0.42);
  background: rgba(34, 197, 94, 0.06);
}

.pot-history-row.is-goal {
  border-color: rgba(255, 140, 90, 0.55);
  background: rgba(240, 100, 59, 0.08);
}

.pot-history-meta {
  display: flex;
  align-items: center;
  gap: 7px;
}

.pot-history-opts {
  color: #cbd5e1;
  font-size: 0.78rem;
}

/* 반응형 미디어 쿼리 */
@media (max-width: 1120px) {
  .pot-config-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .pot-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .pot-workspace-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .pot-after-grid.cols-3 {
    grid-template-columns: 1fr;
  }
  .pot-config-grid,
  .pot-summary-grid,
  .pot-roll-btn-row {
    grid-template-columns: 1fr;
  }
  .pot-cond-row {
    grid-template-columns: 1fr 82px 68px 30px;
  }
  .pot-inline-checks {
    height: auto;
    flex-wrap: wrap;
  }
  .pot-check-chip {
    padding: 8px 11px;
  }
}

/* === 소울 잠재능력 & 노멀 등급 추가 스타일 (potential.css 하단에 추가) === */
.btn-pot-segment.is-soul-tab.active {
  background: linear-gradient(180deg, #a855f7 0%, #7e22ce 100%);
  border-color: rgba(216, 180, 254, 0.45);
  box-shadow: 0 3px 12px rgba(168, 85, 247, 0.35);
}

.pot-stage-card.is-soul-mode {
  border-color: rgba(192, 132, 252, 0.32);
  box-shadow: 0 8px 28px rgba(126, 34, 206, 0.14);
}

.soul-stage-hint {
  color: #c084fc;
  font-weight: 700;
  font-size: 0.7rem;
}

.pot-select:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.grade-pill.grade-normal {
  color: #94a3b8;
  background: rgba(148, 163, 184, 0.12);
  border-color: rgba(148, 163, 184, 0.28);
}

.pot-line-row.grade-normal {
  color: #94a3b8;
}

.stat-card-pill.pill-purple {
  background: rgba(192, 132, 252, 0.15);
  color: #c084fc;
}

/* === 원클릭 자동 등업 바 & 구간별 결과 요약 (potential.css 하단에 추가) === */
.pot-auto-gradeup-bar {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #0c1018;
  border: 1px solid #242d40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.pot-auto-gradeup-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 180px;
}

.auto-gradeup-label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.8rem;
  font-weight: 800;
  color: #34d399;
  white-space: nowrap;
}

.pot-select.select-gradeup {
  width: auto;
  min-width: 128px;
  padding: 7px 10px;
  font-size: 0.8rem;
  border-radius: 8px;
  background: #131722;
}

.btn-auto-gradeup {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: linear-gradient(180deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  border: 1px solid rgba(110, 231, 183, 0.35);
  padding: 9px 16px;
  border-radius: 9px;
  font-size: 0.82rem;
  font-weight: 800;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  transition: filter 0.15s ease, transform 0.15s ease;
  box-shadow: 0 3px 10px rgba(16, 185, 129, 0.24);
}

.btn-auto-gradeup:hover:not(:disabled) {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.btn-auto-gradeup:disabled {
  background: #1a202e;
  color: #64748b;
  border-color: #263044;
  box-shadow: none;
  cursor: not-allowed;
  transform: none;
}

.pot-gradeup-summary {
  margin-top: 10px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(16, 185, 129, 0.07);
  border: 1px solid rgba(52, 211, 153, 0.3);
  font-size: 0.8rem;
  color: #e2e8f0;
}

.gradeup-summary-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
  font-weight: 800;
}

.gradeup-milestones-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.gradeup-milestone-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 8px;
  background: #0c1018;
  border: 1px solid #242d40;
  font-size: 0.74rem;
  color: #cbd5e1;
}

.gradeup-milestone-chip.is-pity {
  border-color: rgba(56, 189, 248, 0.45);
}

@media (max-width: 640px) {
  .pot-auto-gradeup-bar {
    flex-direction: column;
    align-items: stretch;
  }
  .pot-auto-gradeup-left {
    justify-content: space-between;
  }
  .btn-auto-gradeup {
    width: 100%;
  }
}