@font-face {
    font-family: 'GyeonggiMillenniumBackground';
    src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/2410-3@1.0/Batang_Regular.woff') format('woff');
    font-weight: 400;
    font-display: swap;
}

:root {
    --bg-dark: #0f111a;
    --bg-card: #1a1c2b;
    --bg-header: rgba(15, 17, 26, 0.88);
    --gold: #d4af37;
    --gold-light: #f1e5ac;
    --accent: #7c4dff;
    --text-main: #e0e0e0;
    --text-muted: #9e9e9e;
    --danger: #ff5252;
    --success: #66bb6a;
    --border: rgba(255, 255, 255, 0.1);
    --radius: 8px;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

button,
input,
select,
textarea {
    font-family: inherit;
}

img {
    user-select: none;
    -webkit-user-drag: none;
}

body {
    font-family: 'GyeonggiMillenniumBackground', 'Outfit', sans-serif;
    background: url('source/img/static/background.jpg') no-repeat center center fixed;
    background-size: cover;
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

.app-main {
    padding-top: 0;
    min-height: 100vh;
    display: flex;
}

.editor-section {
    display: flex;
    flex-direction: row;
    width: 100%;
    min-height: 100vh;
    align-items: stretch;
}

.filter-sidebar {
    width: 330px;
    flex-shrink: 0;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    background: var(--bg-card);
    border-right: 1px solid var(--border);
    padding: 20px 15px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.logo-text {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-icon {
    color: var(--gold);
    width: 24px;
    height: 24px;
}

.logo h1 {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.5px;
    white-space: nowrap;
}

.logo h1 span {
    display: block;
    font-size: 11px;
    color: var(--gold);
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* 넥서스 모드 링크 버튼 */
.nexus-link {
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.nexus-link img {
    display: block;
    width: 50px;
    height: 50px;
    border-radius: 4px;
}

.nexus-link:hover {
    transform: scale(1.15) rotate(5deg);
    filter: drop-shadow(0 0 8px rgba(251, 146, 60, 0.5));
}

.filter-sidebar::-webkit-scrollbar {
    width: 4px;
}

.filter-sidebar::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}

/* 콘텐츠 레이아웃 */
.content-wrapper {
    position: relative;
    flex: 1;
    display: flex;
    min-width: 0;
}

.content-area {
    flex: 1;
    min-width: 0;
    padding: 50px 100px 50px 50px;
    height: 100vh;
    overflow-y: auto;
    scrollbar-width: none;
    position: relative;
}

.content-area::-webkit-scrollbar {
    display: none;
}

/* 커스텀 스크롤바 */
.custom-scrollbar {
    position: absolute;
    top: 100px;
    right: 55px;
    width: 40px;
    height: calc(100vh - 209px);
    justify-content: center;
    pointer-events: none;
    z-index: 1000;
}

/* ChangeLog 버튼 */
.changelog-btn {
    position: absolute;
    top: 30px;
    right: 50.5px;
    width: 49px;
    height: 49px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 1002;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.changelog-btn img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 0 5px rgba(0, 0, 0, 0.5));
}

.changelog-btn:hover {
    transform: rotate(5deg);
    filter: brightness(1.2);
}

.changelog-btn:active {
    transform: scale(0.95);
}

.scrollbar-track {
    width: 40px;
    height: 100%;
    background: url('source/img/static/scroll_bar.webp') center/100% 100% no-repeat;
    position: relative;
}

.scrollbar-thumb {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translate3d(-50%, 0, 0);
    width: 42px;
    height: 64px;
    background: url('source/img/static/scroll_handle.webp') center/100% 100% no-repeat;
    pointer-events: auto;
    cursor: grab;
    z-index: 1001;
    user-select: none;
    -webkit-user-drag: none;
    will-change: transform;
}

.scrollbar-thumb:hover {
    filter: brightness(1.15) drop-shadow(0 0 5px rgba(255, 215, 0, 0.4));
}

.scrollbar-thumb:active {
    cursor: grabbing;
    transform: translateX(-50%) scale(0.96);
}

body.dragging {
    user-select: none !important;
    cursor: grabbing !important;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-group-label {
    font-size: 18px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    font-weight: 700;
    white-space: nowrap;
}

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

.filter-chip {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: 20px;
    color: var(--text-muted);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-align: left;
}

.filter-chip:hover {
    background: rgba(255, 255, 255, 0.08);
    color: white;
}

.filter-chip.active {
    background: rgba(124, 77, 255, 0.15);
    border-color: var(--accent);
    color: white;
}

/* 희귀도 필터 잠금 (고대의존재·기타 선택 시) */
.filter-locked {
    position: relative;
    opacity: 0.4;
    pointer-events: none;
    user-select: none;
}

.filter-locked .filter-group-label::after {
    content: " (비활성화)";
    font-size: 12px;
    color: var(--gold);
    font-weight: 700;
    pointer-events: none;
}

/* 뱃지 가시성 제어 */
#cardGrid.hide-badges .badge {
    display: none;
}

.badge-toggle-group {
    display: flex;
    cursor: pointer;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: 12px;
    transition: var(--transition);
}

.badge-toggle-group:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(212, 175, 55, 0.3);
}

.badge-toggle-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-muted);
}

.badge-toggle-group:hover .badge-toggle-label {
    color: white;
}

/* 프리미엄 스위치 스타일 (사이드바용) */
.switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.1);
    transition: .4s;
    border-radius: 24px;
    border: 1px solid var(--border);
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 3px;
    bottom: 3px;
    background-color: var(--text-muted);
    transition: .4s;
    border-radius: 50%;
}

