body {
  font-family: Arial;
  background:#f0f0f0;
  padding:20px;
}

/* 박스 */
.box {
  background:#fff;
  padding:15px;
  margin-bottom:15px;
  border-radius:10px;
}

/* 버튼 */
button {
  padding:12px;
  background:#044287;
  color:#fff;
  border:none;
  border-radius:1px;
  cursor:pointer;
  font-size:14px;
}

/* 입력 */
textarea {
  width:100%;
  height:200px;
  font-size:13px;
}

input, select {
  width:100%;
  padding:6px;
  margin-bottom:6px;
}

/* 체크박스 라인 */
label {
  display: inline-flex;
  align-items: center;
  margin-right: 12px;
  cursor: pointer;
}

input[type="checkbox"] {
  margin-right: 4px;
}

/* 캐릭터 */
.char-wrap {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.char-wrap label {
  display: flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}

/* 상단 바 */
.top-bar {
  display: flex;
  gap: 12px;
  align-items: flex-end;
}

.field {
  display: flex;
  flex-direction: column;
  min-width: 120px;
}

.field input,
.field select {
  width: 100%;
}

/* 텍스트 넓이 */
.field:nth-child(2),
.field:nth-child(3),
.field:nth-child(4){
  flex: 2;
}

/* 의상 */
.outfit-wrap {
  display: flex;
  gap: 12px;
}

.outfit-wrap .field {
  flex: 1;
}

/* 씬 탭 */
.scene-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
}

.scene-tabs button {
  padding: 8px 12px;
  border: none;
  background: #ddd;
  cursor: pointer;
  border-radius: 6px;
}

.scene-tabs button.active {
  background: #000;
  color: #fff;
}

.scene-box {
  background: #fff;
  padding: 15px;
  border-radius: 10px;
}

.scene-wrap {
  display: flex;
  gap: 12px;
  width: 100%;
}

.scene-col {
  flex: 1;              /* 👉 균등 분배 핵심 */
  min-width: 0;         /* 👉 넘침 방지 */
  background: #fff;
  padding: 10px;
  border-radius: 10px;
}

.container {
  max-width: 1200px;
  margin: 0 auto;   /* 가운데 정렬 */
}

.char-line {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: auto !important;
}

.char-line input {
  margin: 0;
}

.char-line span {
  white-space: nowrap;
}

#result {
  width: 100%;
  min-height: 300px;
  height: 90vh;
  font-size: 14px;
  font-family: monospace;
  line-height: 1.5;
  padding: 10px;
  resize: vertical;
  box-sizing: border-box;
}

#subtitle {
  height: 200px;
  font-size: 13px;
}

.vote-wrap {
  margin-top: 8px;
  display: flex;
  gap: 8px;
}

.vote-wrap button {
  flex: 1;
  padding: 6px;
  font-size: 13px;
}

/* ========================= */
/* 태블릿 */
/* ========================= */
@media (max-width: 1024px){

  .top-bar {
    flex-wrap: wrap;
  }

  .field {
    flex: 1 1 45%;
  }

  .outfit-wrap {
    flex-wrap: wrap;
  }

  .outfit-wrap .field {
    flex: 1 1 45%;
  }
}

/* ========================= */
/* 모바일 */
/* ========================= */
@media (max-width: 768px){

  /* 캐릭터 줄 */
  .char-line {
    display: flex;          /* inline-flex → flex */
    width: 100%;
  }

  /* scene 내부 전체 */
  .scene-col {
    display: flex;
    flex-direction: column;
  }

  /* select/input 세로 정렬 */
  .scene-col select,
  .scene-col input {
    width: 100%;
    margin-bottom: 8px;
  }

}

@media (max-width: 768px){
  #result {
    height: 50vh;
    font-size: 13px;
  }
}  

