/* ==========================================================
   던파타임 — 통합 스타일 (레거시 던파-스타일 베이스)
   ========================================================== */

/* ========== Fonts ========== */
@font-face {
    font-family: 'bmfont';
    src: url('/fonts/BMHANNAPro.ttf') format('truetype');
    font-display: swap;
}
@font-face {
    font-family: 'DNFForgedBlade';
    font-style: normal;
    font-weight: 300;
    src: url('//cdn.df.nexon.com/img/common/font/DNFForgedBlade-Light.otf') format('opentype');
    font-display: swap;
}

/* ========== Reset / Base ========== */
* { box-sizing: border-box; }

html, body { min-height: 100%; }

body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: 'DNFForgedBlade', sans-serif;
    background-color: #212121;
    color: #d3d3d3;
}

main { flex: 1 0 auto; }

a { color: inherit; text-decoration: none; }

img { max-width: 100%; display: block; }

.msg_sound_only, .sound_only, .sr-only {
    display: inline-block !important;
    position: absolute; top: 0; left: 0;
    width: 1px; height: 1px;
    margin: -1px !important; padding: 0 !important;
    font-size: 0; line-height: 0;
    border: 0 !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0);
}

/* ========== App Header (sticky search bar) ========== */
.app-header {
    position: sticky;
    top: 0;
    z-index: 9999;
    background-color: #1a1a1a;
    border-bottom: 1px solid #2a2a2a;
    height: 53px;
    flex-shrink: 0;
}
.app-header__inner {
    height: 53px;
    width: 800px;
    max-width: 100%;
    margin: 0 auto;
    padding: 10px 15px 8px 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.app-logo {
    display: inline-flex;
    align-items: center;
    margin-right: 12px;
    flex-shrink: 0;
    line-height: 0;
}
.app-logo img {
    height: 36px;
    width: auto;
    display: block;
}
.app-logo:hover { opacity: 0.85; }

.search-form {
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: 'DNFForgedBlade', sans-serif;
    font-size: 10pt;
}
.search-form select {
    background: #0e0e0e;
    color: #f0f0f0;
    border: 1px solid #3a3a3a;
    border-radius: 3px;
    font-size: 10pt;
    padding: 6px 8px;
    cursor: pointer;
    height: 33px;
    font-family: inherit;
}
.search-form input[type="text"] {
    width: 300px;
    height: 33px;
    padding: 0 10px;
    background: #0e0e0e;
    color: #f0f0f0;
    border: 1px solid #3a3a3a;
    border-radius: 3px;
    font-size: 10pt;
    font-family: inherit;
}
.search-form input[type="text"]::placeholder {
    color: rgb(120, 120, 120);
}
.search-form input[type="text"]:focus,
.search-form select:focus {
    outline: none;
    border-color: #fabe00;
}
.search-form button,
.search-form input[type="submit"] {
    cursor: pointer;
    height: 33px;
    padding: 0 18px;
    color: #1a1a1a;
    background: #fabe00;
    border: 1px solid #fabe00;
    border-radius: 3px;
    font-weight: bold;
    font-size: 10pt;
    font-family: inherit;
    transition: transform 0.1s, background 0.15s;
    margin-left: 4px;
    white-space: nowrap;
    flex-shrink: 0;
}
.search-form button:hover,
.search-form input[type="submit"]:hover {
    background: #ffd84a;
}
.search-form button:active,
.search-form input[type="submit"]:active { transform: scale(0.95); }

/* ========== App Nav ========== */
.app-nav {
    position: relative;
    width: 100%;
    background-color: #0c3249;
    margin: 0 0 10px 0;
    flex-shrink: 0;
}
.app-nav__inner {
    position: relative;
    width: 850px;
    max-width: 100%;
    margin: 0 auto;
    display: flex;
    height: 30px;
    overflow-x: auto;
    white-space: nowrap;
    font-family: "Malgun Gothic", Arial;
}
.app-nav__inner::-webkit-scrollbar { display: none; }
.app-nav a {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    background-color: #0c3249;
    padding: 0 10px;
    color: #ddd;
    font-weight: 700;
    border-bottom: 2px solid #0c3249;
    border-left: 1px solid #0c3249;
    border-right: 1px solid #0c3249;
}
.app-nav a:hover {
    border-bottom: 2px solid rgb(255, 96, 96);
    border-right: 1px solid #4e5353;
    border-left: 1px solid #343839;
    cursor: pointer;
}
.app-nav a.is-active {
    border-bottom: 2px solid rgb(0, 255, 225);
    border-right: 1px solid #4e5353;
    border-left: 1px solid #343839;
}

/* ========== Footer (stick to bottom) ========== */
.app-footer {
    flex-shrink: 0;
    margin-top: 40px;
    padding: 16px 10px 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    color: rgb(200, 169, 116);
    font-size: 9pt;
}
.app-footer__row { margin: 4px 0; }
.app-footer a { color: rgb(171, 171, 171); }
.app-footer a:hover { color: #fabe00; }
.app-footer .epic { color: #fabe00; font-weight: 700; background: transparent; padding: 0; border-radius: 0; }

/* ========== Main container ========== */
.contents {
    margin-top: 0;
}
.container {
    max-width: 975px;
    width: 95%;
    margin: 5px auto;
    padding: 10px;
}
.container--narrow { max-width: 720px; }
.container--wide { max-width: 1500px; }

/* ========== Recent searches (홈) ========== */
#recentSearchesContainer,
#recentSearches,
.recent-searches {
    display: flex;
    justify-content: center;
    margin: 0;
    flex-wrap: wrap;
    gap: 5px;
    border: 1px solid #3a3a3a;
    width: 100%;
    color: #d3d3d3;
    font-size: 10pt;
    box-sizing: border-box;
    padding: 4px;
}
#recentSearchesContainer:empty,
#recentSearches:empty { display: none; }
.search-item, .recent-searches a,
.search-item:link, .search-item:visited, .search-item:hover, .search-item:active {
    color: #d3d3d3;
    font-size: 10pt;
    text-decoration: none;
    padding: 3px 6px;
    margin: 3px;
    background-color: #333;
    border-radius: 5px;
    display: inline-block;
}
.search-item:hover, .recent-searches a:hover { cursor: pointer; }

/* ========== 박스 / 카드 ========== */
.box {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    background-color: #21212100;
    margin: 5px auto;
    border: 1px solid #3a3a3a;
    border-radius: 3px;
    max-width: 975px;
    width: 95%;
    padding: 10px;
}
.box--center {
    justify-content: center;
    align-content: center;
    background-color: #eeeeee;
    color: #333;
    margin: 20px auto;
    border: 1px solid #ccc;
    padding: 13px;
}

/* ========== 캐릭터 검색 결과 박스 ========== */
.characterBox {
    display: flex;
    align-items: center;
    width: 474px;
    max-width: 100%;
    border: 1px solid #3a3a3a;
    position: relative;
    background-color: #21212100;
    margin: 6px 5px;
    font-size: 11pt;
    line-height: 14px;
    transition: transform 0.1s;
    cursor: pointer;
}
.characterBox:active { transform: scale(0.95); }
.characterBox:hover { border-color: #00ffe1; }
.characterBox table { border-collapse: collapse; width: 100%; }
.characterBox td { padding: 4px 6px; vertical-align: middle; }
.characterImage { margin-right: 20px; }
.character img { transform: scale(1.2); }

/* ========== 캐릭터 정보 카드 (white panel) ========== */
.character-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px;
    border: 1px solid silver;
    background-color: #fff;
    color: #333;
    width: 180px;
    height: 170px;
    margin-top: 15px;
    margin-left: 10px;
}
.info-header { display: flex; justify-content: space-between; width: 100%; }
.character-details { display: flex; align-items: flex-end; }
.character-name { font-size: 19pt; font-weight: bold; margin-right: 5px; }
.character-level { font-size: 12px; margin-bottom: 3px; }
.info-fame { display: flex; align-items: center; padding: 10px 0; }
.fame-icon { margin-right: 5px; width: 20px; margin-bottom: 5px; }
.fame-value { font-size: 15pt; font-weight: bold; color: #228822; }
.job-and-guild {
    display: flex; flex-direction: column;
    justify-content: center; align-items: center;
    width: 100%;
}

/* ========== 캐릭터 이미지 + 배경 (대시보드) ========== */
.user-image { float: left; vertical-align: middle; }
.avatar-bg {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #fff;
    background-image: url('/image/avatar_background.png');
    background-position: center;
    background-repeat: no-repeat;
    width: 230px;
    height: 220px;
    box-shadow: 0 10px 15px rgba(255, 255, 255, 0.1);
    z-index: 1;
}
#avatarImage {
    position: absolute;
    top: 44%; left: 50%;
    transform: translate(-50%, -50%);
    z-index: -1; width: 100%; height: auto;
}
.head {
    background-repeat: no-repeat;
    height: 177px;
    display: flex;
    justify-content: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.bg {
    background-position: 0 0;
    width: 264px; height: 177px;
    background-image: url(/image/character_background.png);
}
.head .char {
    display: flex; justify-content: center; align-items: flex-end; color: #fff;
}

/* ========== 아이템 컨테이너 / 슬롯 ========== */
.itemContainer { width: 80px; display: flex; justify-content: center; align-items: center; margin: 0 10px; }
#itemContainerLeft { padding-left: 3px; }
#itemContainerRight { padding-right: 3px; }
.itemRow { display: flex; flex-direction: column; align-items: center; margin-right: 5px; }
.item { width: 30px; height: 30px; margin-bottom: 4px; }
.icon { width: 28px; height: 28px; position: relative; }
.eq-item-box { width: 30px; height: 30px; display: flex; }
.eq-icon {
    width: 30px; height: 30px;
    display: flex;
    border-radius: 2px;
    overflow: hidden;
}
.eq-icon img { width: 100%; height: 100%; object-fit: cover; }

/* ========== 등급 배경 (고전 사각 배지) ========== */
.epic    { background-color: #ffb400; border-radius: 1px; }
.legend  { background-color: #FF7800; border-radius: 1px; }
.rare    { background-color: #b36bff; border-radius: 1px; }
.unique  { background-color: #FF00FF; border-radius: 1px; }

/* ========== 등급 폰트 색상 (정확한 던파 컬러) ========== */
.font-item-epic        { color: #FFB400; font-size: 9pt; }
.font-item-legendary,
.font-legend           { color: #FF7800; }
.font-item-unique      { color: #ff00ffd1; }
.font-item-clo,
.font-item-chronicle   { color: #FF6666; font-size: 9pt; }
.font-item-clo-8       { color: #FF6666; font-size: 8pt; }
.font-item-clo-14      { color: #FF6666; font-size: 14pt; }
.font-item-rare        { color: #B36BFF; }
.font-item-uncommon    { color: #68D5ED; }
.font-item-normal      { color: #f1fcff; }
.font-item-normal-search { color: rgb(0, 115, 255); }
.font-item-green,
.font-item-enchant     { color: rgb(65, 199, 130); font-size: 14px; }

/* ========== 텍스트 색상 ========== */
.font-blue     { color: #68D5ED; font-size: 9pt; }
.font-blue-14  { color: #68D5ED; font-size: 14pt; }
.font-purple   { color: #ed26ed; font-size: 9pt; }
.font-epic     { color: #FFB400; font-size: 9pt; }
.font-pink     { color: rgb(237, 67, 123); }
.font-green    { color: rgb(8, 157, 80); }
.font-greens   { color: #9cec9e; font-size: 10pt; }
.font-green-8  { color: #9cec9e; font-size: 8pt; }
.font-green-14 { color: #9cec9e; font-size: 14pt; }
.font-white    { color: #d3d3d3; }
.font-brown    { color: rgb(200, 167, 111); }
.font-brown-10 { color: rgb(200, 169, 116); font-size: 10pt; }
.font-brown-9  { color: rgb(200, 169, 116); font-size: 9pt; }
.font-brown-8  { color: rgb(200, 169, 116); font-size: 8pt; }
.font-brown-14 { color: rgb(200, 169, 116); font-size: 14pt; }
.font-dark-9   { color: #6f6f6f; font-size: 9pt; }
.font-normal   { color: #b1a785; }
.font-fame-bold      { color: #228822; font-weight: bold; font-size: 12pt; }
.font-adventure-bold { color: #228822; font-weight: bold; font-size: 11pt; }

/* ========== 상태 ========== */
.status-green { font-size: 14px; color: rgb(65, 199, 130); }
.status-brown { font-size: 14px; color: rgb(200, 167, 111); }

/* ========== 아이템 디테일 (item-item-*) ========== */
.item-title  { font-size: 13px; text-align: center; vertical-align: middle; }
.item-item-normal    { font-size: 12px; color: #fff; }
.item-item-epic      { font-size: 12px; color: rgb(255, 242, 59); }
.item-item-legendary { font-size: 12px; color: rgb(255, 111, 1); }
.item-item-unique    { font-size: 12px; color: rgb(237, 67, 123); }
.item-item-clo       { font-size: 12px; color: red; }
.item-item-rare      { font-size: 12px; color: rgb(147, 80, 221); }
.item-item-uncommon  { font-size: 12px; color: rgb(0, 255, 254); }
.item-options        { font-size: 10px; color: rgb(217, 5, 216); }
.item-enchant        { color: rgb(65, 199, 130); }
.optionAbilityColor  { color: white; font-size: 11px; }

.buff-title   { font-size: 13px; text-align: center; vertical-align: middle; }
.buff-item-normal   { font-size: 12px; }
.avatar-title { font-size: 13px; text-align: center; vertical-align: middle; }
.avatar-item-normal { font-size: 12px; }
.skill-title  { font-size: 13px; text-align: center; vertical-align: middle; }
.skill-item-normal  { font-size: 12px; }
.skill-time-normal  { font-size: 13px; }

.largeText { font-size: 22px; }
.smallText { font-size: 12px; }

/* 모험단/서버/직업 텍스트 */
.adventure-name { color: #9cec9e; }
.server-name    { color: #deb04c; }
.job-name       { color: #deb04c; }
.items-brown    { color: #c29a43; }

/* ========== 등급 - 새 클래스명 호환 (rarity-*) ========== */
.rarity-에픽,        .rarity-epic        { color: #FFB400; }
.rarity-레전더리,    .rarity-legendary   { color: #ee82ee; }
.rarity-유니크,      .rarity-unique      { color: #b35ee5; }
.rarity-레어,        .rarity-rare        { color: #5dade2; }
.rarity-크로니클,    .rarity-chronicle   { color: #FF6666; }
.rarity-언커먼,      .rarity-uncommon    { color: #94d82d; }
.rarity-커먼,        .rarity-normal      { color: #ffffff; }

/* ========== 테이블 (장비/아이템) ========== */
#customTable { font-size: 11pt; border-collapse: collapse; }
#customTable td { padding: 0; border: 0; }

.table_equip,
.table_equip th,
.table_equip td {
    border: 0 solid rgb(205, 205, 205);
    border-collapse: collapse;
    font-size: 9pt;
}
.table_equip { border-spacing: 1px; }
.table_equip thead { font-size: 10px; background-color: #21212100; }
.table_equip tbody { background-color: #21212100; }

.table_equip_item,
.table_equip_item th,
.table_equip_item td {
    border: 1px solid #545454;
    border-collapse: collapse;
    font-size: 9pt;
}
.table_equip_item { border-spacing: 1px; }
.table_equip_item thead { font-size: 9px; background-color: #21212100; }
.wide-item-name { width: 300px; }

/* ========== 인덱스 명성/뉴스 위젯 ========== */
.left-section, .right-section {
    display: flex;
    flex-direction: column;
    width: 48%;
}
.left-section { margin-left: 6px; }
.left_top { display: flex; }
.div_news, .div_today { display: flex; justify-content: center; }

.fame-table {
    border-collapse: separate;
    border-spacing: 0;
    width: 342px;
    float: left;
    color: #d3d3d3;
}
.fame-table th,
.fame-table td {
    border: 1px solid #3a3a3a;
    font-size: 10pt;
}
.fame-table thead {
    font-size: 12px;
    background-color: rgb(205, 239, 239);
}
.fame-table tbody { background-color: rgba(0, 0, 0, 0); }
.fame-table tbody tr {
    transition: background-color 0.3s ease;
}
.fame-table tbody tr:hover {
    background-color: #c0c0c0;
    cursor: pointer;
}

.mist-table {
    border-collapse: separate;
    border-spacing: 0;
    width: 342px;
    float: left;
}
.mist-table th,
.mist-table td {
    border: 1px solid rgb(205, 205, 205);
    font-size: 10pt;
}
.mist-table thead {
    font-size: 12px;
    background-color: rgb(205, 239, 239);
}
.mist-table tbody { background-color: rgba(224, 255, 171, 0.644); }

.fame_top {
    background-image: linear-gradient(to bottom, #FF4D4D, #FF6B6B 50%, #FF9999);
    align-self: flex-end;
    float: right;
    margin-top: 12px;
    width: 320px; height: 16px;
    text-align: left;
    padding: 3px 3px 3px 6px;
    border: 1px solid rgb(238, 46, 17);
    color: #FFF;
}
.news_top {
    background-image: linear-gradient(to bottom, #4DA6FF, #66B2FF 50%, #99CCFF);
    align-self: flex-end;
    float: right;
    width: 320px; height: 16px;
    text-align: left;
    padding: 3px 3px 3px 6px;
    border: 1px solid rgb(71, 161, 245);
    color: #FFF;
}
.table_news {
    font-size: 11pt;
    padding: 0; margin: 0;
    width: 360px; border: 0;
    background-color: white;
}
.table_news tr:not(.news_header) {
    background-color: white;
    border: 0;
}
.table_news .news_header td {
    background-image: linear-gradient(to bottom, #4DA6FF, #66B2FF 50%, #99CCFF);
    width: 320px; height: 16px;
    text-align: left;
    padding: 3px 3px 3px 6px;
    border: 1px solid rgb(71, 161, 245);
    color: #FFF;
}
.table_news a { color: black; text-decoration: none; }
.table_news tr:nth-child(2) { font-size: 13pt; }
.news_tap { flex-direction: column; margin-bottom: 10px; }

/* 인덱스 최근 등록 캐릭 박스 */
.least_rank {
    border: solid 1px #3a3a3a;
    width: 343px;
    overflow: hidden;
    padding-left: 0;
}
.least_border {
    border: solid 1px #3a3a3a;
    width: 260px;
    overflow: hidden;
}
.least_border h3 {
    border-bottom: 1px dashed #767676;
    padding-bottom: 10px;
    margin: 0 10px;
}
.least_border ul {
    margin-top: 0;
    padding-left: 22px;
    padding-right: 12px;
    font-size: 12px;
}
.least_border li {
    margin-top: 2px;
    margin-bottom: 1px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.least_border_title { margin-bottom: 8px; }
.least_border_title a { color: #333; text-decoration: none; }
.least_border_title a:active,
.least_border_title a:hover { text-decoration: underline; }

.tit {
    font-family: 'Noto Sans KR', sans-serif;
    font-size: 11pt;
    font-weight: bold;
}

.mobile_index_table { width: 320px !important; margin: 0 auto; }
.table-container { margin-bottom: 24px; }

/* ========== Tooltip ========== */
.tooltip-content {
    display: none;
    position: absolute;
    background-color: #000;
    border: 1px solid #555;
    border-radius: 8px;
    padding: 10px 12px;
    z-index: 9999;
    width: 320px;
    max-width: 320px;
    box-sizing: border-box;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.6);
    font-size: 12px;
    line-height: 1.5;
    color: rgb(200, 169, 116);
    left: 38px;
    top: 0;
    word-break: keep-all;
    white-space: normal;
}
.tooltip-mistgear { position: relative; display: inline-block; }
.tooltip-mistgear .tooltiptext {
    visibility: hidden;
    width: 70px;
    background-color: #000;
    color: rgb(237, 67, 123);
    text-align: center;
    padding: 4px 0;
    border-radius: 6px;
    font-size: 8pt;
    position: absolute;
    z-index: 1;
    bottom: 80%;
    left: 50%;
    margin-left: -33px;
}
.tooltip-mistgear:hover .tooltiptext { visibility: visible; }

/* ========== 토글 버튼 ========== */
#raidtoggleButton, #itemtoggleButton {
    padding: 10px 20px;
    background-color: #1E90FF;
    border: 2px solid #fff;
    color: #fff;
    font-size: 10pt;
    cursor: pointer;
    border-radius: 5px;
    transition: background-color 0.3s;
}
#raidtoggleButton:hover, #itemtoggleButton:hover { background-color: #12b8ff; }

#scrollTopBtn {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 99;
    border: 0; outline: none;
    background-color: #333;
    color: #fff;
    cursor: pointer;
    padding: 10px 15px;
    border-radius: 50px;
    font-size: 18px;
    transition: background-color 0.3s;
}
#scrollTopBtn:hover { background-color: #555; }

/* ========== Generic flex utilities ========== */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.justify-between { justify-content: space-between; }
.center { flex: 1; overflow: hidden; z-index: 2; width: 100%; }
.absolute { position: absolute; }
.relative { position: relative; }
.overflow-hidden { overflow: hidden; }
.high-contrast { filter: contrast(125%); }

.w-280px { width: 280px; }
.w-266px { width: 266px; }
.h-170px { height: 170px; }
.w-100\%, .w-full { width: 100%; }
.h-100\%, .h-full { height: 100%; }
.\!mt-0 { margin-top: 0 !important; }
.\!mr-2px { margin-right: 2px !important; }
.\!ml-2px { margin-left: 2px !important; }
.\!mb-2px { margin-bottom: 2px !important; }

.char-info { width: 266px; position: relative; padding: 5px; }

/* ========== Sector / Item lists (timeline 본문) ========== */
.sector {
    max-height: 160px;
    overflow-y: auto;
    padding: 2px 0;
    display: flex;
    flex-wrap: wrap;
    max-width: 264px !important;
    margin-top: 2px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.sector-item {
    min-height: 40px;
    overflow-y: auto;
    padding: 6px 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    max-width: 660px !important;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin: 2px auto 0;
}
.sector_line {
    max-width: 660px !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin: 2px auto 0;
    display: flex;
}
.sector-item-mistgear {
    min-height: 30px;
    overflow-y: auto;
    padding: 3px 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    max-width: 500px !important;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin: 2px auto 0;
}
.sector-item-skill-title,
.sector-item-skills {
    min-height: 30px;
    overflow-y: auto;
    padding: 6px 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    max-width: 660px !important;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin: 2px auto 0;
}
.sector-item-skills { align-items: flex-start; }

/* items-* flex columns (used inside sector-*) */
.items-single,
.items {
    height: 20px;
    display: flex;
    align-items: center;
    padding: 0 3px;
    box-sizing: border-box;
}
.items-single { justify-content: flex-start; min-width: 50%; padding: 0 5px; }
.items { justify-content: space-between; flex-basis: 50%; max-width: 50% !important; }
.items-w100 { height: 20px; display: flex; justify-content: space-between; align-items: center; flex-basis: 100%; max-width: 100% !important; padding: 0 2px; box-sizing: border-box; }
.items-w33  { height: 20px; display: flex; justify-content: space-between; align-items: center; flex-basis: 33%; max-width: 33% !important; padding: 0 2px; box-sizing: border-box; }
.items-w10  { height: 20px; display: flex; justify-content: space-between; align-items: center; flex-basis: 10%; max-width: 10% !important; padding: 0 2px; box-sizing: border-box; }
.items-w70  { display: flex; height: 30px; justify-content: space-between; align-items: center; flex-basis: 70%; max-width: 70% !important; padding: 0 2px; box-sizing: border-box; }
.items-w20  { display: flex; height: 30px; align-items: center; justify-content: center; text-align: center; flex-basis: 30%; max-width: 30% !important; padding: 0 2px; box-sizing: border-box; }
.items-w17  { display: flex; height: 30px; justify-content: space-between; align-items: center; flex-basis: 20%; max-width: 20% !important; padding: 0 2px; box-sizing: border-box; }
.items-w9   { display: flex; height: 30px; justify-content: center; align-items: center; flex-basis: 8%; max-width: 8% !important; padding: 0 2px; box-sizing: border-box; }
.items-w7   { display: flex; height: 30px; justify-content: space-between; align-items: center; flex-basis: 7%; max-width: 7% !important; padding: 0 2px; box-sizing: border-box; }
.items-w2   { display: flex; height: 30px; justify-content: space-between; align-items: center; flex-basis: 1%; max-width: 1% !important; padding: 0 2px; box-sizing: border-box; }
.items-w33-skills { display: flex; align-items: center !important; text-align: center !important; flex-basis: 31%; max-width: 31% !important; padding: 0 2px; }
.items-w33-skills > * { display: flex; justify-content: center; }

.items-image-w3  { display: flex; height: 30px; justify-content: space-between; align-items: center; flex-basis: 4%; max-width: 4% !important; padding: 0 2px; box-sizing: border-box; }
.items-image-w6  { display: flex; height: 30px; justify-content: space-between; align-items: center; flex-basis: 6%; max-width: 6% !important; padding: 0 2px; box-sizing: border-box; }
.items-image-w7  { display: flex; height: 30px; justify-content: center; align-items: center; flex-basis: 7%; max-width: 7% !important; padding: 0 2px; box-sizing: border-box; }
.items-image-w9  { display: flex; height: 30px; justify-content: center; align-items: center; flex-basis: 9%; max-width: 9% !important; padding: 0 2px; box-sizing: border-box; }
.items-image-w13 { display: flex; height: 30px; justify-content: space-between; align-items: center; flex-basis: 18%; max-width: 18% !important; padding: 0 2px; box-sizing: border-box; }
.items-image-w20 { display: flex; height: 30px; justify-content: space-between; align-items: center; flex-basis: 20%; max-width: 20% !important; padding: 0 2px; box-sizing: border-box; }
.items-flag-w6   { display: flex; height: 30px; justify-content: space-between; align-items: center; flex-basis: 5%; max-width: 5% !important; padding: 0 2px; box-sizing: border-box; }

.items-item-name           { display: flex; flex-direction: column; height: auto; justify-content: center; align-items: flex-start; padding: 0 2px; box-sizing: border-box; font-size: 9pt; flex-basis: 27%; max-width: 27% !important; }
.items-item-avatar         { display: flex; flex-direction: column; height: auto; justify-content: center; align-items: flex-start; padding: 0 2px; box-sizing: border-box; font-size: 9pt; flex-basis: 30%; max-width: 30% !important; }
.items-item-name-flag      { display: flex; flex-direction: column; height: auto; justify-content: center; align-items: flex-start; padding: 0 2px; box-sizing: border-box; font-size: 9pt; flex-basis: 32%; max-width: 32% !important; }
.items-item-name-talisman  { display: flex; flex-direction: column; height: auto; justify-content: center; align-items: flex-start; padding: 0 2px; box-sizing: border-box; font-size: 9pt; flex-basis: 32%; max-width: 32% !important; }
.items-item-enchant        { display: flex; flex-direction: column; height: auto; justify-content: center; align-items: flex-start; padding: 0 2px; box-sizing: border-box; font-size: 7pt; flex-basis: 19%; max-width: 19% !important; }
.items-item-enchant-talisman { display: flex; flex-direction: column; height: auto; justify-content: center; align-items: flex-start; padding: 0 2px; box-sizing: border-box; font-size: 7pt; flex-basis: 26%; max-width: 26% !important; }
.items-item-artifact       { display: flex; flex-direction: column; height: auto; justify-content: center; align-items: flex-start; padding: 0 2px; box-sizing: border-box; font-size: 7pt; margin-left: 15px; flex-basis: 17%; max-width: 17% !important; }
.items-item-aurora         { display: flex; flex-direction: column; height: auto; justify-content: center; align-items: flex-start; padding: 0 2px; box-sizing: border-box; font-size: 8pt; margin-left: 9px; flex-basis: 25%; max-width: 25% !important; }

.detail_head {
    background-color: #000000bf;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.right-tables { max-width: 700px; width: 100%; padding-top: 4px; }
.vertical-container { display: flex; flex-direction: column; width: 100%; }

/* ========== 탭 메뉴 (#menus) ========== */
.tab { overflow: hidden; background-color: #f1f1f1; }
.tab button {
    background-color: inherit; float: left; border: 0; outline: 0;
    cursor: pointer; padding: 14px 16px; transition: 0.3s; font-size: 17px;
}
#menus { margin: 0; padding: 0; }
#menus li {
    display: inline-block;
    border: 1px solid #3a3a3a;
    border-bottom: 0;
    background-color: #3a3a3a;
    border-top-left-radius: 7px;
    border-top-right-radius: 7px;
}
#menus li a {
    padding: 4px 16px;
    display: block;
    color: #c29a43;
    font-size: 10pt;
}
#menus li.selecion {
    background-color: #5a5a5a;
    position: relative;
    top: 1px;
    font-weight: bold;
    font-size: 10pt;
}
#menus li.selecion a { padding: 5px 17px; }
#menus li.selecion::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: #00ffe1;
}
.conteudo {
    display: none;
    padding: 10px;
    border: 1px solid #3a3a3a;
}
.conteudo.visivel { display: block; }

/* ========== 트레잇 아이콘 (사용처 그대로) ========== */
[class*="trait_"][class*="_checked_"] {
    width: 49px; height: 49px;
    background-repeat: no-repeat;
}
.trait_selected { width: 100%; height: 100%; z-index: 5; background-image: url(/image/trait/trait_selected.png); }

/* ========== 검색 결과 그리드 (새 char-grid도 호환) ========== */
.char-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 10px;
    padding: 6px;
}
.char-card {
    display: flex;
    align-items: center;
    width: 230px;
    border: 1px solid #3a3a3a;
    background-color: #21212100;
    color: #d3d3d3;
    font-size: 10pt;
    line-height: 14px;
    padding: 6px;
    cursor: pointer;
    transition: transform 0.1s, border-color 0.12s;
}
.char-card:hover { border-color: #00ffe1; }
.char-card:active { transform: scale(0.97); }
.char-card img { width: 90px; transform: scale(1.1); margin-right: 8px; }
.char-card__name { font-weight: bold; color: #68D5ED; }
.char-card__meta { color: rgb(200, 169, 116); font-size: 9pt; }
.char-card__server { color: #9cec9e; font-size: 9pt; margin-top: 2px; }

.search-result-header {
    display: flex;
    align-items: baseline;
    gap: 10px;
    padding: 6px 10px;
    color: rgb(200, 169, 116);
}
.search-result-header h2 { margin: 0; font-size: 13pt; color: #d3d3d3; }
.search-result-header .count { color: #9cec9e; font-size: 10pt; }

.placeholder {
    color: rgb(200, 169, 116);
    font-style: italic;
    font-size: 10pt;
    text-align: center;
    padding: 16px;
    border: 1px dashed #3a3a3a;
    margin: 10px;
}

/* ========== Info-box (홈 페이지) ========== */
.info-box {
    border: 1px solid #3a3a3a;
    padding: 12px;
    background-color: #21212100;
}
.info-box ul { list-style: none; padding: 0; margin: 0; }
.info-box li {
    padding: 3px 0;
    color: #68D5ED;
    font-size: 10pt;
    display: flex;
    gap: 8px;
}
.info-box li::before { content: '◈'; color: #fabe00; flex-shrink: 0; }
.info-box .tag-list {
    margin-top: 10px;
    padding: 8px;
    background-color: #393939;
    color: rgb(200, 169, 116);
    font-size: 9pt;
    line-height: 1.6;
}

/* ========== 광고 ========== */
.ad-slot { margin: 16px auto; text-align: center; max-width: 760px; }

/* ========== 카드 (대시보드 / 일반) — 압축 ERP 스타일 ========== */
.card {
    background-color: #21212100;
    border: 1px solid #3a3a3a;
    border-radius: 3px;
    padding: 8px;
    margin: 0;
}
.card__title {
    margin: 0 0 6px;
    font-size: 10pt;
    color: #fabe00;
    border-bottom: 1px solid #3a3a3a;
    padding-bottom: 4px;
    font-weight: 600;
    letter-spacing: 0.4px;
}

.grid { display: grid; gap: 8px; }
.grid--cards { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid--3     { grid-template-columns: repeat(3, 1fr); }
.grid--2     { grid-template-columns: repeat(2, 1fr); }
.stack > * + * { margin-top: 8px; }

.dash-main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 10px;
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 12px;
}
.hero { text-align: center; }
.hero img { width: 100%; max-width: 240px; margin: 0 auto 8px; }
.hero__name { font-size: 16pt; font-weight: bold; color: #d3d3d3; }
.hero__meta { color: rgb(200, 169, 116); font-size: 9pt; margin-bottom: 8px; }
.hero__badges { display: flex; flex-wrap: wrap; gap: 4px; justify-content: center; }

.badge {
    display: inline-block;
    background-color: #2a2a2a;
    border: 1px solid #3a3a3a;
    color: #d3d3d3;
    padding: 2px 8px;
    font-size: 9pt;
    border-radius: 999px;
}
.badge--accent {
    color: #fabe00;
    border-color: #fabe00;
    background-color: rgba(250, 190, 0, 0.1);
}

.tag {
    display: inline-block;
    background-color: #2a2a2a;
    border: 1px solid #3a3a3a;
    padding: 2px 6px;
    font-size: 9pt;
    color: rgb(200, 169, 116);
    border-radius: 2px;
}

.stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2px 12px; }
.stat-row {
    display: flex;
    justify-content: space-between;
    padding: 2px 0;
    border-bottom: 1px dashed #2a2a2a;
    font-size: 9pt;
}
.stat-row .k { color: rgb(200, 169, 116); }
.stat-row .v { color: #d3d3d3; }

.equip-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.equip-slot {
    background-color: #21212100;
    border: 1px solid #2a2a2a;
    border-radius: 2px;
    padding: 4px;
    text-align: center;
    font-size: 8pt;
    min-height: 70px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}
.equip-slot img { width: 32px; height: 32px; }
.equip-slot__empty { color: rgb(200, 169, 116); padding: 14px 0; }

.list-row {
    display: flex; align-items: center; gap: 6px;
    padding: 3px 0;
    border-bottom: 1px dashed #2a2a2a;
    font-size: 9pt;
}
.list-row:last-child { border-bottom: 0; }
.list-row img { width: 24px; height: 24px; }

.btn {
    display: inline-flex;
    align-items: center; justify-content: center;
    background-color: #1E90FF;
    color: #fff;
    border: 1px solid #265bb2;
    border-radius: 2px;
    padding: 4px 12px;
    font-size: 9pt;
    cursor: pointer;
}
.btn:hover { background-color: #12b8ff; }
.btn--ghost {
    background-color: #2a2a2a;
    border: 1px solid #3a3a3a;
    color: #d3d3d3;
}
.btn--ghost:hover { background-color: #333; }

/* ========== 유틸 ========== */
.u-text-dim    { color: rgb(200, 169, 116); }
.u-text-accent { color: #fabe00; }
.u-text-center { text-align: center; }
.u-mt-0 { margin-top: 0; }
.u-mt-1 { margin-top: 6px; }
.u-mt-2 { margin-top: 10px; }
.u-mt-3 { margin-top: 16px; }

/* ========== 반응형 ========== */
@media (max-width: 900px) {
    .dash-main { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
    .app-header__inner { width: 100%; padding: 8px 10px; gap: 6px; }
    .search-form { gap: 4px; flex: 1 1 auto; min-width: 0; }
    .search-form select { padding: 6px 4px; height: 30px; font-size: 9pt; }
    .search-form input[type="text"] { width: auto; flex: 1 1 0; min-width: 0; height: 30px; }
    .search-form button,
    .search-form input[type="submit"] {
        width: auto;
        min-width: 48px;
        height: 30px;
        padding: 0 10px;
        margin-left: 2px;
    }
    .app-nav__inner { width: 100%; overflow-x: auto; }
    .app-logo { margin-right: 6px; }
    .app-logo img { height: 28px; }
    .characterBox { font-size: 10px; width: 100%; }
    .char-card { width: calc(50% - 10px); }

    /* 장비 row 모바일/태블릿 비율 재조정 (enchant 텍스트 overflow 방지) */
    .sector-item { max-width: 100% !important; padding: 6px 2px; }
    .items-item-name,
    .items-item-name-flag,
    .items-item-name-talisman { flex-basis: 32% !important; max-width: 32% !important; font-size: 8pt; }
    .items-item-enchant,
    .items-item-enchant-talisman {
        flex-basis: 38% !important;
        max-width: 38% !important;
        font-size: 6.5pt;
        word-break: break-word;
        overflow-wrap: anywhere;
        line-height: 1.25;
    }
    .items-item-avatar { flex-basis: 35% !important; max-width: 35% !important; }
    .items-item-artifact { flex-basis: 22% !important; max-width: 22% !important; margin-left: 4px; }
    .items-item-aurora { flex-basis: 30% !important; max-width: 30% !important; margin-left: 4px; }
}
@media (max-width: 600px) {
    .container, .box { max-width: 92%; width: 100%; }
    .character img { width: 85px; transform: scale(0.8); }
    .char-card { width: 100%; }
    .search_charactername { font-size: 11pt !important; }
    .equip-grid { grid-template-columns: repeat(3, 1fr); }

    /* 더 좁은 모바일 — name 더 줄이고 enchant 더 늘림 */
    .items-item-name,
    .items-item-name-flag,
    .items-item-name-talisman { flex-basis: 30% !important; max-width: 30% !important; font-size: 7.5pt; }
    .items-item-enchant,
    .items-item-enchant-talisman {
        flex-basis: 42% !important;
        max-width: 42% !important;
        font-size: 6pt;
    }
}
