@font-face {
    font-family: 'FOT-sans-serif';
    src: url('../fonts/FOT-DNPShueiGoGinStd-B.ttf') format('truetype');
    font-display: swap;
    font-weight: normal;
    font-style: normal;
}
@font-face {
    font-family: 'FOT-serif';
    src: url('../fonts/FOT-TELOPMINPRON-B.otf') format('truetype');
    font-display: swap;
    font-weight: normal;
    font-style: normal;
}
.html, body {
    font-family: 'FOT-sans-serif', sans-serif;
}
.tab-container {
    transform: translateY(-55%);
    display: flex;
    justify-content: center;
    border: 10px solid rgba(128, 0, 0, 0);
    z-index: 10;
    display: flex;
    margin-bottom: 10px;
}

.tab-button {
    width: 50%;
    height: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: 'FOT-serif', serif;
    font-size: 1.4rem;
    letter-spacing: 0.2em;
    color: #181002;
    font-weight: bold;
    cursor: pointer;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    border-image-source: url('../assets/Material/Tab01OFF.webp');
    border-image-slice: 0 fill;
    transition: background-image 0.2s;
}

.tab-button.active {
    border-image-source: url('../assets/Material/Tab01ON.webp');
    border-image-slice: 0 fill;
}

.tab-content {
    display: none !important;
}

.tab-content.active {
    align-items: center;
    width: 100%;
    justify-content: center;
    display: flex !important;
    flex-direction: column;
}
.character-container {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: flex-start;
    margin-top: 20px;
}
.character-text {
    writing-mode: vertical-rl;
    text-orientation: mixed;
    white-space: pre-wrap;
    font-size: 1.5rem;
    font-weight: bold;
    color: #ffffff;
    letter-spacing: 0.3em;position: absolute;
    top: 20px;
    right: 20px;
    z-index: 10; 
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 1); 
}
.character-image {
    flex: 0 0 auto;
    min-width: 250px;
    max-width: 400px;
    overflow: hidden;
    position: relative;
}

.character-image img {
    width: 600px;
    height: auto;
    display: block;
    margin-left: -25%;
    position: relative;
    z-index: 1;
}

.character-image::before {
    content: "";
    position: absolute;
    top: -45px;
    bottom: 0;
    left: -7%;
    width: 114%;
    height: 116%;
    z-index: 0;
    border-style: solid;
    border-width: 0px;
    border-image-source: url('../assets/Material/PackComent.webp');
    border-image-slice: 0 fill;
    border-image-repeat: stretch;
    pointer-events: none;
}

.character-info {
    position: absolute;
    width: 100%;
    flex: 1;
    min-width: 300px;
}
.section .level-effect {
    margin-bottom: 18px;
}

.section .level-effect:last-child {
    margin-bottom: 0;
}

.character-detail {
    display: flex;
    justify-content: center;
    position: relative;
    min-width: 525px;
    width: 140%;
    height: 590px;
    transform: translateY(6.5%);
    border: none;
}

.character-detail::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -2;
    border-style: solid;
    border-width: 20px;
    border-image-source: url('../assets/Material/PackComent.webp');
    border-image-slice: 20 fill;
    border-image-repeat: stretch;
    transform: translateZ(0);
    pointer-events: none;
}

.character-detail-chara {
    display: flex;
    justify-content: center;
}
.character-detail-status {
    display: flex;
    justify-content: center;
}
.character-detail-status-value {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 90%;
    border-bottom:1px solid var(--color-selected-text);
}
.character-detail-profile {
    display: flex;
    justify-content: center;
}

