/* 교회 물품 찾기: 메신저 앱처럼 하얀 바탕, 노란 포인트, 둥근 썸네일. 테마와 섞이지 않도록 모두 #ci-app 아래에 둬요 */
#ci-app {
  --ci-bg: #FFFFFF; --ci-sunken: #F4F4F5; --ci-line: #EDEDEE;
  --ci-fg: #191919; --ci-muted: #6B6B70; --ci-yellow: #FEE500; --ci-yellow-soft: #FFF8B8; --ci-ink: #191919;
  --ci-danger: #F0443A; --ci-hl: #FFF3A0;
  --ci-font: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
  max-width: 520px; margin: 0 auto; box-sizing: border-box;
  background: var(--ci-bg); color: var(--ci-fg); border-radius: 24px; padding: 20px 18px 24px;
  box-shadow: 0 2px 24px rgba(0, 0, 0, .06);
  font-family: var(--ci-font); font-size: 15px; line-height: 1.5; letter-spacing: -.01em; text-align: left; color-scheme: light;
  -webkit-font-smoothing: antialiased;
}
#ci-app *, #ci-app *::before, #ci-app *::after { box-sizing: border-box; }
#ci-app button, #ci-app input, #ci-app select, #ci-app textarea {
  font: inherit; color: inherit; margin: 0; text-transform: none; letter-spacing: inherit; box-shadow: none; min-height: 0; line-height: 1.4;
}
#ci-app button { background: none; border: 0; padding: 0; border-radius: 0; cursor: pointer; width: auto; -webkit-tap-highlight-color: transparent; }
#ci-app button:disabled { opacity: .5; cursor: default; }
#ci-app :focus-visible { outline: 2px solid var(--ci-ink); outline-offset: 2px; }
#ci-app [hidden] { display: none !important; }
#ci-app p { margin: 0; }
#ci-app h3 { margin: 0; padding: 0; border: 0; font-family: inherit; }
#ci-app svg { flex: none; }
#ci-app img { max-width: 100%; }

/* 머리: 굵은 제목 + 글자 탭 */
#ci-app .ci-head { display: flex; flex-direction: column; gap: 14px; margin-bottom: 14px; }
#ci-app .ci-brand { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
#ci-app .ci-title { font-size: 24px; font-weight: 800; letter-spacing: -.03em; }
#ci-app .ci-who { font-size: 13px; color: var(--ci-muted); white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
#ci-app .ci-who b { color: var(--ci-fg); font-weight: 600; }
#ci-app .ci-who::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--ci-yellow); box-shadow: 0 0 0 2px #fff, 0 0 0 3px var(--ci-line); }
#ci-app .ci-tabs { display: flex; gap: 18px; border-bottom: 1px solid var(--ci-line); }
#ci-app .ci-tabs button { position: relative; padding: 6px 0 12px; font-size: 17px; font-weight: 700; color: #B8B8BC; }
#ci-app .ci-tabs button[aria-selected="true"] { color: var(--ci-fg); }
#ci-app .ci-tabs button[aria-selected="true"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 3px; border-radius: 3px; background: var(--ci-fg); }

/* 검색 */
#ci-app .ci-search { position: relative; }
#ci-app .ci-search input { width: 100%; height: 48px; border-radius: 14px; border: 0; background: var(--ci-sunken); padding: 0 44px 0 44px; font-size: 16px; -webkit-appearance: none; appearance: none; }
#ci-app .ci-search input::placeholder { color: #A5A5AA; }
#ci-app .ci-search input:focus { outline: none; box-shadow: inset 0 0 0 1.5px var(--ci-ink); background: #fff; }
#ci-app .ci-search svg { position: absolute; left: 14px; top: 14px; width: 20px; height: 20px; color: var(--ci-muted); }
#ci-app .ci-clear { position: absolute; right: 10px; top: 12px; width: 24px; height: 24px; border-radius: 50%; background: #C7C7CC; color: #fff; font-size: 16px; line-height: 24px; text-align: center; }
#ci-app .ci-chips { display: flex; gap: 6px; overflow-x: auto; padding: 12px 0 2px; scrollbar-width: none; }
#ci-app .ci-chips::-webkit-scrollbar { display: none; }
#ci-app .ci-chip { flex: none; background: var(--ci-sunken); border-radius: 999px; padding: 7px 14px; font-size: 14px; font-weight: 600; color: #55555A; }
#ci-app .ci-chip[aria-pressed="true"] { background: var(--ci-ink); color: #fff; }

