/* 캔버스와 요소 — 편집 화면, 미리보기, 썸네일이 함께 쓴다.
   위치·크기는 %(캔버스 대비 비율), 글자 크기는 cqw(캔버스 너비 대비 비율)로 그린다. */

.canvas {
  position: relative;
  aspect-ratio: 9 / 16;
  background: #fff;
  container-type: inline-size;   /* 안쪽 요소의 cqw 기준 */
  overflow: hidden;
  color: #1a1a1a;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

.el { position: absolute; font-size: 4cqw; line-height: 1.5; }
.el__body { width: 100%; height: 100%; overflow: hidden; }

/* 제목 · 본문 */
.el-heading, .el-text { margin: 0; white-space: pre-wrap; }
.el-heading { font-size: 1em; font-weight: 600; line-height: 1.25; letter-spacing: -0.02em; }
.el-text { font-size: 1em; font-weight: 400; line-height: 1.55; }
.el__body.has-bg { padding: .7em .9em; border-radius: .7em; }

/* 이미지 */
.el-image { width: 100%; height: 100%; object-fit: cover; border-radius: .7em; display: block; } /* 채우기·둥글기는 요소 설정이 인라인으로 덮어쓴다 */
.el-image--empty {
  display: flex; align-items: center; justify-content: center;
  background: #f0eeec; color: #787671;
  font-size: .85em; border: 1px dashed #c8c4be;
}

/* 입력창 · 선택박스 */
.el-field { display: flex; flex-direction: column; gap: .3em; width: 100%; height: 100%; }
.el-field__label { font-size: .86em; font-weight: 500; line-height: 1.3; color: #37352f; flex: none; }
.el-field__head .el-field__label { flex: 1; min-width: 0; }
.el-field__label em { font-style: normal; color: #e03131; margin-left: .2em; }
.el-field__control {
  flex: 1; min-height: 0; width: 100%; padding: 0 .85em;
  background: #fff; color: #1a1a1a;
  border: 1px solid #c8c4be; border-radius: .5em;
  font-family: inherit; font-size: 1em; outline: none;
}
.el-field__control::placeholder { color: #bbb8b1; }
.el-field__control:focus { border-color: #5645d4; box-shadow: 0 0 0 1px #5645d4; }
.el-field__control.is-invalid { border-color: #e03131; box-shadow: 0 0 0 1px #e03131; }
select.el-field__control { appearance: none; -webkit-appearance: none; padding-right: 2.2em;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 4.5 6 8l3.5-3.5' fill='none' stroke='%23787671' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right .8em center; background-size: .8em; }
.canvas--dark .el-field__label { color: #fff; }

/* 긴 글 입력 */
.el-field__head { display: flex; align-items: baseline; justify-content: space-between; gap: .6em; flex: none; }
.el-field__count { font-size: .78em; line-height: 1.3; color: #787671; font-variant-numeric: tabular-nums; }
textarea.el-field__control { padding: .55em .85em; line-height: 1.5; resize: none; display: block; }
.canvas--dark .el-field__count { color: #a4a097; }

/* 별점 */
/* 별 줄은 요소 높이를 따라 커지되, 요소 너비를 넘으면 그 안에서 줄어든다 */
.el-rating__stars { flex: 1; min-height: 0; align-self: flex-start; aspect-ratio: 5.6 / 1; max-width: 100%; display: flex; align-items: stretch; gap: 3%; }
.el-rating__star {
  flex: 1 1 0; min-width: 0; height: 100%; padding: 0; border: 0; background: none; cursor: pointer;
  color: #c8c4be; border-radius: .3em;
  transition: color .15s ease, transform .12s cubic-bezier(.2, .7, .2, 1);
}
.el-rating__star svg { width: 100%; height: 100%; display: block; }
.el-rating__star.is-on { color: #dd5b00; }
.el-rating__star:active { transform: scale(.9); }
.el-rating__value.is-invalid + .el-rating__stars { box-shadow: 0 0 0 2px #e03131; border-radius: .5em; }
.canvas--dark .el-rating__star { color: #5d5b54; }
.canvas--dark .el-rating__star.is-on { color: #f5d75e; }

/* 버튼 */
.el-button {
  width: 100%; height: 100%; padding: 0 1em; text-align: center;
  border: 1px solid transparent; border-radius: .5em;
  font-family: inherit; font-size: 1em; font-weight: 500; line-height: 1.2; cursor: pointer;
  transition: background-color .15s ease, transform .12s cubic-bezier(.2, .7, .2, 1);
}
.el-button:active { transform: scale(.97); }
.el-button--primary { background: #5645d4; color: #fff; }
.el-button--dark { background: #000; color: #fff; }
.el-button--light { background: #fff; color: #1a1a1a; }
.el-button--outline { background: transparent; color: #1a1a1a; border-color: #c8c4be; }
.canvas--dark .el-button--outline { color: #fff; border-color: #a4a097; }

/* 구분선 */
.el-divider { display: flex; align-items: center; width: 100%; height: 100%; }
.el-divider::before { content: ""; flex: 1; border-top: 1px solid var(--line, #e5e3df); }

/* 대기 현황 */
.el-counter {
  width: 100%; height: 100%; padding: .6em 1em; border-radius: .8em;
  display: flex; align-items: center; justify-content: space-between; gap: 1em;
}
.el-counter__label { font-size: 1em; font-weight: 500; }
.el-counter__value { font-size: 2.6em; font-weight: 600; line-height: 1; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.el-counter__value small { font-size: .4em; font-weight: 500; margin-left: .25em; letter-spacing: 0; }

/* 썸네일: 조작 불가 */
.canvas--thumb { pointer-events: none; user-select: none; }

/* 색 상자: 색 면을 깔 때 쓴다 */
.el-box { width: 100%; height: 100%; }