input:checked+.slider {
    background-color: rgba(212, 175, 55, 0.2);
    border-color: var(--gold);
}

input:checked+.slider:before {
    transform: translateX(20px);
    background-color: var(--gold);
    box-shadow: 0 0 8px rgba(212, 175, 55, 0.5);
}

.search-box {
    display: flex;
    align-items: center;
    width: 100%;
    background: var(--bg-dark);
    border: 1px solid var(--border);
    padding: 0 16px;
    border-radius: 100px;
    transition: var(--transition);
}

.search-box:focus-within {
    border-color: var(--gold);
    box-shadow: 0 0 0 4px rgba(212, 175, 55, 0.1);
}

.search-box i,
.search-box svg {
    color: var(--text-muted);
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.search-box input {
    flex: 1;
    width: 100%;
    background: transparent;
    border: none;
    padding: 10px 12px;
    color: white;
    font-size: 18px;
    transition: var(--transition);
    outline: none;
}

.stats {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-muted);
    margin-top: auto;
}

.stats span {
    color: var(--gold);
    font-size: 15px;
}

.sidebar-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* 카드 그리드 */
.grid-wrapper {
    position: relative;
    min-height: 500px;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(5, 250px);
    column-gap: -20px;
    row-gap: -10px;
    justify-content: center;
}

/* STS2 카드 */
.card-item {
    background: transparent;
    border-radius: 12px;
    cursor: pointer;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: -20px -12px;
    isolation: isolate;
}

.sts2-card {
    --card-outline: #4D4B40;
    --card-shadow: #878686;
    --card-name: #FFF6E2;
    --card-type: #272727;
    position: relative;
    width: 273px;
    aspect-ratio: 273 / 380;
    transform-style: preserve-3d;
    transform: translateZ(0);
    transition: transform 0.5s cubic-bezier(0.075, 0.82, 0.165, 1);
    overflow: visible;
}

.sts2-card.rarity-common,
.sts2-card.rarity-ancient,
.sts2-card.rarity-token,
.sts2-card.rarity-starter {
    --card-outline: #4D4B40;
    --card-shadow: #878686;
    --card-name: #FFF6E2;
    --card-type: #272727;
}