/* 본문 */
#ci-app .ci-main { display: flex; flex-direction: column; gap: 26px; padding-top: 18px; }
#ci-app section { display: flex; flex-direction: column; gap: 4px; }
#ci-app .ci-h { font-size: 13px; font-weight: 600; color: var(--ci-muted); display: flex; align-items: center; gap: 6px; margin-bottom: 2px; }
#ci-app .ci-h b { font-weight: 700; color: var(--ci-fg); }
#ci-app .ci-hint { font-size: 13.5px; color: var(--ci-muted); }
#ci-app .ci-count { font-size: 13.5px; color: var(--ci-muted); margin-bottom: 2px; }
#ci-app .ci-link { color: var(--ci-muted); font-size: 13.5px; padding: 6px 4px; text-decoration: underline; text-underline-offset: 3px; }
#ci-app .ci-trash-link { text-align: center; }

/* 목록: 친구 목록처럼 둥근 썸네일 + 이름 + 한 줄 설명 */
#ci-app .ci-list { display: flex; flex-direction: column; margin: 0 -8px; }
#ci-app .ci-row { display: grid; grid-template-columns: auto 1fr; gap: 2px 12px; align-items: center; text-align: left; padding: 9px 8px; border-radius: 16px; width: 100%; }
#ci-app button.ci-row:hover { background: #FAFAFA; }
#ci-app button.ci-row:active { background: var(--ci-sunken); }
#ci-app .ci-thumb { grid-row: 1 / span 2; width: 48px; height: 48px; border-radius: 18px; overflow: hidden; display: grid; place-items: center; font-size: 19px; font-weight: 800; color: rgba(25, 25, 25, .72); }
#ci-app .ci-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
#ci-app .ci-nm { font-weight: 700; font-size: 16px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#ci-app .ci-akahit { font-weight: 500; color: var(--ci-muted); font-size: 13px; }
#ci-app .ci-loc { grid-column: 2; font-size: 13px; color: var(--ci-muted); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#ci-app .ci-loc svg { display: none; }
/* 밀어서 수정·삭제: 버튼이 오른쪽 밖에 숨어 있다가 왼쪽으로 밀면 줄 위로 들어와요 */
#ci-app .ci-swipe { position: relative; overflow: hidden; border-radius: 16px; }
#ci-app .ci-swipe > .ci-row { position: relative; background: var(--ci-bg); touch-action: pan-y; -webkit-user-select: none; user-select: none; }
#ci-app .ci-swipe-act { position: absolute; top: 0; right: 0; bottom: 0; z-index: 2; display: flex; transform: translateX(100%); }
#ci-app .ci-swipe-act button { width: 74px; height: 100%; color: #fff; font-size: 14.5px; font-weight: 700; text-align: center; }
#ci-app .ci-swipe-act .ci-act-edit { background: #A9A9AF; }
#ci-app .ci-swipe-act .ci-act-del { background: var(--ci-danger); }
#ci-app .ci-h-tip { margin-left: auto; font-size: 12px; font-weight: 500; color: #B0B0B5; }
#ci-app .ci-toast-act { margin-left: 12px; color: var(--ci-yellow); font-weight: 800; text-decoration: underline; text-underline-offset: 3px; }
#ci-app .ci-bubble-memo { white-space: pre-line; }
#ci-app .ci-bubble-tag { display: block; font-size: 11px; font-weight: 700; color: #B07D00; margin-bottom: 2px; }
#ci-app .ci-mine .ci-bubble-tag { color: #6B5600; }
#ci-app .ci-trow { grid-template-columns: 1fr auto; }
#ci-app .ci-trow .ci-loc { grid-column: 1; }
#ci-app .ci-trow .ci-sm { grid-row: 1 / span 2; grid-column: 2; }
#ci-app mark { background: var(--ci-hl); color: inherit; border-radius: 4px; padding: 0 2px; }
#ci-app .ci-empty { background: var(--ci-sunken); border-radius: 20px; padding: 28px 18px; text-align: center; display: flex; flex-direction: column; gap: 6px; align-items: center; }
#ci-app .ci-empty p:first-child { font-weight: 600; }
#ci-app .ci-empty .ci-hint { margin-bottom: 10px; }

