/* photo_restore v1 — 묻고답하기형 사진복원 (photo_retouch 톤 준용: 다크+옐로 액센트, 이모지 금지·SVG만) */
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; }
body {
  font-family: "Pretendard", "Noto Sans KR", -apple-system, sans-serif;
  background: #141519; color: #e8e9ee; -webkit-font-smoothing: antialiased;
}
.rs-app { display: flex; flex-direction: column; height: 100dvh; max-width: 760px; margin: 0 auto; }

/* 헤더 */
.rs-hd { padding: 14px 18px 10px; border-bottom: 1px solid #24262e; }
.rs-logo { font-size: 17px; font-weight: 800; letter-spacing: -.02em; display: flex; align-items: center; gap: 8px; }
.rs-logo-dot { width: 22px; height: 22px; border-radius: 7px; background: linear-gradient(135deg, #FFD75B, #ffb63b); }
.rs-logo em { font-style: normal; font-size: 9.5px; font-weight: 700; letter-spacing: .12em; color: #141519;
  background: #FFD75B; border-radius: 4px; padding: 2px 6px; }
.rs-hd-sub { font-size: 11.5px; color: #8a8b93; margin-top: 4px; }

/* 채팅 영역 */
.rs-chat { flex: 1; overflow-y: auto; padding: 18px 16px 24px; display: flex; flex-direction: column; gap: 14px; }
.rs-msg { display: flex; gap: 10px; max-width: 92%; animation: rsIn .28s ease; }
@keyframes rsIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.rs-msg.user { align-self: flex-end; flex-direction: row-reverse; }
.rs-ava { flex: 0 0 30px; width: 30px; height: 30px; border-radius: 10px; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #FFD75B, #ffb63b); }
.rs-ava svg { width: 17px; height: 17px; stroke: #141519; stroke-width: 1.8; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.rs-bubble { background: #1d1f26; border: 1px solid #272a33; border-radius: 4px 16px 16px 16px; padding: 12px 14px;
  font-size: 13.5px; line-height: 1.6; }
.rs-msg.user .rs-bubble { background: #2a2417; border-color: #4d4020; border-radius: 16px 4px 16px 16px; }

/* 업로드 카드 */
.rs-upload { margin-top: 10px; border: 1.5px dashed #3a3d48; border-radius: 14px; padding: 22px 16px; text-align: center;
  cursor: pointer; transition: border-color .15s, background .15s, transform .12s; }
.rs-upload:hover { border-color: #FFD75B; background: rgba(255,215,91,.04); transform: translateY(-1px); }
.rs-upload.drag { border-color: #FFD75B; background: rgba(255,215,91,.08); }
.rs-upload svg { width: 30px; height: 30px; stroke: #FFD75B; stroke-width: 1.8; fill: none; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 8px; }
.rs-upload b { display: block; font-size: 13.5px; }
.rs-upload span { display: block; font-size: 11px; color: #8a8b93; margin-top: 4px; }

/* 사진 버블 */
.rs-photo { max-width: 240px; border-radius: 12px; display: block; }
.rs-photo-cap { font-size: 10.5px; color: #8a8b93; margin-top: 6px; font-variant-numeric: tabular-nums; }

/* 이슈 칩 */
.rs-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.rs-chip { border: 1px solid #3a3d48; background: #22242c; color: #cfd1d8; border-radius: 999px; padding: 7px 13px;
  font-size: 12.5px; cursor: pointer; transition: all .13s; user-select: none; }
.rs-chip:hover { transform: translateY(-1px); }
.rs-chip.on { background: linear-gradient(135deg, #FFD75B, #ffc94b); border-color: #FFD75B; color: #141519; font-weight: 700; }
.rs-cta { margin-top: 14px; display: inline-flex; align-items: center; gap: 7px; border: 0; border-radius: 12px;
  background: linear-gradient(135deg, #FFD75B, #ffb63b); color: #141519; font-weight: 800; font-size: 13.5px;
  padding: 11px 20px; cursor: pointer; transition: transform .12s, box-shadow .12s; }
.rs-cta:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(255,193,59,.25); }
.rs-cta:active { transform: translateY(0); }
.rs-cta:disabled { opacity: .45; cursor: default; transform: none; box-shadow: none; }
.rs-cta svg { width: 15px; height: 15px; stroke: #141519; stroke-width: 2; fill: none; stroke-linecap: round; }
.rs-cta.ghost { background: #22242c; color: #e8e9ee; border: 1px solid #3a3d48; box-shadow: none; }
.rs-cta.ghost svg { stroke: #e8e9ee; }

/* 로딩 shimmer */
.rs-loading { display: flex; align-items: center; gap: 10px; }
.rs-shimmer { position: relative; overflow: hidden; width: 130px; height: 12px; border-radius: 7px; background: #272a33; }
.rs-shimmer::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255,215,91,.35), transparent); animation: rsSweep 1.2s infinite; }
@keyframes rsSweep { to { transform: translateX(100%); } }
.rs-loading-label { font-size: 12px; color: #b9bbc4; }

/* before/after */
.rs-ba { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; max-width: 460px; }
.rs-ba figure { position: relative; border-radius: 12px; overflow: hidden; }
.rs-ba img { width: 100%; display: block; }
.rs-ba figcaption { position: absolute; left: 8px; top: 8px; background: #141519; color: #fff; font-size: 10px;
  font-weight: 700; border-radius: 6px; padding: 3px 8px; letter-spacing: .04em; }
.rs-ba figure.aft figcaption { background: #FFD75B; color: #141519; }
.rs-result-act { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }

/* 에러 버블 */
.rs-bubble.err { border-color: #5a2a2a; background: #241a1a; }

/* 컴포저 */
.rs-composer { display: flex; gap: 8px; padding: 12px 14px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid #24262e; }
.rs-composer input { flex: 1; background: #1d1f26; border: 1px solid #2c2f39; color: #e8e9ee; border-radius: 12px;
  font-size: 13.5px; padding: 12px 14px; outline: none; transition: border-color .15s; }
.rs-composer input:focus { border-color: #FFD75B; }
.rs-composer input:disabled { opacity: .5; }
.rs-send { flex: 0 0 44px; height: 44px; border: 0; border-radius: 12px; background: linear-gradient(135deg, #FFD75B, #ffb63b);
  cursor: pointer; display: flex; align-items: center; justify-content: center; transition: transform .12s; }
.rs-send:hover:not(:disabled) { transform: translateY(-1px); }
.rs-send:disabled { opacity: .4; cursor: default; }
.rs-send svg { width: 19px; height: 19px; stroke: #141519; stroke-width: 1.9; fill: none; stroke-linecap: round; stroke-linejoin: round; }

@media (max-width: 480px) {
  .rs-chat { padding: 14px 12px 20px; }
  .rs-msg { max-width: 97%; }
  .rs-ba { max-width: 100%; }
  .rs-photo { max-width: 200px; }
}