.sts2-card.rarity-uncommon {
    --card-outline: #005C75;
    --card-shadow: #61B6C1;
    --card-name: #FFF6E2;
    --card-type: #1D3537;
}

.sts2-card.rarity-rare {
    --card-outline: #6B4B00;
    --card-shadow: #CFA64D;
    --card-name: #FFF6E2;
    --card-type: #3F3019;
}

.sts2-card.rarity-status {
    --card-outline: #4F522F;
    --card-shadow: #868061;
    --card-name: #FFF6E2;
    --card-type: #27251D;
}

.sts2-card.rarity-curse {
    --card-outline: #550B9E;
    --card-shadow: #AA6CCF;
    --card-name: #FFF6E2;
    --card-type: #30203F;
}

.sts2-card.rarity-quest {
    --card-outline: #7E3E15;
    --card-shadow: #CF6E46;
    --card-name: #FFF6E2;
    --card-type: #3F2017;
}

.sts2-card.rarity-event {
    --card-outline: #1B6131;
    --card-shadow: #63AC66;
    --card-name: #FFF6E2;
    --card-type: #1E321D;
}

.card-item:hover {
    z-index: 100;
}

.card-item:hover .sts2-card {
    transform: scale(1.25) translateZ(0);
    transition: 0.05s;
}

.sts2-card .layer {
    position: absolute;
    inset: 0;
    pointer-events: none;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.sts2-card .layer-bg {
    z-index: 1;
}

.sts2-card .layer-art {
    z-index: -1;
    position: absolute;
    top: 17.8%;
    left: 16.5%;
    width: 67%;
    height: 37%;
    overflow: hidden;
}

/* 고대(Ancient) 카드 전용 레이아웃 (세로형 일러스트) */
.sts2-card.rarity-ancient .layer-art {
    top: 10%;
    left: 10.5%;
    width: 79%;
    height: 80%;
    border-radius: 20px;
    border: 1.5px solid rgba(255, 255, 255, 0.9);
    box-shadow: 0 0 5px 1px rgba(255, 255, 255, 1);
    position: relative;
    overflow: hidden;
}

.sts2-card.rarity-ancient .layer-art::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    box-shadow: inset 0 0 8px 1px rgba(255, 255, 255, 0.7);
    pointer-events: none;
    z-index: 2;
}

/* 고대(Ancient) 카드 확대 상태 (모달) 전용 스타일 */
#editModal .sts2-card.rarity-ancient .layer-art {
    border-width: 3px;
    border-radius: 30px;
    box-shadow: 0 0 15px rgba(255, 255, 255, 1);
}

#editModal .sts2-card.rarity-ancient .layer-art::after {
    box-shadow: inset 0 0 10px 1px rgba(255, 255, 255, 1);
}

.sts2-card .layer-art img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: relative;
    top: 0;
    left: 0;
}

/* 고대(Ancient) 카드 전용 배경 투명도 */
.sts2-card.rarity-ancient .layer-bg {
    opacity: 0.3;
}

.sts2-card .layer-frame {
    z-index: 3;
}

.sts2-card .layer-banner {
    z-index: 4;
}

.sts2-card .layer-orb,
.sts2-card .layer-type {
    z-index: 5;
}

.sts2-card .layer-text {
    z-index: 6;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
}

.card-name-overlay {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: var(--card-name);
    position: absolute;
    top: 12%;
    width: 100%;
    text-align: center;
    z-index: 0;
    text-shadow: 0px 0px 3px black;
    user-select: none;
    -webkit-user-select: none;
    -webkit-user-drag: none;
    pointer-events: none;
}

.card-name-overlay::before {
    content: attr(data-text);
    position: absolute;
    inset: 0;
    z-index: -1;
    -webkit-text-stroke: 4px var(--card-outline);
    text-shadow: 2.5px 2.5px 0px var(--card-shadow);
}

