/**
 * @file style.css
 * @description 디아블로 2 레저렉션 악군 패키지 백과사전 공통 스타일시트
 * @author LEVI SHIN (악군 패키지 백과사전 프로젝트)
 */

:root {
    --bg-color: #0b0b0e;
    --card-bg: #141418;
    --card-border: #262630;
    --text-color: #c7c7cff0;
    --text-bright: #f3f3f6;
    --gold: #dfb15b;
    --gold-light: #f3d48d;
    --unique-orange: #c49a45;
    --rune-orange: #ff7700;
    --accent-red: #900c3f;
    --magic-blue: #3498db;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
    width: 100%;
    overflow-x: hidden;
    background-color: var(--bg-color); 
    color: var(--text-color); 
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; 
    line-height: 1.7; 
    padding-bottom: 80px; 
}

/* 전체 레이아웃 셸 */
.page-shell {
    width: 100%;
    max-width: 1680px;
    display: flex;
    justify-content: flex-start;
    align-items: flex-start;
    gap: 20px;
    margin: 0 auto;
    padding: 20px 15px;
}

/* 왼쪽 고정 사이드바 네비게이션 */
.left-sidebar {
    width: 260px;
    flex: 0 0 260px;
    position: sticky;
    top: 20px;
    background: #141418;
    border: 1px solid var(--card-border);
    border-radius: 10px;
    padding: 20px 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.6);
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    z-index: 100;
}

.sidebar-logo {
    color: var(--gold);
    font-size: 1.05rem;
    font-weight: bold;
    text-align: center;
    margin-bottom: 15px;
    border-bottom: 2px solid var(--card-border);
    padding-bottom: 12px;
    word-break: keep-all;
}

.sidebar-search {
    position: relative;
    margin-bottom: 15px;
}

.search-input {
    width: 100%; 
    padding: 10px 15px 10px 38px; 
    background: #111115;
    border: 2px solid var(--gold); 
    border-radius: 20px; 
    color: var(--text-bright); 
    outline: none;
    font-size: 0.88rem;
    box-shadow: inset 0 2px 5px rgba(0,0,0,0.5);
    transition: all 0.3s ease;
}
.search-input:focus { 
    border-color: var(--gold-light);
    box-shadow: 0 0 10px rgba(223, 177, 91, 0.4), inset 0 2px 5px rgba(0,0,0,0.5); 
}

.search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gold);
    font-size: 0.95rem;
}

/* 🌟 전역 통합 검색 결과 드롭다운 스타일 */
#global-search-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background: #15151a;
    border: 1px solid var(--gold);
    border-radius: 8px;
    max-height: 400px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 10px 25px rgba(0,0,0,0.8);
    padding: 10px;
    font-size: 0.9rem;
}

.nav-menu {
    display: flex;
    flex-direction: column;
    gap: 6px;
    list-style: none;
}
.nav-menu button { 
    width: 100%;
    text-align: left;
    color: var(--text-color); 
    text-decoration: none; 
    padding: 8px 12px; 
    background: #1a1a22; 
    border: 1px solid var(--card-border); 
    border-radius: 6px; 
    font-size: 0.84rem; 
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: block;
}
.nav-menu button:hover, .nav-menu button.active { 
    color: var(--gold-light); 
    border-color: var(--gold); 
    background: #252530;
    transform: translateX(3px);
    font-weight: bold;
}

/* 우측 메인 콘텐츠 영역 */
.main-content {
    flex: 1 1 auto;
    min-width: 0;
}

header {
    background: linear-gradient(135deg, #181820 0%, #0b0b0e 100%);
    border-bottom: 3px solid var(--gold);
    padding: 20px; 
    text-align: center; 
    border-radius: 10px;
    margin-bottom: 20px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.8);
}

h1 { 
    color: var(--gold); 
    font-size: 1.6rem; 
    margin-bottom: 0; 
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
    letter-spacing: 1px;
    word-break: keep-all;
}

.content-section { display: none; margin-bottom: 40px; }
.content-section.active { display: block; }