/* 버튼: 노란 기본 버튼, 회색 보조 버튼 */
#ci-app .ci-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 50px; padding: 0 20px; border-radius: 14px; border: 0; background: var(--ci-yellow); color: var(--ci-ink); font-weight: 700; font-size: 16px; text-decoration: none; }
#ci-app .ci-btn:hover { background: #F5DC00; color: var(--ci-ink); }
#ci-app .ci-btn:active { transform: scale(.98); }
#ci-app .ci-btn.ci-ghost, #ci-app .ci-btn.ci-ghost:hover { background: var(--ci-sunken); color: var(--ci-fg); }
#ci-app .ci-btn.ci-danger, #ci-app .ci-btn.ci-danger:hover { background: var(--ci-sunken); color: var(--ci-danger); }
#ci-app .ci-btn.ci-block { width: 100%; }
#ci-app .ci-btn.ci-sm { height: 34px; padding: 0 14px; font-size: 13.5px; border-radius: 10px; }
#ci-app .ci-back { color: var(--ci-fg); font-weight: 600; font-size: 15px; padding: 4px 0; align-self: flex-start; display: inline-flex; align-items: center; gap: 2px; }
#ci-app .ci-actions { display: flex; gap: 8px; }
#ci-app .ci-actions .ci-btn { flex: 1; }

/* 상세 */
#ci-app .ci-photo { display: block; width: 100%; border-radius: 22px; overflow: hidden; background: var(--ci-sunken); aspect-ratio: 4 / 3; max-width: 100%; }
#ci-app .ci-photo img { width: 100%; height: 100%; object-fit: cover; display: block; margin: 0; }
#ci-app .ci-nophoto { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: var(--ci-muted); font-size: 14px; aspect-ratio: 16 / 7; background: repeating-linear-gradient(-45deg, #F7F7F8 0 10px, #F1F1F3 10px 20px); }
#ci-app .ci-nophoto svg { width: 30px; height: 30px; }
#ci-app .ci-name { font-size: 26px; font-weight: 800; line-height: 1.3; letter-spacing: -.03em; text-wrap: balance; }
#ci-app .ci-aka { font-size: 13.5px; color: var(--ci-muted); margin-top: 4px; }
#ci-app .ci-where { background: var(--ci-sunken); border-radius: 20px; padding: 16px 18px; }
#ci-app .ci-crumb { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; font-weight: 700; background: var(--ci-yellow); color: var(--ci-ink); border-radius: 999px; padding: 3px 10px 3px 8px; }
#ci-app .ci-crumb svg { width: 13px; height: 13px; }
#ci-app .ci-crumb b { font-weight: 700; }
#ci-app .ci-spot { font-size: 19px; font-weight: 700; margin-top: 10px; line-height: 1.45; white-space: pre-line; letter-spacing: -.02em; }
#ci-app .ci-memo { margin-top: 12px; padding-top: 12px; border-top: 1px dashed #DCDCDF; font-size: 14px; color: #5C5C61; white-space: pre-line; }

