/* 포켓스탯 · 결정력 계산기 — 디자인(포켓몬 챔피언즈 실수치)에서 이식한 스타일 */

.poke-root {
    --bg: #f4f5f7;
    --card: #ffffff;
    --card2: #f0f1f4;
    --border: #e2e4e9;
    --text: #17181d;
    --sub: #4a4c55;
    --mute: #82858f;
    --accent: #e3350d;
    --accent-text: #ffffff;
    --accent-soft: #fdeae6;
    --input: #f3f4f6;
    --shadow: 0 1px 2px rgba(17, 18, 22, .05);

    min-height: 100vh;
    width: 100%;
    box-sizing: border-box;
    display: flex;
    justify-content: center;
    padding: 48px 20px 64px;
    background-color: var(--bg);
    background-repeat: no-repeat;
    background-position: right -130px bottom -150px;
    background-size: 640px 640px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200'%3E%3Cg fill='none' stroke='rgba(20,22,28,0.045)' stroke-width='7'%3E%3Ccircle cx='100' cy='100' r='94'/%3E%3Cline x1='6' y1='100' x2='60' y2='100'/%3E%3Cline x1='140' y1='100' x2='194' y2='100'/%3E%3Ccircle cx='100' cy='100' r='30'/%3E%3Ccircle cx='100' cy='100' r='13'/%3E%3C/g%3E%3C/svg%3E");
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
    color: var(--text);
}

.poke-root.dark {
    --bg: #131418;
    --card: #1d1f25;
    --card2: #262a32;
    --border: #33363f;
    --text: #eef0f3;
    --sub: #b6b9c1;
    --mute: #888b95;
    --accent: #ff5238;
    --accent-text: #ffffff;
    --accent-soft: #3a221d;
    --input: #262a32;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 12px 30px rgba(0, 0, 0, .3);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200'%3E%3Cg fill='none' stroke='rgba(255,255,255,0.035)' stroke-width='7'%3E%3Ccircle cx='100' cy='100' r='94'/%3E%3Cline x1='6' y1='100' x2='60' y2='100'/%3E%3Cline x1='140' y1='100' x2='194' y2='100'/%3E%3Ccircle cx='100' cy='100' r='30'/%3E%3Ccircle cx='100' cy='100' r='13'/%3E%3C/g%3E%3C/svg%3E");
}