.section-title { 
    color: var(--gold); 
    font-size: 1.35rem; 
    border-bottom: 2px solid var(--card-border); 
    padding-bottom: 8px; 
    margin-bottom: 18px; 
    display: flex;
    align-items: center;
    gap: 10px;
    word-break: keep-all;
}

/* 빌드 필터링 태그 버튼 */
.filter-tags { display: flex; gap: 8px; margin-bottom: 20px; flex-wrap: wrap; }
.filter-btn { background: #111115; border: 1px solid var(--card-border); color: var(--text-color); padding: 6px 14px; border-radius: 20px; font-size: 0.82rem; font-weight: bold; cursor: pointer; transition: all 0.2s; }
.filter-btn:hover, .filter-btn.active { background: #282110; color: var(--gold-light); border-color: var(--gold); }

.grid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.card { 
    background: var(--card-bg); 
    border: 1px solid var(--card-border); 
    border-radius: 8px; 
    padding: 18px; 
    box-shadow: 0 4px 10px rgba(0,0,0,0.4);
    transition: transform 0.2s ease, border-color 0.2s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
}
.card:hover { border-color: var(--gold); transform: translateY(-3px); }
.card h3 { color: var(--gold); margin-bottom: 6px; font-size: 1.15rem; }
.card p { font-size: 0.85rem; color: #a1a1aa; margin-bottom: 12px; line-height: 1.4; flex-grow: 1; }

.badge { display: inline-block; background: #282110; color: var(--gold-light); font-size: 0.72rem; padding: 3px 8px; border-radius: 12px; margin-bottom: 8px; border: 1px solid var(--gold); font-weight: bold; align-self: flex-start; }
.rune-tier-low { background: #1e293b; color: #94a3b8; border-color: #475569; margin-bottom: 0; }
.rune-tier-mid { background: #172554; color: #60a5fa; border-color: #2563eb; margin-bottom: 0; }
.rune-tier-high { background: #3f1d0b; color: #fb923c; border-color: #c2410c; margin-bottom: 0; }
.btn-detail { width: 100%; background: #211b0f; color: var(--gold-light); border: 1px solid var(--gold); padding: 8px; border-radius: 5px; cursor: pointer; font-weight: bold; transition: background 0.2s; font-size: 0.85rem; }
.btn-detail:hover { background: #2d2515; }

table { width: 100%; border-collapse: collapse; background: var(--card-bg); margin-top: 12px; font-size: 0.88rem; border-radius: 8px; overflow: hidden; box-shadow: 0 4px 10px rgba(0,0,0,0.4); }
th, td { padding: 12px 14px; border: 1px solid var(--card-border); text-align: left; vertical-align: top; }
th { background: #111115; color: var(--gold); font-weight: 600; text-transform: uppercase; font-size: 0.82rem; letter-spacing: 0.5px; }
tr:nth-child(even) { background: #16161c; }
tr:hover { background: #1f1f28; }

.highlight { color: var(--gold-light); font-weight: bold; }
.unique { color: var(--unique-orange); font-weight: bold; }
.rune { color: var(--rune-orange); font-weight: bold; }

/* 육성 가이드 */
.leveling-note {
    margin-bottom: 16px;
    font-size: 0.95rem;
    background: var(--card-bg);
    padding: 12px 14px;
    border-left: 3px solid var(--gold);
    border-radius: 4px;
    word-break: keep-all;
}
.leveling-note.season {
    border-left-color: var(--magic-blue);
}
.leveling-class-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 12px;
    margin: 12px 0 22px;
}
.leveling-class-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 10px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.leveling-class-card h3 {
    color: var(--gold);
    font-size: 1.02rem;
    margin: 0;
}
.leveling-class-card p {
    font-size: 0.85rem;
    color: #a1a1aa;
    line-height: 1.55;
    margin: 0;
    flex-grow: 1;
}
.leveling-class-badge {
    display: inline-block;
    font-size: 0.7rem;
    background: #1e293b;
    color: #38bdf8;
    padding: 2px 8px;
    border-radius: 4px;
    width: fit-content;
}
.leveling-stage {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 10px;
    padding: 16px 18px;
    margin-bottom: 14px;
}
.leveling-stage h3 {
    color: var(--gold);
    font-size: 1.08rem;
    margin-bottom: 6px;
}
.leveling-stage .leveling-goal {
    font-size: 0.85rem;
    color: var(--gold-light);
    margin-bottom: 10px;
}
.leveling-stage ol {
    margin: 0;
    padding-left: 1.2rem;
}
.leveling-stage li {
    margin-bottom: 8px;
    font-size: 0.9rem;
    word-break: keep-all;
}
.leveling-class-card .btn-detail + .btn-detail {
    margin-top: 6px;
}
.leveling-stage-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}
.leveling-stage-actions .btn-detail {
    width: auto;
    min-width: 160px;
    flex: 1 1 160px;
}
.leveling-subhead {
    color: var(--gold);
    font-size: 1.05rem;
    margin: 22px 0 8px;
}
.leveling-table-wrap {
    width: 100%;
    overflow-x: auto;
    margin-bottom: 8px;
}

/* 패치 노트 아코디언 스타일 */
.patch-accordion { background: var(--card-bg); border: 1px solid var(--card-border); border-radius: 10px; margin-bottom: 15px; overflow: hidden; box-shadow: 0 5px 15px rgba(0,0,0,0.5); transition: all 0.25s ease; }
.patch-accordion:hover { border-color: var(--gold); transform: translateY(-2px); }

/* 기본 헤더 스타일 */
.patch-header { 
    padding: 18px 22px; 
    background: linear-gradient(135deg, #181820 0%, #111115 100%); 
    color: var(--gold); 
    font-size: 1.1rem; 
    font-weight: bold; 
    cursor: pointer; 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    user-select: none; 
    border-left: 4px solid var(--gold); 
    border-color: var(--card-border); 
    transition: all 0.25s ease; 
    gap: 15px; 
}

/* 타이틀 텍스트 말줄임 및 영역 고정 */
.patch-title-text {
    flex: 1 1 auto;
    min-width: 0; 
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 활성화 항목 (always-gold) */
.patch-accordion.always-gold .patch-header,
.patch-accordion.always-gold .patch-title-text {
    color: var(--gold) !important;
}

.patch-accordion.always-gold .patch-header * {
    color: var(--gold) !important;
}
.patch-accordion.always-gold .patch-header::after {
    color: var(--gold-light) !important;
}

/* 비활성화 항목 (always-gray) */
.patch-accordion.always-gray .patch-header {
    color: #9ca3af !important;
    background: linear-gradient(135deg, #181820 0%, #111115 100%) !important;
    border-color: #3f3f46;
    border-left-color: #52525b !important;
}
.patch-accordion.always-gray .patch-header::after {
    color: #71717a !important;
}

.patch-accordion.always-gray:not(.open) .patch-header:hover {
    color: #d1d5db !important;
    border-left-color: var(--gold) !important;
    opacity: 1;
}

/* 열렸을 때 화살표 회전 */
.patch-accordion.open .patch-header::after {
    transform: rotate(180deg);
}

/* 우측 그룹 (링크 + 화살표) */
.patch-header-right {
    display: flex;
    align-items: center;
    gap: 14px; 
    flex-shrink: 0; 
}

.patch-header::after { 
    content: '▼'; 
    font-size: 0.85rem; 
    color: var(--gold-light); 
    transition: transform 0.3s ease, color 0.3s ease; 
    flex-shrink: 0; 
}

/* 외부 링크 아이콘 스타일 */
.patch-external-link {
    font-size: 0.85rem;
    text-decoration: none;
    padding: 5px 10px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.patch-external-link:hover {
    background: rgba(196, 154, 69, 0.15);
    border-color: var(--gold);
    transform: scale(1.05);
}

/* 패치 본문 스타일 */
.patch-body { max-height: 0; overflow: hidden; transition: max-height 0.35s ease-out, padding 0.35s ease-out; padding: 0 22px; background: var(--card-bg); font-size: 0.92rem; }
.patch-accordion.open .patch-body { max-height: 1500px; padding: 20px 22px 25px 22px; border-top: 1px solid var(--card-border); }
.patch-body h4 { color: var(--gold-light); font-size: 0.98rem; margin: 14px 0 6px 0; border-left: 3px solid var(--unique-orange); padding-left: 8px; background: rgba(196, 154, 69, 0.05); }
.patch-body ul { list-style-type: disc; padding-left: 20px; }
.patch-body ul li { margin-bottom: 6px; color: var(--text-color); }

.item-click-hint { margin: -6px 0 14px; padding: 10px 13px; border: 1px solid var(--card-border); border-left: 3px solid var(--gold); border-radius: 7px; background: rgba(223,177,91,.045); color: #a9a9b2; font-size: .82rem; }

/* 공용 모달 */
.item-modal { display: none; position: fixed; inset: 0; z-index: 10000; align-items: center; justify-content: center; padding: 18px; background: rgba(0,0,0,.86); backdrop-filter: blur(7px); }
.item-modal.open { display: flex; }

#paperDollModal { z-index: 11000; }
#databaseItemModal, #itemModal { z-index: 12000; }

.item-modal-panel { width: min(920px, 100%); max-height: 92vh; overflow: auto; background: radial-gradient(circle at 15% 10%, rgba(223,177,91,.09), transparent 28%), linear-gradient(145deg, #17171d, #0d0d11 70%); border: 1px solid #51442c; border-radius: 14px; box-shadow: 0 25px 80px rgba(0,0,0,.85); position: relative; }
.item-modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--card-border); }
.item-modal-title { color: var(--gold-light); font-size: 1.35rem; font-weight: 800; display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.item-modal-eng { font-size: 0.72em; font-weight: 600; color: #b8b8c2; }
.ladder-badge { display: inline-block; padding: 2px 8px; font-size: 0.68rem; font-weight: 600; border-radius: 4px; vertical-align: middle; line-height: 1.4; }
.ladder-badge.ladder-only { background: rgba(239, 68, 68, 0.15); color: #ef4444; border: 1px solid rgba(239, 68, 68, 0.3); }
.ladder-badge.ladder-ok { background: rgba(16, 185, 129, 0.15); color: #10b981; border: 1px solid rgba(16, 185, 129, 0.3); }
.item-modal-close { width: 36px; height: 36px; border: 1px solid var(--card-border); border-radius: 50%; background: #111115; color: #aaa; cursor: pointer; font-size: 1.25rem; display: grid; place-items: center; }
.item-modal-close:hover { color: var(--gold-light); border-color: var(--gold); }
.item-modal-body { display: grid; grid-template-columns: 340px 1fr; gap: 24px; padding: 24px; }

.item-art-wrap { min-height: 380px; border: 1px solid #4b3b20; border-radius: 10px; background: radial-gradient(circle at 50% 38%, rgba(223,177,91,.12), transparent 34%), #09090c; display: flex; align-items: center; justify-content: center; position: relative; overflow: hidden; padding: 10px; }
.d2-item-art { width: 100%; height: 100%; position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; }

.d2-armor-image-container { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; }
.d2-armor-image-container img { width: 100%; height: 100%; object-fit: contain; border-radius: 6px; display: block; filter: drop-shadow(0 0 12px rgba(223,177,91,0.25)); }
.db-modal-img { max-width: 100%; max-height: 340px; object-fit: contain; border-radius: 6px; display: block; filter: drop-shadow(0 0 14px rgba(223,177,91,0.3)); }

.d2-armor { position: relative; width: 108px; height: 170px; border: 2px solid #7e6b42; background: linear-gradient(90deg, transparent 12%, rgba(223,177,91,.16) 50%, transparent 88%), linear-gradient(180deg, #3a3327, #17171a 65%, #0c0c0e); clip-path: polygon(25% 0, 75% 0, 88% 14%, 78% 30%, 88% 100%, 12% 100%, 22% 30%, 12% 14%); box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); margin-bottom: 15px; }

.item-detail h4 { margin: 0 0 9px; color: var(--gold-light); border-left: 3px solid var(--gold); padding-left: 8px; }
.item-detail p { margin: 0 0 14px; color: var(--text-color); }
.item-stats { border: 1px solid var(--card-border); border-radius: 9px; overflow: hidden; margin-bottom: 16px; }
.item-stat { padding: 9px 12px; border-bottom: 1px solid var(--card-border); color: #d9d9df; background: rgba(255,255,255,.015); }
.item-stat.build-playstyle { background: rgba(223, 177, 91, 0.08); border-left: 3px solid var(--gold); color: #ececf1; line-height: 1.55; }

.item-action { 
    display: inline-flex; 
    gap: 8px; 
    align-items: center; 
    justify-content: center; 
    padding: 12px 20px; 
    border: 1px solid var(--gold); 
    border-radius: 7px; 
    background: linear-gradient(135deg, #2d2515 0%, #151108 100%); 
    color: var(--gold-light); 
    cursor: pointer; 
    font-weight: 700; 
    font-size: 0.9rem;
    width: 100%;
    margin-top: 15px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.4);
    transition: all 0.2s ease;
}
.item-action:hover { 
    background: #3d3320; 
    border-color: var(--gold-light);
    box-shadow: 0 0 12px rgba(223, 177, 91, 0.3);
    transform: translateY(-1px);
}

.item-inline { color: var(--gold-light); text-decoration: underline dotted; text-underline-offset: 3px; cursor: pointer; }
.item-inline:hover { color: #fff0bd; }

.paperdoll-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 20px; }
.paperdoll-slot { background: #111115; border: 1px solid var(--card-border); border-radius: 8px; padding: 12px; transition: all 0.2s; display: flex; flex-direction: column; justify-content: center; }
.merc-doll-section { grid-column: 1 / -1; margin-top: 15px; border-top: 1px dashed #444; padding-top: 10px; }
.merc-doll-title { color: var(--gold-light); font-weight: bold; margin-bottom: 8px; font-size: 0.9rem; }
.merc-doll-gear { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.paperdoll-slot:hover { border-color: var(--gold); background: #1a1a24; }
.slot-title { font-size: 0.75rem; color: var(--gold); font-weight: bold; margin-bottom: 6px; border-bottom: 1px solid #333; padding-bottom: 4px; letter-spacing: 0.5px; }
.slot-item { font-size: 0.9rem; color: var(--text-bright); font-weight: 600; line-height: 1.4; }

.dropcalc-form {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: flex-end;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 10px;
    padding: 16px;
    margin: 16px 0 10px;
}
.dropcalc-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 140px;
    flex: 1 1 140px;
}
.dropcalc-field-grow { flex: 2 1 220px; }
.dropcalc-field span {
    font-size: 0.8rem;
    color: var(--gold-light);
    font-weight: bold;
}
.dropcalc-field input,
.dropcalc-field select {
    width: 100%;
    padding: 10px 12px;
    background: #111115;
    color: var(--text-bright);
    border: 1px solid var(--card-border);
    border-radius: 6px;
    font-size: 0.95rem;
    outline: none;
}
.dropcalc-field input:focus,
.dropcalc-field select:focus {
    border-color: var(--gold);
}
.dropcalc-submit {
    padding: 11px 22px;
    background: var(--gold);
    color: #0b0b0e;
    font-weight: bold;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.92rem;
    height: 42px;
}
.dropcalc-submit:hover { filter: brightness(1.08); }
.dropcalc-presets {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 18px;
    font-size: 0.82rem;
    color: #888;
}
.dropcalc-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
    margin: 8px 0 14px;
}
.dropcalc-stat {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 8px;
    padding: 12px;
}
.dropcalc-stat span { display: block; font-size: 0.75rem; color: #888; }
.dropcalc-stat strong { display: block; color: var(--gold-light); font-size: 1.25rem; line-height: 1.4; }
.dropcalc-stat em { font-style: normal; font-size: 0.78rem; color: #10b981; }
.dropcalc-source-note {
    font-size: 0.88rem;
    color: var(--text-color);
    margin: 0 0 16px;
    word-break: keep-all;
}
.dropcalc-h {
    color: var(--gold);
    font-size: 1.05rem;
    margin: 18px 0 8px;
}
.dropcalc-sub { margin-top: 4px; }
.dropcalc-mult { font-size: 0.72rem; color: #10b981; }
.dropcalc-badge {
    display: inline-block;
    padding: 2px 8px;
    font-size: 0.68rem;
    font-weight: 600;
    border-radius: 4px;
    line-height: 1.4;
}
.dropcalc-badge-ok {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.top-btn { position: fixed; bottom: 25px; right: 25px; width: 45px; height: 45px; background: var(--card-bg); border: 2px solid var(--gold); color: var(--gold); border-radius: 50%; display: flex; justify-content: center; align-items: center; text-decoration: none; font-weight: bold; box-shadow: 0 4px 15px rgba(0,0,0,0.6); z-index: 999; }
.top-btn:hover { background: var(--gold); color: #0b0b0e; transform: scale(1.1); }

td ul { margin-top: 5px; margin-bottom: 5px; padding-left: 18px; }
td ul li { margin-bottom: 5px; }
.sub-list { list-style-type: circle; color: #a1a1aa; margin-top: 4px; }

.side-ad { width: 160px; flex: 0 0 160px; position: sticky; top: 20px; min-height: 200px; z-index: 50; display: flex; justify-content: center; }
.side-ad-inner { width: 160px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.mobile-ad { display: none; width: 100%; margin: 0; padding: 0; overflow: hidden; min-height: 0; }
ins.adsbygoogle[data-ad-status="unfilled"] { display: none !important; height: 0 !important; }

/* 전역 통합 검색 결과 드롭다운 스타일 */
#global-search-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background: #15151a;
    border: 1px solid var(--gold, #dfb15b);
    border-radius: 8px;
    max-height: 400px;
    overflow-y: auto;
    z-index: 99999;
    box-shadow: 0 15px 35px rgba(0,0,0,0.9);
    padding: 10px;
    font-size: 0.9rem;
}

/* 미디어쿼리 반응형 */
@media screen and (max-width: 767px) {
    .desktop-only { display: none !important; }
    .merc-doll-gear { grid-template-columns: 1fr; }
}

@media (max-width: 1200px) {
    .side-ad { display: none !important; width: 0 !important; height: 0 !important; min-height: 0 !important; }
    .mobile-ad { display: block; margin: 0; min-height: 0; }
    .mobile-ad:has(ins.adsbygoogle[data-ad-status="filled"]) { margin: 10px 0; }
    .mobile-ad:not(:has(ins.adsbygoogle[data-ad-status="filled"])) {
        display: none !important;
        height: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    .page-shell { 
        display: block !important; 
        padding: 0 !important; 
        margin: 0 !important;
        max-width: 100% !important;
    }
    
    .left-sidebar { 
        width: 100% !important; 
        position: relative !important; 
        top: 0 !important; 
        max-height: none !important; 
        height: auto !important; 
        margin-bottom: 0 !important; 
        padding: 8px !important; 
    }
    
    .main-content header, header { 
        display: none !important; 
        height: 0 !important; 
        margin: 0 !important; 
        padding: 0 !important; 
    }
    
    .nav-menu { 
        display: grid !important; 
        grid-template-columns: repeat(2, 1fr) !important; 
        gap: 4px !important; 
        max-height: 130px !important; 
        overflow-y: auto !important;   
        padding-right: 4px;
    }

    .dropcalc-form {
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        gap: 10px;
        padding: 12px;
    }
    .dropcalc-field,
    .dropcalc-field-grow,
    .dropcalc-submit {
        flex: 0 0 auto;
        min-width: 0;
        width: 100%;
    }
    .dropcalc-submit { height: 42px; }

    .main-content { 
        width: 100% !important; 
        margin: 0 !important; 
        padding: 0 !important;
    }

    .content-section {
        margin-top: 0 !important;
        margin-bottom: 10px !important;
    }

    .item-modal {
        padding: 10px !important;
    }

    .item-modal-panel {
        max-height: 95vh !important;
        width: 100% !important;
    }

    .item-modal-body { 
        display: flex !important; 
        flex-direction: column !important; 
        gap: 16px !important; 
        padding: 14px !important; 
        overflow-y: visible !important;
    }

    .item-art-wrap { 
        min-height: 220px !important; 
        max-height: 260px !important;
        width: 100% !important; 
    }
}