/* 변경 기록: 채팅 말풍선. 내가 한 건 오른쪽 노란 말풍선 */
#ci-app .ci-hist { list-style: none; margin: 0; padding: 14px 12px; display: flex; flex-direction: column; gap: 10px; background: #F3F4F7; border-radius: 20px; }
#ci-app .ci-hist li { margin: 0; padding: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 3px; max-width: 88%; }
#ci-app .ci-hist .ci-who-s { font-size: 12px; color: var(--ci-muted); padding-left: 4px; }
#ci-app .ci-bubble-row { display: flex; align-items: flex-end; gap: 6px; }
#ci-app .ci-bubble { background: #fff; border-radius: 4px 16px 16px 16px; padding: 8px 12px; font-size: 14px; line-height: 1.45; }
#ci-app .ci-hist li.ci-mine { align-self: flex-end; align-items: flex-end; }
#ci-app .ci-hist li.ci-mine .ci-bubble-row { flex-direction: row-reverse; }
#ci-app .ci-hist li.ci-mine .ci-bubble { background: var(--ci-yellow); border-radius: 16px 4px 16px 16px; }
#ci-app .ci-when { color: var(--ci-muted); font-size: 11px; white-space: nowrap; font-variant-numeric: tabular-nums; }

/* 양식 */
#ci-app .ci-form { display: flex; flex-direction: column; gap: 18px; }
#ci-app .ci-field { display: flex; flex-direction: column; gap: 7px; }
#ci-app .ci-field label, #ci-app .ci-lab { font-size: 14px; font-weight: 700; }
#ci-app .ci-field small { color: var(--ci-muted); font-size: 12.5px; }
#ci-app .ci-field input[type="text"], #ci-app .ci-field select, #ci-app .ci-field textarea { width: 100%; border-radius: 14px; border: 0; background: var(--ci-sunken); padding: 13px 14px; font-size: 16px; }
#ci-app .ci-field input[type="text"], #ci-app .ci-field select { height: 50px; padding-top: 0; padding-bottom: 0; }
#ci-app .ci-field textarea { resize: vertical; }
#ci-app .ci-field input:focus, #ci-app .ci-field select:focus, #ci-app .ci-field textarea:focus { outline: none; background: #fff; box-shadow: inset 0 0 0 1.5px var(--ci-ink); }
#ci-app .ci-upload { position: relative; display: flex; align-items: center; justify-content: center; gap: 8px; height: 160px; border-radius: 20px; background: var(--ci-sunken); color: var(--ci-muted); font-size: 14px; font-weight: 600; cursor: pointer; overflow: hidden; }
#ci-app .ci-upload img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; margin: 0; }
#ci-app .ci-upl-t { display: flex; align-items: center; gap: 8px; }
#ci-app .ci-upl-t svg { width: 22px; height: 22px; }
#ci-app .ci-upload input { position: absolute; opacity: 0; width: 1px; height: 1px; }
#ci-app .ci-err { color: var(--ci-danger); font-size: 14px; font-weight: 600; }

/* 로그인 안내 */
#ci-app .ci-gate { text-align: center; padding: 32px 12px; display: flex; flex-direction: column; gap: 8px; align-items: center; }
#ci-app .ci-gate-t { font-size: 19px; font-weight: 800; }
#ci-app .ci-gate .ci-btn { margin-top: 10px; min-width: 200px; }

#ci-app .ci-toast { position: fixed; left: 50%; bottom: calc(28px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); background: rgba(25, 25, 25, .9); color: #fff; padding: 11px 18px; border-radius: 999px; font-size: 14px; font-weight: 600; z-index: 99999; width: max-content; max-width: calc(100% - 32px); text-align: center; backdrop-filter: blur(6px); }
#ci-app .ci-toast.ci-bad { background: var(--ci-danger); }
@media (prefers-reduced-motion: no-preference) {
  #ci-app .ci-toast { animation: ci-up .22s cubic-bezier(.2, .8, .3, 1.2); }
  @keyframes ci-up { from { opacity: 0; transform: translate(-50%, 10px) scale(.96); } }
}
@media (max-width: 480px) {
  #ci-app { padding: 16px 14px 22px; border-radius: 0; box-shadow: none; }
}