.card-type-overlay {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: -0.2px;
    color: var(--card-type);
    position: absolute;
    top: 51.5%;
    width: 100%;
    text-align: center;
    user-select: none;
    -webkit-user-select: none;
    -webkit-user-drag: none;
    pointer-events: none;
}

.badge {
    position: absolute;
    top: 27px;
    right: 8px;
    padding: 4px 8px;
    background: var(--accent);
    color: white;
    font-size: 13px;
    font-weight: 700;
    border-radius: 4px;
    z-index: 10;
}

/* 모달 */
.modal {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    will-change: opacity, visibility;
}

.modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
}

.modal-container {
    position: relative;
    max-width: 1400px;
    background: transparent;
    border-radius: 0;
    border: none;
    display: flex;
    flex-direction: column;
    overflow: visible;
    box-shadow: none;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.modal-header h3 {
    font-size: 18px;
}

.modal-card-name {
    font-size: 13px;
    color: var(--gold);
    margin-top: 2px;
}

.btn-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    transition: var(--transition);
}

.btn-close:hover {
    color: white;
}

.modal-body {
    padding: 0;
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 40px;
    overflow: visible;
    align-items: center;
}

.card-large-preview {
    flex: 1;
    height: 100vh;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: visible;
    position: relative;
}

/* 드롭 오버레이 */
.drop-overlay {
    position: absolute;
    inset: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

.drop-overlay.active,
.card-item.drag-over .drop-overlay {
    opacity: 1;
    visibility: visible;
}

.drop-overlay.active+.sts2-card,
.card-item.drag-over .sts2-card {
    filter: blur(5px) brightness(0.7);
    transform: scale(1.05);
}

/* 그리드 카드 오버레이 전용 드래그 시 최상단 고정 */
.card-item.drag-over {
    z-index: 500 !important;
}

.drop-overlay-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 24px;
    width: 273px;
    aspect-ratio: 273 / 380;
    border: 3px dashed var(--gold);
    border-radius: 20px;
    background: rgba(15, 17, 26, 0.4);
    backdrop-filter: blur(4px);
    color: white;
    transform: scale(0.8);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);
}

.drop-overlay.active .drop-overlay-content,
.card-item.drag-over .drop-overlay .drop-overlay-content {
    transform: scale(1.15);
}

.drop-overlay-content i,
.drop-overlay-content svg {
    width: 64px;
    height: 64px;
    color: var(--gold);
    filter: drop-shadow(0 0 10px rgba(212, 175, 55, 0.8));
}

/* 그리드 카드 내 오버레이 텍스트/아이콘 크기 조정 (원형 축소 버전) */
.card-item .drop-overlay-content {
    width: 120px;
    height: 150px;
    aspect-ratio: 1 / 1;
    border-radius: 10%;
    gap: 0;
    background: rgba(15, 17, 26, 0.8);
    border-width: 2px;
}

.card-item .drop-overlay-content i,
.card-item .drop-overlay-content svg {
    width: 32px;
    height: 32px;
}

.card-item .drop-overlay-content span {
    display: none;
}

.drop-overlay-content span {
    font-size: 18px;
    font-weight: 700;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--gold-light);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}

.card-large-preview .sts2-card {
    height: 100%;
    width: auto;
    aspect-ratio: 273 / 380;
    transform: translateZ(0) !important;
    will-change: transform;
}

.layer-art img {
    will-change: transform;
    transform: translateZ(0);
}

/* 확대된 카드용 텍스트 스타일 조정 */
.card-large-preview .card-name-overlay {
    font-size: 5vh;
}

.card-large-preview .card-name-overlay::before {
    -webkit-text-stroke: 1vh var(--card-outline);
    text-shadow: 1vh 0.6vh var(--card-shadow)
}

.card-large-preview .card-type-overlay {
    font-size: 3.2vh;
    top: 51%;
}

.card-info {
    width: 400px;
    background: var(--bg-card);
    border-radius: 20px;
    border: 1px solid var(--border);
    padding: 32px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.8);
    max-height: 90vh;
    overflow-y: auto;
}

