/* zzan_df 캐릭터 전적검색 */
.dfch { max-width: 1080px; margin: 0 auto; padding: 24px 16px 60px; color: #1f2430; }

/* 히어로 */
.dfch-hero { text-align: center; padding: 36px 16px 28px; background: linear-gradient(135deg, #1b1e2b 0%, #33241b 100%); border-radius: 16px; color: #fff; }
.dfch-hero-title { margin: 0 0 6px; font-size: 26px; font-weight: 800; }
.dfch-hero-desc { margin: 0 0 18px; font-size: 14px; color: rgba(255,255,255,.72); }
.dfch-search { display: flex; gap: 8px; max-width: 640px; margin: 0 auto; }
.dfch-server { flex: 0 0 auto; border: 0; border-radius: 10px; padding: 0 12px; height: 48px; font-size: 14px; background: #fff; color: #1f2430; }
.dfch-input { flex: 1 1 auto; min-width: 0; border: 0; border-radius: 10px; padding: 0 16px; height: 48px; font-size: 15px; }
.dfch-btn { flex: 0 0 auto; border: 0; border-radius: 10px; padding: 0 26px; height: 48px; font-size: 15px; font-weight: 700; background: #e8542a; color: #fff; cursor: pointer; }
.dfch-btn:hover { background: #d0451f; }
.dfch-nokey { margin: 14px 0 0; font-size: 13px; color: #ffc9a3; }

/* 공통 */
.dfch-sec-title { font-size: 16px; font-weight: 800; margin: 28px 0 12px; }
.dfch-loading { margin: 28px 0; text-align: center; color: #777; font-size: 14px; }
.dfch-spinner { display: inline-block; width: 16px; height: 16px; border: 2px solid #ddd; border-top-color: #e8542a; border-radius: 50%; vertical-align: -3px; animation: dfch-spin .8s linear infinite; }
@keyframes dfch-spin { to { transform: rotate(360deg); } }
.dfch-error { margin: 24px 0; padding: 14px 16px; border: 1px solid #f3c9cb; background: #fff7f7; border-radius: 10px; color: #c0392b; font-size: 14px; }

/* 검색 결과 목록 */
.dfch-results { margin-top: 24px; }
.dfch-result-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.dfch-card { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid #e5e7eb; border-radius: 12px; background: #fff; cursor: pointer; transition: box-shadow .15s, transform .15s; text-align: left; }
.dfch-card:hover { box-shadow: 0 4px 14px rgba(0,0,0,.08); transform: translateY(-1px); }
.dfch-card-img { width: 52px; height: 52px; border-radius: 10px; background: #f0f1f5; object-fit: cover; flex: 0 0 auto; }
.dfch-card-name { font-weight: 800; font-size: 15px; }
.dfch-card-sub { font-size: 12px; color: #777; margin-top: 2px; }

/* 캐릭터 상세 헤더 */
.dfch-detail { margin-top: 28px; }
.dfch-profile { display: flex; gap: 20px; align-items: center; padding: 20px; border: 1px solid #e5e7eb; border-radius: 16px; background: linear-gradient(160deg, #fafbfd, #f2f0ec); flex-wrap: wrap; }
.dfch-profile-img { width: 140px; height: 140px; object-fit: contain; image-rendering: pixelated; }
.dfch-profile-info { flex: 1 1 260px; }
.dfch-profile-name { font-size: 22px; font-weight: 900; margin: 0; }
.dfch-profile-sub { font-size: 13px; color: #666; margin: 4px 0 10px; }
.dfch-badges { display: flex; gap: 6px; flex-wrap: wrap; }
.dfch-badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; background: #eef0f5; color: #444; }
.dfch-badge.fame { background: #ffe9d6; color: #c2551f; }
.dfch-refresh { margin-left: auto; border: 1px solid #d9dbe2; background: #fff; border-radius: 10px; padding: 8px 14px; font-size: 13px; cursor: pointer; }
.dfch-refresh:hover { background: #f5f6f8; }
.dfch-updated { font-size: 12px; color: #999; margin-top: 6px; }

/* 탭 */
.dfch-tabs { display: flex; gap: 4px; margin: 20px 0 0; border-bottom: 2px solid #e5e7eb; flex-wrap: wrap; }
.dfch-tab { border: 0; background: none; padding: 10px 16px; font-size: 14px; font-weight: 700; color: #888; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -2px; }
.dfch-tab.on { color: #e8542a; border-bottom-color: #e8542a; }
.dfch-panel { padding: 18px 0; }

/* 능력치 */
.dfch-stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 8px; }
.dfch-stat { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; padding: 9px 12px; border: 1px solid #eceef2; border-radius: 8px; background: #fff; font-size: 13px; }
.dfch-stat > span { flex: 0 0 auto; white-space: nowrap; color: #777; }
.dfch-stat b { font-weight: 800; text-align: right; min-width: 0; word-break: keep-all; overflow-wrap: anywhere; }

/* 장비/아바타 목록 */
.dfch-items { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 8px; }
.dfch-item { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border: 1px solid #eceef2; border-radius: 10px; background: #fff; }
/* 사이트 공용 img{height:auto} 류 규칙에 밀리지 않게 !important 로 정사각 고정 */
.dfch-item-img { width: 36px !important; height: 36px !important; min-width: 36px; max-width: 36px; border-radius: 8px; background: #14161d; flex: 0 0 auto; object-fit: contain !important; object-position: center; }
.dfch-item-body { min-width: 0; }
.dfch-item-name { font-size: 13.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dfch-item-sub { font-size: 12px; color: #888; margin-top: 1px; }
.dfch-slot { display: inline-block; min-width: 52px; font-size: 11px; color: #999; }
/* 레어리티 색 */
.dfch-r-커먼 { color: #888; } .dfch-r-언커먼 { color: #2e9e4f; } .dfch-r-레어 { color: #b36bff; }
.dfch-r-유니크 { color: #ff7800; } .dfch-r-에픽 { color: #ffb400; } .dfch-r-레전더리 { color: #ff6a00; }
.dfch-r-신화 { color: #21c4b8; } .dfch-r-태초 { color: #58d3ff; }

/* 세부 그룹 제목 */
.dfch-group-title { font-size: 14px; font-weight: 800; margin: 18px 0 8px; color: #444; }
.dfch-empty { color: #999; font-size: 13px; padding: 14px 0; }

/* 타임라인 — 날짜별 그룹 */
.dfch-tl-days { display: flex; flex-direction: column; gap: 8px; }
.dfch-tl-day { border: 1px solid #eceef2; border-radius: 10px; background: #fff; overflow: hidden; }
.dfch-tl-daybtn { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; background: none; padding: 12px 14px; cursor: pointer; text-align: left; }
.dfch-tl-daybtn:hover { background: #f7f8fa; }
.dfch-tl-dayname { font-size: 14px; font-weight: 800; }
.dfch-tl-daycnt { font-size: 12px; font-weight: 700; color: #e8542a; background: #ffe9d6; border-radius: 999px; padding: 2px 9px; }
.dfch-tl-dayarrow { margin-left: auto; color: #aaa; font-size: 12px; transition: transform .15s; }
.dfch-tl-daybtn.open .dfch-tl-dayarrow { transform: rotate(180deg); }
.dfch-tl-daybody { padding: 4px 14px 12px; border-top: 1px solid #f0f1f5; }

/* 타임라인 */
.dfch-timeline { border-left: 2px solid #eceef2; margin-left: 8px; padding-left: 16px; }
.dfch-tl-item { position: relative; padding: 6px 0 10px; font-size: 13.5px; }
.dfch-tl-item::before { content: ''; position: absolute; left: -21px; top: 12px; width: 8px; height: 8px; border-radius: 50%; background: #e8542a; }
.dfch-tl-date { color: #999; font-size: 12px; margin-right: 8px; }
.dfch-more { display: block; margin: 14px auto 0; border: 1px solid #d9dbe2; background: #fff; border-radius: 10px; padding: 8px 22px; font-size: 13px; cursor: pointer; }

/* 아이템 클릭/상세 모달 */
.dfch-clickable { cursor: pointer; }
.dfch-clickable:hover { border-color: #e8542a; }
.dfch-itemlink { cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.dfch-modal { position: fixed; inset: 0; z-index: 9000; }
.dfch-modal-back { position: absolute; inset: 0; background: rgba(10, 12, 18, .55); }
.dfch-modal-box { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(520px, calc(100vw - 32px)); max-height: min(78vh, 720px); overflow-y: auto; background: #fff; border-radius: 14px; padding: 20px; box-shadow: 0 20px 60px rgba(0,0,0,.35); }
.dfch-modal-search { display: flex; gap: 6px; margin: 0 26px 14px 0; }
.dfch-modal-q { flex: 1 1 auto; min-width: 0; border: 1px solid #d9dbe2; border-radius: 8px; padding: 8px 12px; font-size: 13.5px; }
.dfch-modal-go { flex: 0 0 auto; border: 0; border-radius: 8px; padding: 8px 16px; font-size: 13px; font-weight: 700; background: #e8542a; color: #fff; cursor: pointer; }
.dfch-modal-x { position: absolute; top: 10px; right: 12px; border: 0; background: none; font-size: 22px; color: #999; cursor: pointer; line-height: 1; }
.dfch-modal-x:hover { color: #333; }
.dfch-idet-head { display: flex; gap: 12px; align-items: center; margin-bottom: 6px; }
.dfch-idet-img { width: 48px !important; height: 48px !important; border-radius: 10px; background: #14161d; flex: 0 0 auto; object-fit: contain !important; object-position: center; }
.dfch-idet-name { font-size: 16px; font-weight: 900; }
.dfch-idet-sec { font-size: 13px; font-weight: 800; color: #444; margin: 14px 0 6px; }
.dfch-idet-tx { font-size: 13px; color: #555; line-height: 1.6; margin: 0; white-space: pre-line; }
.dfch-idet-eq { color: #e8542a; border-top: 1px solid #f0f1f5; padding-top: 12px; }
.dfch-eq-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.dfch-eq-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px; border: 1px solid #eceef2; border-radius: 999px; background: #fafbfd; font-size: 12.5px; font-weight: 800; white-space: nowrap; }
.dfch-eq-chip em { font-style: normal; font-weight: 700; color: #999; }
/* 모달 내 스탯 그리드: 1줄 2개 고정 + 값 줄바꿈 금지 */
.dfch-modal .dfch-stat-grid { grid-template-columns: 1fr 1fr; }
.dfch-modal .dfch-stat b { white-space: nowrap; }
@media (max-width: 480px) { .dfch-modal .dfch-stat-grid { grid-template-columns: 1fr; } }
.dfch-idet-flavor { font-size: 12px; color: #999; font-style: italic; margin: 14px 0 0; border-top: 1px dashed #e5e7eb; padding-top: 10px; }

/* 최근 검색 */
.dfch-recent-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }

@media (max-width: 640px) {
	.dfch-hero { padding: 26px 12px 22px; }
	.dfch-hero-title { font-size: 20px; }
	.dfch-search { flex-wrap: wrap; }
	.dfch-server { flex: 0 0 100%; height: 42px; }
	.dfch-input { height: 44px; }
	.dfch-btn { height: 44px; padding: 0 18px; }
	.dfch-profile { gap: 12px; padding: 14px; }
	.dfch-profile-img { width: 96px; height: 96px; }
}
