/* 11/06 대표: 의뢰 등록 페이지 — 틀에 찍은 듯한 모양 대신 "종이 의뢰서 한 장" 느낌 + 첫 화면과 같은 옅은 숲색 선·문양·움직임 (채팅 Claude).
   ① 편하게 적기 상자: 안쪽 여백 넉넉히(흰 입력칸이 상자 가장자리에 붙지 않게), 세이지 바탕 + 오른쪽 빗금 + 모서리 꺾쇠
   ② 의뢰서 양식: 종이 카드, 위 가장자리 필름 구멍 줄, 칸마다 01~05 번호, 오른쪽 위 "의뢰서" 도장
   ③ 올린 뒤에는: 01→04 세로 줄과 점이 차례로 채워짐(12초 반복)
   움직임 줄이기면 모두 멈추고 다 채운 모습. */
.rq-main .m-h1 { font-family: var(--font-heading); font-weight: var(--font-weight-semibold, 600); letter-spacing: -0.01em; }
.rq-main .m-h1 em { font-style: normal; color: var(--color-primary); }
.rq-main .m-h1::after { content: ''; display: block; width: 72px; height: 2px; margin-top: 14px; background: rgba(27, 58, 61, .45); border-radius: 2px; transform-origin: left; }
.rq-main .m-lead { margin-bottom: var(--space-6); }