.card-info::-webkit-scrollbar {
    width: 4px;
}

.card-info::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}

.info-group {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

/* ChangeLog 모달 전용 */
.changelog-modal-container {
    width: 600px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 32px;
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.8);
}

.changelog-modal-body {
    padding: 20px 0;
    display: block;
}

.changelog-scroll-wrapper {
    position: relative;
    height: 450px;
    padding-right: 60px;
}

.changelog-content-area {
    height: 100%;
    overflow-y: auto;
    scrollbar-width: none;
    /* Firefox */
}

.changelog-content-area::-webkit-scrollbar {
    display: none;
    /* Chrome, Safari, Edge */
}

.modal-scrollbar {
    top: 0;
    right: 0;
    height: 100%;
}

.modal-scrollbar .scrollbar-track {
    background-size: 100% 100%;
}

.changelog-header {
    display: flex;
    align-items: baseline;
    gap: 12px;
    border-top: 1px solid rgba(212, 175, 55, 0.2);
    padding: 8px 0;
}

.changelog-version {
    font-size: 20px;
    font-weight: 700;
    color: var(--gold);
}

.changelog-date {
    font-size: 14px;
    color: var(--text-muted);
}

.changelog-section {
    margin-bottom: 20px;
}

.changelog-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--gold-light);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.changelog-list {
    list-style: none;
    padding-left: 4px;
}

.changelog-item {
    font-size: 15px;
    color: var(--text-main);
    margin-bottom: 6px;
    position: relative;
    padding-left: 18px;
    line-height: 1.5;
    word-break: auto-phrase;
}

.changelog-item::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--gold);
    font-weight: bold;
}

.header-with-icon {
    display: flex;
    align-items: center;
    gap: 10px;
}

.text-gold {
    color: var(--gold);
}

.info-group-text {
    display: flex;
    flex-direction: column;
}

.info-group label {
    display: block;
    font-size: 16px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 2px;
}

.size-display {
    font-size: 16px;
    color: var(--text-main);
}

/* 프리미엄 이미지 토글 스위치 */
.image-toggle {
    display: flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.4);
    padding: 3px;
    border-radius: 50px;
    border: 1px solid var(--border);
    cursor: pointer;
    position: relative;
    user-select: none;
    transition: var(--transition);
}

.image-toggle:hover {
    border-color: rgba(212, 175, 55, 0.3);
}

.toggle-option {
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
    border-radius: 50px;
    transition: var(--transition);
    position: relative;
    z-index: 2;
    white-space: nowrap;
}

.image-toggle .toggle-slider {
    position: absolute;
    top: 3px;
    left: 3px;
    width: calc(50% - 3px);
    height: calc(100% - 6px);
    background: var(--gold);
    border-radius: 50px;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4), 0 0 5px rgba(212, 175, 55, 0.3);
    z-index: 1;
}

.image-toggle.is-original .toggle-slider {
    transform: translateX(100%);
}

.image-toggle .toggle-option.active {
    color: var(--bg-dark);
}

.action-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.button-group {
    display: flex;
    gap: 8px;
    width: 100%;
}

.button-group .btn {
    flex: 1;
}

.adjustment-group h4 {
    font-size: 13px;
    margin-bottom: 12px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.adjustment-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 16px;
    border-top: 1px solid var(--border);
    margin-bottom: 12px;
}

.adjustment-header h4 {
    font-size: 16px;
    margin-bottom: 0;
    padding-top: 0;
    border-top: none;
}

.slider-row {
    margin-bottom: 12px;
}

.slider-row span {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.slider-row span::after {
    content: attr(data-value);
    color: var(--gold);
    font-weight: 700;
}

.slider-row input {
    width: 100%;
}

.modal-footer {
    display: flex;
    flex-direction: row;
    gap: 12px;
    margin-top: 8px;
}

.modal-footer .btn {
    flex: 1;
    justify-content: center;
}

/* 공통 버튼 */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--radius);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    font-size: 14px;
    white-space: nowrap;
}