.poke-container {
    width: 900px;
    max-width: 100%;
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.poke-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.poke-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.poke-header-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.poke-lang {
    display: inline-flex;
    background: var(--card2);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 2px;
    gap: 2px;
}

.poke-lang-btn {
    border: none;
    background: transparent;
    color: var(--sub);
    font-size: 11.5px;
    font-weight: 800;
    padding: 4px 9px;
    border-radius: 999px;
    cursor: pointer;
    font-family: inherit;
    line-height: 1.2;
}

.poke-lang-btn.on {
    background: var(--accent);
    color: var(--accent-text);
}

.poke-logo {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    box-sizing: border-box;
    border: 2.5px solid #15161a;
    flex-shrink: 0;
    background-image:
        radial-gradient(circle at 50% 50%, #fff 0 3.5px, #15161a 3.5px 5.5px, rgba(0, 0, 0, 0) 5.5px),
        linear-gradient(to bottom, var(--accent) 0 43%, #15161a 43% 57%, #fff 57% 100%);
}

.poke-logo-text {
    font-size: 17px;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.poke-tagline {
    font-size: 12px;
    font-weight: 600;
    color: var(--mute);
    line-height: 1.3;
}

.poke-dark-toggle {
    width: 46px;
    height: 27px;
    border-radius: 14px;
    background: var(--card2);
    border: 1px solid var(--border);
    position: relative;
    cursor: pointer;
    flex-shrink: 0;
}

.poke-dark-thumb {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 21px;
    height: 21px;
    border-radius: 11px;
    background: var(--accent);
    transition: left .18s ease;
}

.poke-root.dark .poke-dark-thumb {
    left: 21px;
}

/* 상단 텍스트 내비게이션: 알약 버튼 대신 구분선(｜)으로 나뉜 텍스트 링크. 활성 탭만 강조. */
.poke-tabs {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    flex-wrap: wrap;
}

.poke-tab {
    position: relative;
    padding: 8px 18px;
    border: none;
    background: transparent;
    color: var(--mute);
    font: 800 15px/1.2 inherit;
    font-family: inherit;
    cursor: pointer;
    transition: color .12s;
}

.poke-tab:hover {
    color: var(--sub);
}

.poke-tab.active {
    color: var(--accent);
}

/* 탭 사이 세로 구분선 */
.poke-tab:not(:last-child)::after {
    content: "";
    position: absolute;
    right: -1px;
    top: 50%;
    transform: translateY(-50%);
    width: 1.5px;
    height: 13px;
    border-radius: 1px;
    background: var(--border);
}

.poke-note-flash {
    text-align: center;
    font-size: 12px;
    font-weight: 800;
    color: var(--accent);
}

.poke-cards {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.poke-card {
    flex: 1 1 0%;
    min-width: 0;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: var(--shadow);
    padding: 22px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.poke-card-head {
    display: flex;
    align-items: center;
    gap: 10px;
}

.poke-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 800;
    font-size: 16px;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}

.poke-avatar-txt {
    line-height: 1;
}

.poke-avatar-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    transform: scale(1.15);
    image-rendering: -webkit-optimize-contrast;
    pointer-events: none;
}

.poke-name-col {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.poke-name {
    font-size: 15.5px;
    font-weight: 800;
}

.poke-type-row {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

.poke-type-badge {
    font-size: 10.5px;
    font-weight: 700;
    color: #fff;
    padding: 3px 9px;
    border-radius: 999px;
    display: inline-block;
}

.poke-fav {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: none;
    background: var(--card2);
    color: var(--sub);
    font-size: 14px;
    cursor: pointer;
    flex-shrink: 0;
    margin-left: auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.poke-fav.on {
    background: var(--accent-soft);
    color: var(--accent);
}

.poke-label {
    font-size: 11.5px;
    font-weight: 700;
    color: var(--mute);
    margin-bottom: 5px;
}

.poke-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

/* '배우는 기술만' 토글 전용 행: 기술 입력 그리드 위에 좌측 정렬로 배치 */
.poke-move-filter {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    margin-bottom: 6px;
}

.poke-learn-toggle {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 10.5px;
    font-weight: 700;
    color: var(--accent);
    cursor: pointer;
    white-space: nowrap;
    user-select: none;
}

.poke-learn-toggle input {
    accent-color: var(--accent);
    cursor: pointer;
    margin: 0;
}

.poke-grid2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.poke-grid3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;
}

.poke-select,
.poke-input {
    width: 100%;
    box-sizing: border-box;
    background: var(--input);
    border: 1px solid var(--border);
    border-radius: 9px;
    padding: 8px 10px;
    font-size: 13.5px;
    font-weight: 700;
    color: var(--text);
    font-family: inherit;
}

.poke-slider-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.poke-range {
    flex: 1;
    accent-color: var(--accent);
    height: 4px;
    cursor: pointer;
}

.poke-slider-pct {
    font-size: 13px;
    font-weight: 800;
    color: var(--accent);
    width: 38px;
    text-align: right;
    flex-shrink: 0;
}

.poke-stepper {
    display: flex;
    align-items: center;
    gap: 4px;
}

.poke-stepper-btn {
    width: 22px;
    height: 20px;
    border-radius: 6px;
    border: none;
    background: var(--card2);
    color: var(--text);
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.poke-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-top: 2px;
}

.poke-section-label {
    font-size: 12.5px;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 6px;
}

.poke-section-dot {
    width: 13px;
    height: 13px;
    border-radius: 50%;
    box-sizing: border-box;
    border: 1.5px solid #15161a;
    display: inline-block;
    flex-shrink: 0;
    background-image:
        radial-gradient(circle at 50% 50%, #fff 0 1.4px, #15161a 1.4px 2.2px, rgba(0, 0, 0, 0) 2.2px),
        linear-gradient(to bottom, var(--accent) 0 42%, #15161a 42% 58%, #fff 58% 100%);
}

.poke-section-note {
    font-size: 10.5px;
    color: var(--mute);
    margin-top: -4px;
}

.poke-stat-cell {
    background: var(--input);
    border-radius: 12px;
    padding: 9px 10px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.poke-stat-cell-label {
    font-size: 10.5px;
    font-weight: 700;
    color: var(--mute);
}

.poke-stat-cell-value {
    font-size: 16px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}

.poke-result-value {
    font-size: 19px;
    font-weight: 900;
    color: var(--accent);
    font-variant-numeric: tabular-nums;
}

/* 스탯P·랭크업 키보드 입력 */
.poke-stat-input {
    width: 100%;
    box-sizing: border-box;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 7px;
    padding: 2px 6px;
    font-size: 16px;
    font-weight: 800;
    color: var(--text);
    font-variant-numeric: tabular-nums;
    font-family: inherit;
    -moz-appearance: textfield;
    appearance: textfield;
}

.poke-stat-input::-webkit-outer-spin-button,
.poke-stat-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.poke-nature {
    display: flex;
    background: var(--input);
    border-radius: 999px;
    padding: 3px;
    gap: 2px;
}

.poke-nature-btn {
    flex: 1;
    border: none;
    background: transparent;
    border-radius: 999px;
    padding: 7px 0;
    font-size: 12px;
    font-weight: 700;
    color: var(--mute);
    cursor: pointer;
    font-family: inherit;
}

.poke-nature-btn.on {
    background: var(--accent);
    color: var(--accent-text);
    font-weight: 800;
}

.poke-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.poke-chip {
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--sub);
    font-size: 11.5px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
}

.poke-chip.on {
    border-color: var(--accent);
    background: var(--accent-soft);
    color: var(--accent);
    font-weight: 700;
}

.poke-middle {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 64px;
    flex-shrink: 0;
    padding-top: 150px;
    position: relative;
}

.poke-action {
    width: 100%;
    padding: 10px 0;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--card);
    color: var(--sub);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
}

.poke-action.primary {
    border: none;
    background: var(--accent);
    color: var(--accent-text);
    font-size: 12.5px;
    font-weight: 800;
}

.poke-dmg {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding-top: 14px;
    margin-top: 2px;
    border-top: 1px solid var(--border);
}

.poke-dmg-range {
    font-size: 18px;
    font-weight: 900;
    font-variant-numeric: tabular-nums;
}

.poke-dmg-rolls {
    font-size: 11px;
    color: var(--mute);
    font-variant-numeric: tabular-nums;
    word-break: break-all;
}

.poke-dmg-confirm {
    font-size: 15px;
    font-weight: 800;
    color: var(--accent);
}

/* 샘플 구성 */
.poke-sample-wrap {
    display: flex;
    justify-content: center;
}

.poke-sample-card {
    width: 460px;
    max-width: 100%;
}

/* 직렬화 코드 복사/붙여넣기 버튼 행 */
.poke-serial-row {
    display: flex;
    gap: 8px;
}

/* 파일 열기: 숨긴 <input type=file>를 감싼 label을 버튼처럼 보이게 한다. */
.poke-file-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.poke-file-label input {
    display: none;
}

.poke-sample-title-row,
.poke-sample-mon-row {
    display: flex;
    gap: 10px;
    align-items: flex-end;
}

.poke-level-box {
    box-sizing: border-box;
    background: var(--input);
    border: 1px solid var(--border);
    border-radius: 9px;
    padding: 8px 10px;
    font-size: 13.5px;
    font-weight: 800;
    color: var(--text);
    text-align: center;
}

.poke-ev-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.poke-ev-bar {
    flex: 1;
    height: 6px;
    border-radius: 3px;
    background: var(--input);
    overflow: hidden;
}

.poke-ev-fill {
    height: 100%;
    border-radius: 3px;
    background: var(--accent);
    transition: width .15s;
}

.poke-ev-val {
    font-size: 12px;
    font-weight: 800;
    color: var(--text);
    flex: none;
    width: 58px;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.poke-ev-cell-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.poke-ev-stepper {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* 파티 구성 */
.poke-party-layout {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.poke-party-list {
    width: 258px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.poke-party-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 6px;
}

.poke-party-title {
    font-size: 15px;
    font-weight: 800;
    color: var(--text);
}

.poke-party-head-btns {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.poke-party-hbtn {
    padding: 5px 10px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--card2);
    color: var(--sub);
    font-size: 10.5px;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
}

.poke-party-hbtn.primary {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--accent-text);
}

.poke-party-toast {
    font-size: 11px;
    font-weight: 700;
    color: var(--accent);
    text-align: center;
}

.poke-party-slot {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.poke-party-slot-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 18px;
}

.poke-party-num {
    font-size: 11.5px;
    font-weight: 800;
    color: var(--mute);
}

.poke-party-actions {
    display: flex;
    gap: 2px;
}

.poke-party-abtn {
    padding: 3px 6px;
    border-radius: 6px;
    border: none;
    background: transparent;
    color: var(--mute);
    font-size: 9.5px;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
}

.poke-party-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    cursor: pointer;
    min-height: 96px;
    box-sizing: border-box;
}

.poke-party-card.active {
    background: var(--accent-soft);
    border: 2px solid var(--accent);
    padding: 11px;
}

.poke-party-name {
    font-size: 13px;
    font-weight: 800;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.poke-party-meta {
    font-size: 10.5px;
    font-weight: 600;
    color: var(--sub);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: -3px;
}

.poke-party-body {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.poke-party-moves {
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
}

.poke-party-move {
    font-size: 9.5px;
    font-weight: 700;
    color: var(--sub);
    background: var(--input);
    border-radius: 999px;
    padding: 2px 7px;
    white-space: nowrap;
}

.poke-party-stats {
    display: flex;
    flex-direction: column;
    gap: 1px;
    flex-shrink: 0;
}

.poke-party-stat-row {
    display: flex;
    gap: 4px;
    font-size: 10px;
    font-variant-numeric: tabular-nums;
}

.poke-party-abbrev {
    color: var(--mute);
    font-weight: 700;
    width: 34px;
}

.poke-party-real {
    color: var(--text);
    font-weight: 800;
    width: 26px;
    text-align: right;
}

.poke-party-ev {
    color: var(--accent);
    font-weight: 700;
    width: 18px;
    text-align: right;
}

.poke-party-empty {
    background: var(--input);
    border: 1.5px dashed var(--border);
    border-radius: 16px;
    min-height: 96px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-sizing: border-box;
}

/* ── 파티 이미지 저장용 오프스크린 레이아웃(포켓몬 카드만) ── */
.poke-party-export {
    position: absolute;
    left: -99999px;
    top: 0;
    width: 660px;
    box-sizing: border-box;
    padding: 18px;
    background: var(--bg);
    border-radius: 20px;
}

.poke-party-export-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.poke-party-card.export {
    cursor: default;
    min-height: 0;
}

/* 계산 탭 '이미지 저장' 안내 토스트 */
.poke-result-toast {
    font-size: 10.5px;
    font-weight: 700;
    color: var(--accent);
    text-align: center;
}

/* ── 결정력 계산 결과 이미지 저장용 오프스크린 레이아웃 ── */
.poke-result-export {
    position: absolute;
    left: -99999px;
    top: 0;
    width: 460px;
    box-sizing: border-box;
    padding: 22px;
    background: var(--bg);
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    color: var(--text);
}

.poke-rex-head {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.poke-rex-title {
    font-size: 18px;
    font-weight: 900;
}

.poke-rex-vs {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 14px;
}

.poke-rex-mon {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1 1 0%;
    min-width: 0;
}

.poke-rex-mon-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.poke-rex-arrow {
    color: var(--accent);
    font-size: 15px;
    font-weight: 900;
    flex-shrink: 0;
}

.poke-rex-move {
    display: flex;
    align-items: center;
    gap: 8px;
}

.poke-rex-move-name {
    font-size: 14px;
    font-weight: 800;
}

.poke-rex-move-power {
    font-size: 12px;
    font-weight: 700;
    color: var(--mute);
    margin-left: auto;
    font-variant-numeric: tabular-nums;
}

.poke-rex-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.poke-rex-stat-col {
    display: flex;
    flex-direction: column;
    gap: 5px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 12px 14px;
}

.poke-rex-stat-title {
    font-size: 11px;
    font-weight: 800;
    color: var(--sub);
    margin-bottom: 2px;
}

.poke-rex-stat-row {
    display: flex;
    align-items: baseline;
    gap: 8px;
    font-variant-numeric: tabular-nums;
}

.poke-rex-stat-name {
    font-size: 11.5px;
    font-weight: 700;
    color: var(--mute);
    min-width: 42px;
}

.poke-rex-stat-real {
    font-size: 15px;
    font-weight: 800;
    color: var(--text);
}

.poke-rex-stat-ev {
    font-size: 11px;
    font-weight: 700;
    color: var(--accent);
    margin-left: auto;
}

.poke-rex-stat-meta {
    font-size: 11px;
    font-weight: 600;
    color: var(--sub);
    word-break: keep-all;
}

.poke-rex-metrics {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.poke-rex-metric {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 12px 14px;
    text-align: center;
}

.poke-rex-metric-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--mute);
    margin-bottom: 4px;
}

.poke-rex-metric-value {
    font-size: 22px;
    font-weight: 900;
    color: var(--accent);
    font-variant-numeric: tabular-nums;
}

.poke-rex-dmg {
    display: flex;
    flex-direction: column;
    gap: 5px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 14px;
}

.poke-rex-dmg-range {
    font-size: 19px;
    font-weight: 900;
    font-variant-numeric: tabular-nums;
}

.poke-rex-dmg-rolls {
    font-size: 11px;
    color: var(--mute);
    font-variant-numeric: tabular-nums;
    word-break: break-all;
}

.poke-rex-dmg-confirm {
    font-size: 16px;
    font-weight: 800;
    color: var(--accent);
}

.poke-rex-mods {
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 14px;
}

.poke-rex-mods-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--mute);
}

.poke-rex-mods-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.poke-rex-mod {
    font-size: 11.5px;
    font-weight: 700;
    color: var(--sub);
    background: var(--card2);
    border-radius: 999px;
    padding: 4px 10px;
}

.poke-rex-mods-none {
    font-size: 12px;
    font-weight: 700;
    color: var(--mute);
}

.poke-party-add {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background: var(--card2);
    color: var(--mute);
    font-size: 18px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (max-width: 760px) {
    .poke-party-layout {
        flex-direction: column;
    }

    .poke-party-list {
        width: 100%;
    }

    .poke-party-layout .poke-middle {
        width: 100%;
        flex-direction: row;
    }
}

/* 상성 비교 */
.mu-outer {
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: center;
    width: 100%;
}

.mu-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px 16px;
    box-shadow: var(--shadow);
    width: 100%;
    box-sizing: border-box;
}

.mu-tool-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.mu-view-switch {
    display: flex;
    background: var(--input);
    border-radius: 999px;
    padding: 3px;
    gap: 2px;
    margin-left: auto;
}

.mu-col-headers {
    display: flex;
    justify-content: space-between;
    width: 100%;
}

.mu-col-head {
    display: flex;
    align-items: center;
    gap: 6px;
}

.mu-col-title {
    font-size: 14.5px;
    font-weight: 800;
    color: var(--text);
}

.mu-grid {
    position: relative;
    max-width: 100%;
}

.mu-svg {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.mu-box {
    position: absolute;
    box-sizing: border-box;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 10px;
    transition: box-shadow .12s;
}

.mu-box.empty {
    background: var(--input);
    border: 1.5px dashed var(--border);
}

.mu-box.active {
    border: 2px solid var(--accent);
    background: var(--accent-soft);
}

.mu-box:hover {
    box-shadow: 0 0 0 2px var(--accent);
}

.mu-box-in {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
}

.mu-box-plus {
    color: var(--mute);
    font-size: 20px;
    font-weight: 700;
}

.mu-arrow-label {
    position: absolute;
    transform: translate(-50%, -50%);
    color: #fff;
    font-size: 9.5px;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 6px;
    white-space: nowrap;
    pointer-events: none;
    z-index: 3;
}

.mu-table-wrap {
    width: 100%;
    overflow-x: auto;
    border-radius: 14px;
    border: 1px solid var(--border);
}

.mu-table {
    display: grid;
    grid-template-columns: 104px repeat(6, minmax(88px, 1fr));
    min-width: 632px;
}

.mu-th-corner {
    padding: 8px;
    background: var(--card2);
    border-bottom: 1px solid var(--border);
    font-size: 10px;
    font-weight: 700;
    color: var(--mute);
    display: flex;
    align-items: center;
}

.mu-th {
    padding: 8px 4px;
    background: var(--card2);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    border-left: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.mu-th-row {
    padding: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
    border-top: 1px solid var(--border);
    background: var(--card2);
}

.mu-td {
    padding: 6px 4px;
    border-top: 1px solid var(--border);
    border-left: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 3px;
    align-items: center;
    justify-content: center;
    background: var(--card);
    min-height: 44px;
}

.mu-dot {
    width: 8px;
    height: 8px;
    border-radius: 4px;
    flex: none;
}

.mu-th-name {
    font-size: 10.5px;
    font-weight: 700;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 82px;
}

.mu-pill {
    color: #fff;
    font-size: 9px;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 999px;
    white-space: nowrap;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    box-sizing: border-box;
}

.mu-pill-empty {
    color: var(--mute);
    font-size: 11px;
    opacity: 0.5;
}

.mu-legend {
    font-size: 11px;
    color: var(--mute);
    text-align: center;
}

/* ── 상성 비교 이미지 저장용 오프스크린 레이아웃 ── */
.mu-export {
    position: absolute;
    left: -99999px;
    top: 0;
    width: 680px;
    box-sizing: border-box;
    padding: 22px;
    background: var(--bg);
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    color: var(--text);
}

.mu-export .poke-rex-head {
    align-self: stretch;
}

.mu-export-ctx {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}

.mu-export-ctx-item {
    font-size: 12px;
    font-weight: 700;
    color: var(--mute);
    background: var(--card2);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 4px 12px;
}

.mu-export-cols {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
}

.mu-export-vs {
    font-size: 12px;
    font-weight: 900;
    color: var(--mute);
}

.mu-export-table-wrap {
    align-self: stretch;
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
}

.mu-export .mu-table {
    width: 100%;
    min-width: 0;
}

.poke-placeholder {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: var(--shadow);
    padding: 48px 24px;
    text-align: center;
    color: var(--mute);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.7;
}

.poke-disclaimer {
    font-size: 12px;
    line-height: 1.7;
    color: var(--mute);
    text-align: center;
    margin: 8px 0 0;
}

/* 좁은 화면: 카드 세로 배치 */
@media (max-width: 760px) {
    .poke-cards {
        flex-direction: column;
    }

    .poke-middle {
        width: 100%;
        flex-direction: row;
        padding-top: 0;
    }
}