.skill-list{
    position: absolute;
    bottom: 0;
    display:grid;
    grid-template-columns:repeat(4, 96px);
    gap:18px;
    top: 220px;
    height: 100px;
}
.character-profilecomment {
    color: #100a00;
    font-size: 1.7rem;
    line-height: 1.6;
    width: 85%;
    height: 90%;
    overflow-y: auto;
    margin: 10px 50px 10px 50px;
}
.character-profilecommentbackground {
    display: flex;
    justify-content: center;
    position: absolute;
    width: 95%;
    height: 35%;
    border: none;
    top: 60%;
}
.character-profilecommentbackground::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(
        to right,
        transparent 0%,
        #ffffff 10%,
        #ffffff 90%,
        transparent 100%
    );
}
.profile-border-container {
    display: flex;
    position: relative;
    justify-content: space-between;
    width: 45%;
}
.profile-border-wrapper {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 90%;
}
.border-text {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    position: absolute;
}
.border-text::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(
        to right,
        transparent 0%,
        #100a00 10%,
        #100a00 90%,
        transparent 100%
    );
    z-index: 1;
    pointer-events: none;
}
.border-text-label,
.border-text-value {
    color: #100a00;
    white-space: nowrap;
    font-size: 1.5rem;
    z-index: 2;
    padding: 0 8px;
    margin: 3px 10px;
}
.character-icon{
    position: absolute;
    left: 5%;
    top: 6%;
    overflow:hidden;
    height: 128px;
    width: 90%;
    top: 18px;
}
.character-icon img{
    width: 128px;
    height: 128px;
    object-fit: cover;
}
.character-cover{
    display: flex;
    justify-content: center;
    position: absolute;
    width: 95%;
    height: 28%;
    transform: translateY(6.5%);
    border: none;
    top: 10px;
}
.character-cover::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    border-style: solid;
    border-width: 20px;
    border-image-source: url('../assets/Material/MissionBackground.webp');
    border-image-slice: 20 fill;
    border-image-repeat: stretch;
    transform: translateZ(0);
    pointer-events: none;
    filter: brightness(1.15);
}
.character-name{
    color: #100a00;
    position: absolute;
    left: 180px;
    top: 17%;
    white-space: nowrap;
    font-size: 2rem;
}
.character-job{
    position: absolute;
    left: 140px;
    top: 9%;
    white-space: nowrap;
    font-size: 3rem;
}
.character-job img{
    width: 32px;
    height: 32px;
    object-fit: cover;
}
.gacha{
    display: flex;
    justify-content: center;
    position: absolute;
    z-index: 1;
    top: 3px;
    left: 3%;
}
.gift{
    display: flex;
    justify-content: center;
    position: absolute;
    z-index: 1;
    top: 63px;
    left: 3%;
}
.memory{
    display: flex;
    justify-content: center;
    position: absolute;
    z-index: 1;
    top: 123px;
    left: 3%;
}
.voice{
    display: flex;
    justify-content: center;
    position: absolute;
    z-index: 1;
    top: 183px;
    left: 3%;
}
.monologue{
    display: flex;
    justify-content: center;
    position: absolute;
    z-index: 1;
    top: 243px;
    left: 3%;
}
.arcana{
    display: flex;
    justify-content: center;
    position: absolute;
    z-index: 1;
    top: 303px;
    left: 3%;
}
.equipment{
    display: flex;
    justify-content: center;
    position: absolute;
    z-index: 1;
    top: 363px;
    left: 3%;
}
.gacha img,
.gift img,
.arcana img,
.memory img,
.voice img,
.monologue img,
.equipment img{
    width: 50px !important;
    height: 50px !important;
}
.gacha-text,
.gift-text,
.arcana-text,
.memory-text,
.voice-text,
.monologue-text,
.equipment-text{
    position: absolute;
    top: 40px;
    white-space: nowrap;
    color: white;
    font-size: 0.8rem;
    text-shadow: 0 0 2px #000, 0 0 2px #000, 1px 1px 2px #000;
}
.skill-cooltime{
    position:absolute;
    left: 50%;
    top: 20px;
}
.skill-cooltime span{
    color: #d2d2d2;
}
.skill-cooltime img{
    position: absolute;
    width:32px;
    height:32px;
    top: -50%;
    left: -50%;
    object-fit:cover;
}
.skill-icon{
    width:96px;
    height:96px;
    border-radius:10px;
    position:relative;
    cursor:pointer;
    transition:.15s;
}

.skill-icon img{
    width:100%;
    height:100%;
    object-fit:cover;
    margin: 20px;
    transform: translate(-20px, -20px);
}
.skill-icon.selected img {
    border-image-source: url('../assets/Material/SkillCursor.webp');
    border-image-slice: 25 fill;
    border-image-repeat: stretch;
}
.skill-icon:hover{
    transform:scale(1.05);
}

.skill-level{
    position:absolute;
    left:0;
    right:0;
    bottom:0;
    text-align:center;
    color:white;
    font-size:22px;
    font-weight:bold;
    padding-bottom:4px;
    background:linear-gradient(
            180deg,
            transparent,
            rgba(0,0,0,0.92)
        );
    text-shadow:0 0 4px black;
}
img:invalid,
img:not([src]),
img[src=""] {
    opacity: 0; 
}
.overlay{
    position:fixed;
    inset:0;
    background:rgba(0,0,0,0.45);
    display:flex;
    justify-content:center;
    align-items:center;
    opacity:0;
    pointer-events:none;
    transition:.15s;
}

.overlay.active{
    z-index: 100;
    opacity:1;
    pointer-events:auto;
}

.popup{
    width:min(92vw,820px);
    background:rgba(28,28,28,0.76);
    backdrop-filter:blur(4px);
    border:1px solid rgba(255,255,255,0.14);
    box-shadow:0 20px 60px rgba(0,0,0,0.55);
    overflow:hidden;
    position:relative;
}

.popup-header{
    display:flex;
    align-items:flex-start;
    gap:18px;
    padding:20px 24px 16px;
    border-bottom:1px solid rgba(255,255,255,0.12);
}

.popup-icon{
    width:82px;
    height:82px;
    border-radius:10px;
    overflow:hidden;
    border:1px solid rgba(255,255,255,0.14);
    flex-shrink:0;
}

.popup-icon img{
    width:100%;
    height:100%;
    object-fit:cover;
}

.popup-title-area{
    flex:1;
}

.skill-type{
    font-size:18px;
    font-weight:bold;
    color:#d2d2d2;
    margin-bottom:10px;
}

.skill-name{
    font-size:2.5rem;
    line-height:1;
    font-weight:bold;
    color:white;
}

.popup-body{
    padding:20px 24px 28px;
    color:white;
    font-size:24px;
    line-height:1.8;
    font-weight:bold;
}

.section{
    margin-top:1px;
}

.section-title{
    font-size: 1.9rem;
}

.close{
    display: flex;
    position:absolute;
    align-items: center;
    justify-content: center;
    top:25px;
    right:25px;
    width:40px;
    height:40px;
    border:none;
    background:rgba(255,255,255,0);
    cursor:pointer;
}
.close img{
    width:180%;
    height:180%;
    object-fit:cover;
}

@media screen and (max-width: 1024px) and (pointer: coarse) {
    .character-profilecomment {
        font-size: 1.1rem;
    }
}