.btn-primary {
    background: var(--gold);
    color: #000;
}

.btn-primary:hover:not(:disabled) {
    background: var(--gold-light);
}

.btn-secondary {
    background: var(--border);
    color: white;
}

.btn-secondary:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.2);
}

/* ── 선택 모드 ── */
body.select-mode .card-item:hover .sts2-card {
    transform: translateZ(0) !important;
}

body.select-mode .card-item:hover {
    z-index: unset !important;
}

body.select-mode .card-item {
    cursor: pointer;
}

/* 선택된 카드 시각적 효과 부여 */
.card-item.selected .sts2-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: url('source/img/static/select_icon.webp') center/100% 100% no-repeat;
    z-index: 20;
    pointer-events: none;
    border-radius: inherit;
}

/* ── 선택 리모콘 ── */
.selection-remote {
    position: fixed;
    bottom: 40px;
    left: calc(50% + 160px);
    transform: translateX(-50%) translateY(0);
    background: rgba(15, 17, 26, 0.95);
    border: 1px solid var(--gold);
    border-radius: 50px;
    padding: 12px 24px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8), 0 0 20px rgba(212, 175, 55, 0.2);
    z-index: 2000;
    transition: transform 0.5s cubic-bezier(0.2, 1, 0.3, 1), opacity 0.3s ease;
    opacity: 1;
    backdrop-filter: blur(10px);
}

.selection-remote.hidden {
    display: flex !important;
    transform: translateX(-50%) translateY(150px);
    opacity: 0;
    pointer-events: none;
}

.remote-content {
    display: flex;
    align-items: center;
    gap: 24px;
}

.remote-info {
    font-size: 15px;
    color: var(--text-main);
    white-space: nowrap;
    padding-left: 8px;
}

.remote-info strong {
    color: var(--success);
    font-size: 20px;
    margin: 0 4px;
}

.remote-actions {
    display: flex;
    gap: 12px;
}

.remote-actions .btn {
    border-radius: 50px;
    padding: 10px 24px;
    font-size: 16px;
    white-space: nowrap;
}

.remote-actions .btn-danger {
    background: rgba(255, 82, 82, 0.1);
    color: var(--danger);
    border: 1px solid rgba(255, 82, 82, 0.3);
}

.remote-actions .btn-danger:hover {
    background: var(--danger);
    color: #fff;
}

.remote-actions .btn-secondary {
    background: rgba(255, 255, 255, 0.05);
}

.remote-actions .btn-primary {
    background: var(--success);
    color: #fff;
}

.remote-actions .btn-primary:hover:not(:disabled) {
    background: #57a05a;
}

.remote-actions .btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--gold);
    color: var(--gold);
}

.btn-outline:hover {
    background: var(--gold);
    color: #000;
}

.btn-danger {
    background: rgba(255, 82, 82, 0.1);
    color: var(--danger);
    border: 1px solid var(--danger);
}

.btn-danger:hover {
    background: var(--danger);
    color: white;
}

.btn-full {
    width: 100%;
    justify-content: center;
}

.btn-ghost {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 12px;
}

.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.06);
    color: white;
    border-color: rgba(255, 255, 255, 0.25);
}

