/* --- [1. 폰트 정의] --- */

/* 타이틀용: StrongArmy (ROKA) */
@font-face {
    font-family: 'StrongArmy';
    src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/noonfonts_2104@1.1/ROKAMedium.woff') format('woff');
    font-weight: 500;
    font-display: swap;
}

@font-face {
    font-family: 'StrongArmy';
    src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/noonfonts_2104@1.1/ROKABold.woff') format('woff');
    font-weight: 700;
    font-display: swap;
}

/* 본문용: Pretendard */
@import url("https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/static/pretendard.min.css");


/* --- [2. 기본 변수 및 설정] --- */
:root {
    --bg-color: #fff0f5;       /* 전체 배경색 */
    --accent-color: #d14d4d;   /* 제목 색상 */
    --pill-color: #eac6d1;     /* 라벨(알약) 배경색 */
    --text-main: #444;         /* 본문 글자색 */
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    /* 기본 폰트를 프리텐다드로 설정 */
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, Roboto, sans-serif;
    background-color: #333; 
    color: var(--text-main);
    height: 100vh;
    overflow: hidden;
}

/* 입력창 폰트도 프리텐다드로 통일 */
input, textarea, select, button {
    font-family: 'Pretendard', sans-serif;
}

.app-container {
    display: flex;
    height: 100vh;
}

