body {
    display: flex;
    justify-content: space-between;
    padding: 20px;
    /*max-width: 1600px;*/
    margin: auto;
    height: 96vh;
    overflow: hidden;
    position: relative;
}
body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('/assets/images/prism/main.webp');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-repeat: no-repeat;
    opacity: 0.2;
    z-index: -1;
}
a {color:#666; text-decoration:none;}
ul, li {
    -webkit-tap-highlight-color: transparent;
}

.main-container {
    display: flex;
    flex-direction: column; /* 요소들을 세로로 배치 */
    align-items: center; /* 가운데 정렬 (필요 시 제거 가능) */
    width: 100%;
    position: relative;
}
.flex-container {
    display: flex;
    justify-content: space-between; /* 48% 박스들을 좌우 정렬 */
    gap: 4%; /* 48% + 48% = 96%, 여백 4% */
    width: 100%;
}

.chapter-container {
    width: 48%;
    border: 1px solid #ccc;
    padding: 10px;
    border-radius: 5px;
    height: 75vh;
    display: flex;
    flex-direction: column;
    position: relative;
}
.chapter-container h3 {
    position: sticky;
    top: 0;
    margin: 0;
    padding: 10px;
    border-bottom: 1px solid #ccc;
    z-index: 10;
}
.chapter-list {
    list-style: none;
    padding: 0;
    margin: 0;
    margin-bottom: 10px;
    overflow-y: auto;
    flex-grow: 1;
}
.chapter {
    cursor: pointer;
    padding: 10px;
    border-bottom: 1px solid #ddd;
    user-select: none;
}

.character-container {
    width: 48%;
    border: 1px solid #ccc;
    padding: 10px;
    border-radius: 5px;
    height: 75vh;
    display: flex;
    flex-direction: column;
    position: relative;
}
.character-container h3 {
    position: sticky;
    top: 0;
    padding: 10px;
    margin: 0;
    z-index: 1;
    border-bottom: 2px solid #ccc;
}
.character-list-wrapper {
    /*height: calc(90vh - 40px);*/
    overflow-y: auto;
}
.character-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 3px;
    flex-wrap: nowrap;
    padding: 0px 0;
}
.character {
    max-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    user-select: none;
    padding: 0;
}
.character img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
}
@media (max-width: 768px) {
    .character {
        height: 50px;
        border:1px solid;
    }
}
@media (min-width: 768px) {
    .chapter-container, .character-container {
        height: 85vh;    
    }
}

.sub-chapter-list, .chat-list {
    display: none;
    padding-left: 0px;
    overflow-y: auto;
    font-weight:bold;
    list-style-type: none;
    margin-top: 10px;
}        
.sub-chapter {
    cursor: pointer;
    padding: 10px 15px;
    background-color: #e9f4d3;
    border-top: 1px solid #ddd;
    border-bottom: 1px solid #ddd;
    font-size: 16px;
    font-weight: bold;
    transition: background-color 0.3s;
}
/*.sub-chapter:hover, .sub-chapter:focus {
    background-color: #BDC2BD;
}*/
.sub-chapter .chat {
    display: block;
    margin-top: 0px;
    font-size: 12px;
    color: #888;
  }
.sub-content {
    display: none;
    padding: 10px;
    background-color: #fff;
    border-top: 1px solid #ccc;
    font-size: 14px;
    color: #333;
    border-radius: 0 0 5px 5px;
}
.sub-content .choice {
    text-decoration: underline;
    cursor: pointer;
}
.reward {
    padding: 0 0 5px;
    border-bottom: 1px solid #bbb;
    margin-top: 10px;
    font-weight: normal;
    line-height: 1.6;
}
.reward img {
    width: 100%;
    height: 100%;
}
.pl10 {padding-left: 10px}
.pl15 {padding-left: 15px}
.pl20 {padding-left: 20px}
.pl30 {padding-left: 30px}
.pl40 {padding-left: 40px}
.pl45 {padding-left: 45px}
.pl60 {padding-left: 60px}

.device-container {
    display: none;
    /*display: flex;*/
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    height: calc(60% - 30px);
    margin-top: 30px;
    color: #666;
    /* 모바일 뷰 개편 이후 추가*/
    z-index:999;
    position: fixed;
    padding: 0 20px;
    top: 0;
}
.device-container img {
    width: 100%;
    max-width: 400px;
}
.device-container .msg {
    margin-top: 15px;
    font-style: italic;
    font-weight: bold;
    font-size: 20px;
    text-align: left;
    width: 100%;
    display: inline-block;
}

nav {
    width: 100%;
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
}
nav .left {
    text-align: left;
}
nav .right {
    text-align: right;
    font-size: 14px;
}
#current_lang {
    display: none;
    width: 100px;
    padding: 5px 0 5px 5px;
}
@media (min-width: 768px) {
    #current_lang {display: inline-block}
}


/*@media (max-width: 480px) {
    .flex-container, .chapter-container, .character-container, .nav {display: none;}
    .device-container {display: flex;}
}*/
.chapter-container > label, .character-container > label {
    display:none;
    position:absolute;
    right:15px;
    top:15px;
    z-index:99;
    width: fit-content;
    color:#dc4975;
    font-weight:600;
    background: url(/assets/images/prism/order-btn.png) center center / 100% 100% no-repeat;
    box-shadow: 0 0 3px rgba(0, 0, 0, .7);
    border-radius: 10px;
    padding: 3px 10px;
}
@media (max-width: 480px) {
    .character-container {display:none}
    .chapter-container, .character-container {width:96%}
    .chapter-container > label, .character-container > label {display:block}
}

.love_up {
    font-weight: bold;
    color: #ff7047;
}
.love_down {
    font-weight: bold;
    color: #34b1e4;
}
.love_ap {
    font-weight: bold;
    color: green;
}

.noselect {
    user-select: none;
    -webkit-user-select: none;
    -ms-user-select: none;
}

.copyright {
    position:absolute;
    bottom:8vh;
    left:0px;
    width:100%;
    text-align:center;
}

@media (min-width: 768px) {
    .copyright {
        bottom: 0vh;
    }
}