.btn-sm {
    padding: 4px 10px;
    font-size: 14px;
    border-radius: 6px;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ── 유틸 ── */
.hidden {
    display: flex !important;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.spin {
    animation: spin 1s linear infinite;
}

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

/* ── 앱 로딩 ── */
.app-loading {
    position: fixed;
    inset: 0;
    background: rgba(15, 17, 26, 0.4);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loader-content {
    text-align: center;
}

.skeleton-loader {
    width: 80px;
    height: 80px;
    background: var(--gold);
    margin: 0 auto 24px;
    border-radius: 12px;
    animation: pulse 1.5s infinite ease-in-out;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(0.8);
        opacity: 0.5;
    }

    50% {
        transform: scale(1.1);
        opacity: 1;
    }
}


/* 모달 내부 헤더 아이콘 */
.header-with-icon {
    display: flex;
    align-items: center;
    gap: 12px;
}

.text-gold {
    color: var(--gold);
}

.mini-modal {
    max-width: 500px !important;
    background: var(--bg-card);
    border-radius: 24px;
    border: 1px solid var(--border);
    padding: 32px;
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.9);
}

.modal-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.modal-body p {
    color: var(--text-muted);
    font-size: 15px;
    line-height: 1.5;
    white-space: nowrap;
}

.vertical-stack {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-top: 20px;
}

.btn-full {
    width: 100%;
    justify-content: flex-start;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
}

.btn-danger {
    background: rgba(255, 82, 82, 0.1);
    color: var(--danger);
    border: 1px solid rgba(255, 82, 82, 0.2);
}

.btn-danger:hover {
    background: rgba(255, 82, 82, 0.2);
    border-color: var(--danger);
}

.checkerboard {
    background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.05) 25%, transparent 25%),
        linear-gradient(-45deg, rgba(255, 255, 255, 0.05) 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, rgba(255, 255, 255, 0.05) 75%),
        linear-gradient(-45deg, transparent 75%, rgba(255, 255, 255, 0.05) 75%);
    background-size: 20px 20px;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
    background-color: var(--bg-main);
}


/* 배경색 선택 UI */
.color-palette-container {
    padding: 8px 0;
}

.palette-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.color-chip {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    padding: 0;
}

.color-chip:hover {
    transform: scale(1.15);
    border-color: var(--gold);
}

.color-chip.active {
    border-color: var(--gold);
    box-shadow: 0 0 10px var(--gold);
}

.color-chip.active::after {
    content: '';
    position: absolute;
    inset: 2px;
    border: 2px solid var(--bg-card);
    border-radius: 50%;
}

.color-chip.transparent {
    background: linear-gradient(45deg, #ccc 25%, transparent 25%),
        linear-gradient(-45deg, #ccc 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #ccc 75%),
        linear-gradient(-45deg, transparent 75%, #ccc 75%);
    background-size: 8px 8px;
    background-position: 0 0, 0 4px, 4px -4px, -4px 0px;
    background-color: white;
}

.color-picker-input {
    width: 32px;
    height: 32px;
    border: none;
    background: none;
    cursor: pointer;
    padding: 0;
}

.color-picker-input::-webkit-color-swatch-wrapper {
    padding: 0;
}

.color-picker-input::-webkit-color-swatch {
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

/* ── 반응형 ── */
@media (max-width: 1750px) {
    .card-grid {
        grid-template-columns: repeat(4, 250px);
    }
}

@media (max-width: 1500px) {
    .card-grid {
        grid-template-columns: repeat(3, 250px);
    }
}

@media (max-width: 1200px) {
    .card-grid {
        grid-template-columns: repeat(3, 250px);
    }

    .filter-sidebar {
        width: 220px;
    }
}

@media (max-width: 1000px) {
    .card-grid {
        grid-template-columns: repeat(2, 250px);
    }
}

/* 토스트 알림 */
.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: rgba(26, 26, 36, 0.95);
    color: var(--gold-light);
    padding: 12px 24px;
    border: 1px solid var(--gold);
    border-radius: 30px;
    font-size: 14px;
    font-weight: 600;
    z-index: 10000;
    pointer-events: auto;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.4s;
    opacity: 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    gap: 10px;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.toast-undo-btn {
    border-radius: 6px;
    background: transparent;
    border: 1px solid var(--gold);
    color: var(--gold-light);
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    margin-left: 15px;
    transition: all 0.2s;
    text-transform: uppercase;
}

.toast-undo-btn:hover {
    background: var(--gold);
    color: #000;
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.5);
}

@media (max-width: 780px) {
    .card-grid {
        grid-template-columns: repeat(1, 250px);
    }
}