/* [왼쪽] 컨트롤 패널 */
.controls {
    width: 360px;
    background: white;
    padding: 20px;
    overflow-y: auto;
    border-right: 1px solid #ccc;
    display: flex;
    flex-direction: column;
    gap: 15px;
}
.controls h2 { margin-bottom: 10px; font-size: 1.2rem; }
.controls h3 { margin-top: 10px; margin-bottom: 5px; font-size: 0.95rem; color: #666; }
.controls input[type="text"], 
.controls textarea, 
.controls select {
    width: 100%; padding: 6px; border: 1px solid #ddd; border-radius: 4px; margin-bottom: 5px;
}
.controls textarea { height: 50px; resize: none; }
.color-row, .select-row { display: flex; gap: 10px; margin-bottom: 5px; }
.sub-label { font-size: 0.8rem; color: #888; margin-bottom: 2px; }
.file-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 2px; }
.file-fav { width: 100%; font-size: 0px; } 
details { background: #f9f9f9; padding: 5px; border-radius: 5px; margin-bottom: 5px; border: 1px solid #eee; }
summary { cursor: pointer; font-size: 0.9rem; font-weight: bold; }
.checkbox-area { margin-top: 5px; display: flex; flex-wrap: wrap; gap: 5px; }
.checkbox-area label { font-size: 0.8rem; display: flex; align-items: center; gap: 3px; background: white; padding: 2px 5px; border: 1px solid #eee; border-radius: 3px; }

.save-btn {
    margin-top: auto; padding: 15px; background: #007bff; color: white;
    border: none; border-radius: 5px; font-size: 1.1rem; font-weight: bold; cursor: pointer;
}
.save-btn:hover { background: #0056b3; }


/* [오른쪽] 미리보기 영역 */
.preview-area {
    flex: 1;
    background: #555;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow: auto;
}

/* ★ 시트 디자인 */
.sheet {
    width: 1400px;  
    height: 800px;  
    background-color: var(--bg-color);
    padding: 30px 40px;
    box-shadow: 0 0 30px rgba(0,0,0,0.5);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    transform-origin: center center;
}

/* 헤더 */
.header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 10px;
    border-bottom: 2px solid white;
    padding-bottom: 5px;
}
.title {
    /* 타이틀 폰트 적용 */
    font-family: 'StrongArmy', serif;
    color: var(--accent-color);
    font-size: 4.2rem; /* 폰트가 조금 작아서 키움 */
    font-weight: 700;
    line-height: 1;
    letter-spacing: -1px;
}
.credits {
    text-align: right;
    font-size: 0.8rem;
    color: #666;
    line-height: 1.4;
    font-family: 'Pretendard', sans-serif;
}

/* 본문 레이아웃 */
.sheet-body {
    display: flex;
    gap: 25px;
    height: 100%;
}

/* --- [왼쪽 컬럼] --- */
.col-left {
    width: 320px;
    display: flex;
    flex-direction: column;
}

.persona-wrapper {
    margin-bottom: 15px;
}
/* --- 큰 라벨 (Persona, 정실캐 등) 수정 --- */
/* 혹시 이것도 길이에 맞추고 싶으실 것 같아 같이 수정해드립니다 */
.pink-label {
    font-family: 'StrongArmy', sans-serif;
    display: inline-block;
    background-color: var(--pill-color);
    padding: 5px 18px;
    border-radius: 12px;
    font-weight: 500;
    font-size: 1.3rem;
    margin-bottom: 8px;
    color: #333;
    line-height: 1.2;
    
    /* [수정된 부분] */
    width: fit-content; /* 텍스트 길이에 딱 맞게 */
}
.persona-box {
    width: 100%;
    aspect-ratio: 1/1; 
    background: white;
    border-radius: 2px;
    overflow: hidden;
}
.persona-box img { width: 100%; height: 100%; object-fit: cover; }

.info-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.info-item {
    display: flex;
    align-items: center; 
    gap: 10px;
}
/* --- 소제목 (작은 알약) 수정 --- */
.pink-pill {
    font-family: 'StrongArmy', sans-serif;
    background-color: var(--pill-color);
    padding: 4px 12px;     /* 내부 여백 */
    border-radius: 12px;
    font-size: 1.25rem;
    font-weight: 500;
    color: #333;
    white-space: nowrap;
    
    /* [수정된 부분] */
    /* min-width: 90px;  <-- 이 줄을 삭제함 (고정 너비 해제) */
    /* text-align: center; <-- 이 줄을 삭제함 (가운데 정렬 해제) */
    width: fit-content;  /* 텍스트 길이에 딱 맞게 배경 크기 조절 */
    
    line-height: 1.1;
    padding-top: 6px;
    flex-shrink: 0;      /*공간이 부족해도 찌그러지지 않게 함 */
}
.info-val {
    /* 내용 폰트 적용 (프리텐다드) */
    font-family: 'Pretendard', sans-serif;
    font-size: 1.1rem;
    color: #444;
    padding-top: 2px;
    word-break: break-all;
    line-height: 1.4;
    font-weight: 600;
}
.info-val.small { font-size: 0.95rem; }

/* --- [오른쪽 컬럼] --- */
.col-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* 정실캐 섹션 수정 (상단 정렬 맞춤) */
.fav-row {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    
    /* [수정된 부분] */
    gap: 0; /* 10px -> 0으로 변경 (라벨 자체의 여백과 겹쳐서 넓어지는 현상 해결) */
}

.fav-slots {
    display: flex;
    gap: 10px;
    width: 100%;
}

.slot {
    flex: 1;
    aspect-ratio: 1/1; 
    background: white;
    border-radius: 2px;
    overflow: hidden;
}
.slot img { width: 100%; height: 100%; object-fit: cover; }

/* 중간 그리드 */
.middle-grid {
    display: grid;
    grid-template-columns: 1.1fr 1fr; 
    gap: 20px;
    flex: 1;
}

.mid-col-1, .mid-col-2 {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.text-group {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}
.text-content {
    /* 내용 폰트 적용 (프리텐다드) */
    font-family: 'Pretendard', sans-serif;
    flex: 1;
    font-size: 1.05rem;
    line-height: 1.6;
    word-break: keep-all; 
    font-weight: 500;
    padding-top: 3px; /* 라벨과 높이 맞춤 */
}
.text-content span {
    display: inline-block;
    margin-right: 8px;
}

/* 하단 태그 */
.bottom-tags {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    min-height: 120px; 
}
.tag-cloud {
    /* 태그 내용 폰트 (프리텐다드) */
    font-family: 'Pretendard', sans-serif;
    flex: 1;
    font-size: 1rem;
    line-height: 1.8;
    color: #555;
    padding-top: 3px;
    font-weight: 400;
}
.tag-cloud span { margin-right: 6px; }

/* --- [새로 추가된 입력창 스타일] --- */
.custom-add-box {
    display: flex;
    gap: 5px;
    padding: 8px 5px;
    margin-bottom: 5px;
    border-bottom: 1px dashed #ddd;
    background: #fff;
}

.custom-add-box input {
    flex: 1; 
    margin-bottom: 0 !important; 
    font-size: 0.9rem;
}

.add-btn-small {
    padding: 0 15px;
    background-color: #666;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    font-size: 1.2rem;
    line-height: 1;
}

.add-btn-small:hover {
    background-color: #444;
}