/* ① 편하게 적기 */
.rq-main .rt-box { position: relative; isolation: isolate; margin: 0 0 var(--space-6); padding: 28px 32px 26px; border: 0; border-radius: var(--radius-xl); background: var(--color-sage, #d4e6e8); overflow: visible; }
.rq-main .rt-box::before { content: ''; position: absolute; inset: 0; z-index: -1; border-radius: inherit; pointer-events: none;
  background-image: repeating-linear-gradient(135deg, rgba(27, 58, 61, .07) 0 1px, transparent 1px 14px);
  -webkit-mask-image: linear-gradient(90deg, transparent 45%, #000 95%); mask-image: linear-gradient(90deg, transparent 45%, #000 95%); }
.rq-main .rt-box::after { content: ''; position: absolute; inset: -10px; pointer-events: none; --c: rgba(27, 58, 61, .4);
  background:
    linear-gradient(var(--c), var(--c)) left top / 22px 2px no-repeat, linear-gradient(var(--c), var(--c)) left top / 2px 22px no-repeat,
    linear-gradient(var(--c), var(--c)) right bottom / 22px 2px no-repeat, linear-gradient(var(--c), var(--c)) right bottom / 2px 22px no-repeat; }
.rq-main .rt-title { margin: 0 0 4px; font-family: var(--font-heading); font-size: 1.375rem; font-weight: var(--font-weight-semibold, 600); }
.rq-main .rt-sub { margin: 0 0 var(--space-4); font-size: var(--font-size-small, 15px); color: var(--color-text-muted); }
.rq-main .rt-box textarea { display: block; min-height: 120px; padding: 16px 18px; border: 1px solid rgba(27, 58, 61, .14); border-radius: var(--radius-lg); background: var(--color-paper, #f6fbfb); line-height: 1.65; box-shadow: 0 1px 0 rgba(27, 58, 61, .04); }
.rq-main .rt-box textarea:focus { border-color: var(--color-primary); outline: var(--focus-ring); outline-offset: 0; }
.rq-main .rt-box .m-help { margin-top: var(--space-3); }
.rq-main .rt-box .m-acts { margin-top: var(--space-4); }
.rq-main .rt-ask { background: var(--color-paper, #f6fbfb); padding: var(--space-4); }
.rq-main .rt-or { display: flex; align-items: center; gap: var(--space-3); margin: var(--space-5) -4px 0; font-size: var(--font-size-caption); color: var(--color-text-muted); }
.rq-main .rt-or::before, .rq-main .rt-or::after { content: ''; flex: 1; height: 1px; background: rgba(27, 58, 61, .2); }

/* ② 의뢰서 양식 */
.rq-main .m-form { position: relative; counter-reset: rq; padding: 48px 32px 32px; border-radius: var(--radius-xl); background: var(--color-paper, #f6fbfb); box-shadow: 0 1px 0 rgba(27, 58, 61, .06), 0 18px 40px -28px rgba(17, 41, 44, .35); }
.rq-main .m-form[hidden] { display: none; }
.rq-main .m-form::before { content: ''; position: absolute; left: 24px; right: 24px; top: 14px; height: 8px; pointer-events: none;
  background: linear-gradient(90deg, rgba(27, 58, 61, .16) 0 12px, transparent 12px 26px) 0 0 / 26px 8px repeat-x; border-radius: 1px; }
.rq-main .m-form::after { content: '의뢰서'; position: absolute; right: 26px; top: 30px; padding: 4px 10px; border: 2px solid rgba(27, 58, 61, .28); border-radius: 8px;
  font-family: var(--font-heading); font-size: 14px; letter-spacing: .3em; color: rgba(27, 58, 61, .4); transform: rotate(-6deg); pointer-events: none; }
.rq-main .m-form > .m-field { counter-increment: rq; }
.rq-main .m-form > .m-field > label::before { content: counter(rq, decimal-leading-zero); display: inline-block; min-width: 2em; margin-right: 6px; font-family: var(--font-heading); font-size: 13px; font-weight: 600; color: rgba(27, 58, 61, .55); }
.rq-main .m-form > .m-field { padding-top: var(--space-4); border-top: 1px dashed rgba(27, 58, 61, .18); }
.rq-main .m-form > .m-field:first-child { border-top: 0; padding-top: 0; }
.rq-main .m-form > .m-field .m-help, .rq-main .m-form > .m-field .m-err { padding-left: calc(2em + 6px); }

/* ③ 올린 뒤에는 */
.rq-main .m-side-card { position: relative; padding: 28px 28px 26px; border-radius: var(--radius-xl); }
.rq-main .m-side-card h2 { font-family: var(--font-heading); font-weight: var(--font-weight-semibold, 600); margin-bottom: var(--space-4); }
.rq-main .m-side-card ol { position: relative; list-style: none; padding: 0; counter-reset: rs; display: grid; gap: var(--space-4); }
.rq-main .m-side-card ol::before { content: ''; position: absolute; left: 6px; top: 8px; bottom: 12px; width: 2px; border-radius: 2px; background: rgba(27, 58, 61, .14); }
.rq-main .m-side-card ol::after { content: ''; position: absolute; left: 6px; top: 8px; bottom: 12px; width: 2px; border-radius: 2px; background: var(--color-forest, #1b3a3d); transform-origin: top; }
.rq-main .m-side-card li { position: relative; padding-left: 30px; line-height: 1.6; }
.rq-main .m-side-card li::before { content: ''; position: absolute; left: 0; top: 5px; width: 14px; height: 14px; box-sizing: border-box; border-radius: 50%; border: 2px solid rgba(27, 58, 61, .7); background: var(--color-forest, #1b3a3d); z-index: 1; }

@media (max-width: 640px) {
  .rq-main .rt-box { padding: 22px 20px 20px; }
  .rq-main .m-form { padding: 36px 20px 24px; }
  .rq-main .m-form::after { right: 16px; font-size: 13px; }
  .rq-main .m-side-card { padding: 24px 20px; }
}

@media (prefers-reduced-motion: no-preference) {
  .rq-main .m-h1::after { animation: rq-draw 1.1s .2s cubic-bezier(.16,1,.3,1) both; }
  @keyframes rq-draw { from { transform: scaleX(0); } }
  .rq-main .rt-box::after { animation: rq-focus 1.2s cubic-bezier(.16,1,.3,1) both; }
  @keyframes rq-focus { from { transform: scale(1.04); opacity: 0; } }
  .rq-main .m-form::before { animation: rq-perf 4s linear infinite; }
  @keyframes rq-perf { to { background-position: 26px 0; } }
  .rq-main .m-form::after { animation: rq-stamp .5s .6s cubic-bezier(.3,1.6,.5,1) both; }
  @keyframes rq-stamp { from { transform: rotate(-6deg) scale(1.6); opacity: 0; } }
  .rq-main .m-side-card ol::after { animation: rq-fill 12s linear infinite both; }
  @keyframes rq-fill { 0% { transform: scaleY(0); } 70%, 92% { transform: scaleY(1); opacity: 1; } 100% { transform: scaleY(1); opacity: 0; } }
  .rq-main .m-side-card li::before { animation: rq-dot 12s linear infinite both; }
  .rq-main .m-side-card li:nth-child(2)::before { animation-name: rq-dot2; }
  .rq-main .m-side-card li:nth-child(3)::before { animation-name: rq-dot3; }
  .rq-main .m-side-card li:nth-child(4)::before { animation-name: rq-dot4; }
  @keyframes rq-dot  { 0%, 1% { background: var(--color-paper, #f6fbfb); } 2%, 92% { background: var(--color-forest, #1b3a3d); } 100% { background: var(--color-paper, #f6fbfb); } }
  @keyframes rq-dot2 { 0%, 23% { background: var(--color-paper, #f6fbfb); } 24%, 92% { background: var(--color-forest, #1b3a3d); } 100% { background: var(--color-paper, #f6fbfb); } }
  @keyframes rq-dot3 { 0%, 46% { background: var(--color-paper, #f6fbfb); } 47%, 92% { background: var(--color-forest, #1b3a3d); } 100% { background: var(--color-paper, #f6fbfb); } }
  @keyframes rq-dot4 { 0%, 69% { background: var(--color-paper, #f6fbfb); } 70%, 92% { background: var(--color-forest, #1b3a3d); } 100% { background: var(--color-paper, #f6fbfb); } }
}

/* 11/06 대표: 고르는 단위(가격표 [이걸로 의뢰]로 오면 저절로 골라짐) — 세 칸 카드, 고르면 숲색 테두리 */
.rq-main .rq-plan { margin: 0; padding: 0; border: 0; min-width: 0; }
.rq-main .rq-plan legend { padding: 0; margin-bottom: var(--space-2); font-weight: var(--font-weight-bold); }
.rq-main .m-form > .rq-plan { counter-increment: rq; }
.rq-main .m-form > .rq-plan > legend::before { content: counter(rq, decimal-leading-zero); display: inline-block; min-width: 2em; margin-right: 6px; font-family: var(--font-heading); font-size: 13px; font-weight: 600; color: rgba(27, 58, 61, .55); }
.rq-main .m-form > .rq-plan .m-help { padding-left: calc(2em + 6px); }
.rq-plan__opts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.rq-main .m-field .rq-plan__opt { display: grid; margin: 0; font-weight: inherit; }
.rq-plan__opt { position: relative; display: grid; justify-items: center; gap: 4px; padding: 14px 8px 12px; border: 1.5px solid var(--color-line); border-radius: var(--radius-lg); background: var(--color-paper, #f6fbfb); cursor: pointer; text-align: center; transition: border-color .2s, box-shadow .2s, transform .2s; }
.rq-plan__opt input { position: absolute; opacity: 0; pointer-events: none; }
.rq-plan__opt b { font-size: 15px; }
.rq-plan__opt small { font-size: 12.5px; color: var(--color-text-muted); }
.rq-plan__opt:hover { border-color: rgba(27, 58, 61, .45); }
.rq-plan__opt:has(input:focus-visible) { outline: var(--focus-ring); outline-offset: 2px; }
.rq-plan__opt:has(input:checked) { border-color: var(--color-forest, #1b3a3d); box-shadow: 0 0 0 1.5px var(--color-forest, #1b3a3d); background: #FAFAFA; }
.rq-plan__opt:has(input:checked)::after { content: '✓'; position: absolute; right: 8px; top: 6px; width: 20px; height: 20px; border-radius: 50%; background: var(--color-forest, #1b3a3d); color: var(--color-cream, #eef1f1); font-size: 12px; line-height: 20px; }
.rq-plan__shape { display: flex; align-items: flex-end; gap: 4px; height: 30px; }
.rq-plan__shape i { display: block; border: 1.5px solid rgba(27, 58, 61, .55); border-radius: 4px; }
.rq-plan__shape--v i, .rq-plan__shape--vh i:first-child { width: 17px; height: 30px; }
.rq-plan__shape--h i, .rq-plan__shape--vh i:last-child { width: 38px; height: 22px; }
.rq-plan__opt:has(input:checked) .rq-plan__shape i { background: rgba(27, 58, 61, .1); }
@media (max-width: 420px) { .rq-plan__opts { gap: 6px; } .rq-plan__opt b { font-size: 13.5px; } .rq-plan__opt small { font-size: 11.5px; } }
@media (prefers-reduced-motion: no-preference) {
  .rq-plan.is-picked .rq-plan__opt:has(input:checked) { animation: rq-pick .5s cubic-bezier(.3,1.6,.5,1); }
  @keyframes rq-pick { from { transform: scale(.94); } }
}
/* 11/06 대표: 예산이 시작가보다 낮으면 빨갛게 */
.rq-main #r-budget.rq-low, .rq-main #r-budget[aria-invalid="true"] { border-color: var(--color-error, #138686); box-shadow: 0 0 0 1px var(--color-error, #138686); background: #f6f9f9; }
.rq-main #r-budget-err { color: var(--color-error, #138686); font-weight: var(--font-weight-semibold, 600); padding-left: calc(2em + 6px); }

/* 11/07 의뢰 사진(5장까지): 작은 네모 미리보기 + 빼기 단추 + 점선 "사진 추가" 칸 */
.rq-photos__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 10px; }
.rq-photos__item { position: relative; margin: 0; aspect-ratio: 1; border-radius: var(--radius-md); overflow: hidden; background: var(--color-sage, #d4e6e8); }
.rq-photos__item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rq-photos__x { position: absolute; right: 4px; top: 4px; width: 28px; height: 28px; min-width: 0; min-height: 0; padding: 0; display: grid; place-items: center; border: 0; border-radius: 50%; background: rgba(17, 41, 44, .78); color: #fff; font-size: 17px; line-height: 1; cursor: pointer; }
.rq-photos__add { display: grid; place-content: center; justify-items: center; gap: 2px; aspect-ratio: 1; min-height: 92px; border: 1.5px dashed rgba(27, 58, 61, .35); border-radius: var(--radius-md); background: transparent; color: var(--color-primary); font: inherit; font-size: 13px; font-weight: var(--font-weight-semibold, 600); cursor: pointer; }
.rq-photos__add span { font-size: 22px; line-height: 1; }
.rq-photos__add:hover { border-color: var(--color-primary); background: rgba(27, 58, 61, .04); }
.rq-photos__add[hidden] { display: none; }
.rq-main .m-form > .rq-photos .m-help, .rq-main .m-form > .rq-photos .m-err { padding-left: calc(2em + 6px); }

/* 11/07 의뢰 고치기에서는 편하게 적기 상자를 숨김 */
.rq-editing .rt-box { display: none !important; }
/* 11/07 개인 의뢰 안내 */
#r-invite.r-private { padding: 14px 16px; border-radius: 16px; background: #ecf4f4; border: 1px solid rgba(32, 135, 135,.18); color: #195050; line-height: 1.55; }
#r-invite.r-private b { color: #187373; margin-bottom: 2px; }

/* 11/08 대표: 로그인 없이 먼저 쓰기 + 올리기 누를 때 로그인 창 */
.rq-guest { display: flex; gap: 10px; align-items: flex-start; margin: 0 0 16px; padding: 12px 16px; border-radius: 16px; background: rgba(225, 239, 241,.75); color: #2d494c; font-size: 14px; line-height: 1.55; box-shadow: 0 0 0 1px rgba(255,255,255,.7) inset; }
.rq-guest[hidden] { display: none; }
.rq-login { width: min(400px, calc(100vw - 32px)); padding: 30px 26px 22px; border: 0; border-radius: 26px; background: rgba(245, 250, 250,.97); box-shadow: 0 40px 80px -20px rgba(0,0,0,.45); text-align: center; }
.rq-login::backdrop { background: rgba(19, 30, 31,.45); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.rq-login .nf-x { position: absolute; left: 18px; top: 18px; margin: 0; }
.rq-login__h { margin: 4px 0 6px; font-size: 22px; font-weight: 800; color: #1e2a2b; }
.rq-login__p { margin: 0 0 18px; color: #65656b; font-size: 14px; line-height: 1.55; }
.rq-login .m-btn { margin-top: 8px; }
.rq-login__s { margin: 12px 0 0; font-size: 12.5px; color: #7f7f86; }
.rq-login .nf-x { width: 14px; height: 14px; padding: 0; border: 0; border-radius: 50%; cursor: pointer; background: #208888; box-shadow: 0 0 0 .5px rgba(0,0,0,.18) inset; }
.rq-login .nf-x::before, .rq-login .nf-x::after { content: ''; position: absolute; left: 50%; top: 50%; width: 8px; height: 1.6px; background: #0d5c5c; opacity: 0; transition: opacity .15s; }
.rq-login .nf-x::before { transform: translate(-50%, -50%) rotate(45deg); } .rq-login .nf-x::after { transform: translate(-50%, -50%) rotate(-45deg); }
.rq-login .nf-x:hover::before, .rq-login .nf-x:hover::after, .rq-login .nf-x:focus-visible::before, .rq-login .nf-x:focus-visible::after { opacity: 1; }
.rq-login .nf-x > i { position: absolute; inset: -10px; }
.rq-login .nf-x { width: 14px !important; height: 14px !important; min-width: 0 !important; min-height: 0 !important; line-height: 0; box-sizing: border-box; }
