body { min-height: 100dvh; background: var(--bg); color: var(--cream); }
.join { position: relative; z-index: 1; max-width: 560px; margin: 0 auto; padding: 22px 20px 48px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.intro { color: var(--cream-2); font-size: 14px; margin: 6px 0 18px; }

/* 카드 = 입력 폼(트리 화면의 소원 모양 그대로) */
.editor {
  position: relative; padding: 26px 22px 22px; border-radius: 10px;
  background: rgba(38, 31, 26, 0.55); border: 1px solid var(--line); overflow: hidden;
}
.editor::before { /* 메인 월의 빨간 빛 */
  content: ''; position: absolute; left: -20%; top: 10%; width: 70%; height: 70%; pointer-events: none;
  background: radial-gradient(closest-side, rgba(224, 64, 46, 0.28), transparent); z-index: 0;
}
.editor > *:not(.sr) { position: relative; z-index: 1; }
.e-meta { display: flex; align-items: center; gap: 12px; font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--cream-2); margin-bottom: 14px; }
.e-meta .rule { width: 34px; height: 1px; background: var(--cream-3); }
.e-meta .new { color: var(--red); font-weight: 600; }

.editor input, .editor textarea {
  width: 100%; margin: 0; padding: 0; border: 0; outline: none; background: none; color: var(--cream); font-family: var(--sans);
  border-bottom: 1px dashed var(--cream-3); border-radius: 0; transition: border-color 0.2s;
}
.editor input:focus, .editor textarea:focus { border-bottom-color: var(--cream); border-bottom-style: solid; }
.editor ::placeholder { color: rgba(234, 220, 194, 0.32); }
.e-wish {
  display: block; resize: none; overflow: hidden; font-size: 30px; font-weight: 300; line-height: 1.22; letter-spacing: -0.025em;
  padding-bottom: 8px; word-break: keep-all;
}
.e-count { text-align: right; font-size: 11px; color: var(--cream-3); margin-top: 6px; letter-spacing: 0.05em; }

.e-by { display: flex; align-items: center; gap: 14px; margin-top: 20px; }
.e-photo { position: relative; flex: none; cursor: pointer; }
.e-av { display: block; width: 58px; height: 58px; border-radius: 50%; overflow: hidden; }
.e-av .av { width: 100%; height: 100%; }
.e-av .av-name span { font-size: 30cqw; }
.e-av.empty { border: 1px dashed var(--cream-3); background: rgba(234, 220, 194, 0.05); display: grid; place-items: center; }
.e-av.empty svg { width: 22px; height: 22px; fill: none; stroke: var(--cream-3); stroke-width: 1.6; stroke-linejoin: round; }

/* 사진 버튼 줄(카드 아래쪽) */
.e-photo-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin-top: 22px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--cream-3); background: rgba(234, 220, 194, 0.06); color: var(--cream); font: inherit; font-size: 13.5px;
}
.chip svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linejoin: round; }
.chip.quiet { border-color: transparent; background: none; color: var(--cream-2); padding: 0 6px; text-decoration: underline; text-underline-offset: 3px; }
.e-photo-note { font-size: 12px; color: var(--cream-3); }
.e-who { flex: 1; min-width: 0; display: grid; grid-template-columns: auto 1fr; column-gap: 8px; row-gap: 12px; align-items: baseline; }
.e-who .dash { color: var(--cream-2); font-size: 17px; }
.e-name { font-size: 17px; font-weight: 500; padding-bottom: 8px; }
.e-sub { grid-column: 2; font-size: 16px; color: var(--cream-2); padding-bottom: 8px; } /* iOS Safari는 16px 미만 입력칸을 누르면 화면을 확대해 버린다 */

/* 걸린 뒤: 카드가 읽기 전용이 된다 */
.editor.locked input, .editor.locked textarea { border-bottom-color: transparent; pointer-events: none; }
.editor.locked .e-count, .editor.locked .e-photo-bar { display: none; }
.editor.locked .e-sub:placeholder-shown { display: none; } /* 소속을 안 적었으면 빈 칸 안내문을 남기지 않는다 */
.editor.locked .e-photo { pointer-events: none; }
.photo-busy .e-av { opacity: 0.5; }

.consent { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; line-height: 1.5; color: var(--cream-2); margin: 18px 2px 12px; }
.consent input { width: 18px; height: 18px; margin: 1px 0 0; flex: none; accent-color: var(--red); }
.err { color: #ffb4a6; min-height: 1.2em; font-size: 14px; margin: 0 2px 10px; }

.primary, .ghost {
  display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; padding: 14px 20px;
  font: inherit; font-size: 15px; font-weight: 600; text-decoration: none; cursor: pointer;
}
.primary { width: 100%; border: 0; background: var(--cream); color: var(--bg); }
.primary:disabled { opacity: 0.6; }
.ghost { background: none; border: 1px solid var(--cream-3); color: var(--cream); }
.done-msg { color: var(--cream-2); font-size: 14px; margin: 16px 2px 14px; }
.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.actions .primary { grid-column: 1 / -1; }
.edit-actions { display: grid; grid-template-columns: 1fr; gap: 10px; }
.edit-actions:has(#cancel:not([hidden])) { grid-template-columns: 2fr 1fr; }
.danger-link { display: block; margin: 22px auto 0; background: none; border: 0; color: #ff9d8c; font: inherit; font-size: 13px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; padding: 6px; }

@media (max-width: 380px) { .e-wish { font-size: 26px; } }
