/* 대화형 — 메신저처럼. 쑥빛 대화창 + 흰 업체 말풍선 + 짙은 청록 내 말풍선, 둥근 고운돋움 */
@font-face { font-family: 'Pretendard Variable'; src: url('/fonts/PretendardVariable.woff2') format('woff2-variations'); font-weight: 45 920; font-display: swap; }

:root {
  --bg: #F3F1EA;
  --room: #DCE5DD;
  --ink: #22302C;
  --soft: #5E6C66;
  --line: #CBD5CC;
  --teal: #2D5B54;
  --teal-2: #3F7A70;
  --white: #FFFFFF;
  --sun: #F0C25A;
  --warn: #FBE9D6;
  --sans: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont, 'Malgun Gothic', sans-serif;
  --round: 'Gowun Dodum', 'Pretendard Variable', sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 15.5px/1.6 var(--sans); letter-spacing: -0.2px; word-break: keep-all; overflow-wrap: anywhere; overflow-x: hidden; }
a { color: inherit; }
button { font: inherit; color: inherit; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.page { display: grid; grid-template-columns: 340px minmax(0, 560px); justify-content: center; gap: 40px; max-width: 1060px; margin: 0 auto; padding: 36px 24px 48px; align-items: start; }

/* 왼쪽 업체 정보 */
.side { position: sticky; top: 24px; }
.side__id { display: flex; align-items: center; gap: 14px; }
.side h1 { margin: 0; font-family: var(--round); font-weight: 400; font-size: 25px; letter-spacing: -0.5px; line-height: 1.3; }
.side__on { display: flex; align-items: center; gap: 6px; margin: 2px 0 0; font-size: 13px; color: var(--soft); }
.side__on i { width: 8px; height: 8px; border-radius: 50%; background: #4CA36B; }
.side__lead { margin: 20px 0 18px; color: var(--soft); }
.side__more { border-top: 1px solid var(--line); }
.side__more summary { padding: 13px 0; font-weight: 700; font-size: 14.5px; cursor: pointer; list-style: none; display: flex; justify-content: space-between; }
.side__more summary::-webkit-details-marker { display: none; }
.side__more summary::after { content: '+'; color: var(--soft); font-weight: 400; }
.side__more[open] summary::after { content: '–'; }
.price { margin: 0 0 8px; padding: 0; list-style: none; }
.price li { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; font-size: 14.5px; border-bottom: 1px dotted var(--line); }
.price b { font-weight: 600; white-space: nowrap; }
.side__small { margin: 8px 0 14px; font-size: 13px; color: var(--soft); }
.info { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 6px 12px; margin: 0 0 14px; font-size: 14px; }
.info dt { color: var(--soft); } .info dd { margin: 0; }
.side__owner { display: block; margin: 6px 0 14px; padding: 12px 16px; border-top: 1px solid var(--line); border-radius: 0; font-weight: 700; color: var(--teal); text-decoration: none; padding-left: 0; }
.side__owner:hover { text-decoration: underline; }
.maker { margin: 0; padding: 14px 16px; border-radius: 12px; background: #E8E5DA; font-size: 13px; color: var(--soft); }
.maker b { color: var(--ink); }

/* 아바타 */
.ava { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 12px; background: var(--teal); color: var(--sun); }
.ava svg { width: 24px; height: 24px; }
.ava--lg { width: 54px; height: 54px; border-radius: 18px; }
.ava--lg svg { width: 36px; height: 36px; }
.msg--bot .ava { background: var(--teal) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'%3E%3Cpath d='M7 24c5-8 9-8 13 0s8 8 13 0' fill='none' stroke='%23F0C25A' stroke-width='2.6' stroke-linecap='round'/%3E%3Ccircle cx='27' cy='13' r='3.4' fill='%23F0C25A'/%3E%3C/svg%3E") center / 24px no-repeat; }

/* 대화창 */
.chat { display: flex; flex-direction: column; border-radius: 22px; background: var(--room); box-shadow: 0 0 0 1px var(--line), 0 30px 60px -40px rgba(34,48,44,.5); overflow: hidden; }
.chat__top { display: flex; align-items: center; gap: 10px; padding: 12px 16px; background: rgba(255,255,255,.55); border-bottom: 1px solid var(--line); }
.chat__top b { display: block; font-family: var(--round); font-weight: 400; font-size: 16px; line-height: 1.2; }
.chat__top span:not(.ava) { font-size: 12px; color: var(--soft); }
.chat__restart { margin-left: auto; padding: 6px 12px; border: 1px solid var(--line); border-radius: 99px; background: var(--white); font-size: 13px; cursor: pointer; }
.log { display: flex; flex-direction: column; gap: 10px; padding: 18px 16px 12px; }
.msg { display: flex; align-items: flex-end; gap: 8px; max-width: 88%; animation: up .22s ease-out; }
@keyframes up { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.msg--bot + .msg--bot .ava { visibility: hidden; }
.bub { padding: 10px 14px; border-radius: 18px; font-family: var(--round); font-size: 15.5px; line-height: 1.55; }
.msg--bot .bub { background: var(--white); border-bottom-left-radius: 6px; }
.msg--me { align-self: flex-end; flex-direction: column; align-items: flex-end; gap: 2px; }
.msg--me .bub { background: var(--teal); color: #F4F7F2; border-bottom-right-radius: 6px; }
.edit { padding: 0 4px; border: 0; background: none; font-size: 12px; color: var(--soft); text-decoration: underline; cursor: pointer; }
.msg--card { max-width: 92%; }
.msg--card .bub { width: 100%; padding: 14px 16px; font-family: var(--sans); }
.msg--warn .bub { background: var(--warn); color: #6B3A12; }
.sum { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 4px 10px; margin: 0; font-size: 14.5px; }
.sum dt { color: var(--soft); font-size: 13px; padding-top: 1px; } .sum dd { margin: 0; font-weight: 600; }
.bub__q { margin: 10px 0 0; padding-top: 10px; border-top: 1px dashed var(--line); font-family: var(--round); }
.badge { display: inline-block; margin-bottom: 10px; padding: 3px 10px; border-radius: 99px; background: #FBEFC8; color: #6A4D10; font-size: 12.5px; font-weight: 700; }
.bub__small { margin: 10px 0 8px; font-size: 13px; color: var(--soft); }
.bub__link { display: inline-block; font-weight: 700; color: var(--teal); }

/* 답하기 칸 */
.dock { padding: 12px 14px 14px; border-top: 1px solid var(--line); background: rgba(255,255,255,.7); }
.opts { display: flex; flex-wrap: wrap; gap: 8px; }
.opt { display: inline-flex; flex-direction: column; align-items: flex-start; padding: 9px 14px; border: 1.5px solid var(--teal-2); border-radius: 16px; background: var(--white); color: var(--teal); text-align: left; text-decoration: none; cursor: pointer; }
.opt:hover { background: #EEF4EF; }
.opt b { font-weight: 700; font-size: 14.5px; }
.opt i { font-style: normal; font-size: 12.5px; color: var(--soft); }
.opt--go { background: var(--teal); color: #fff; border-color: var(--teal); }
.opt--go:hover { background: var(--ink); }
.opts--days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.opt--day { align-items: center; padding: 7px 2px; border-radius: 12px; text-align: center; }
.opt--day b { font-size: 13px; }
.opt--day i { font-size: 11px; }
.opt.is-off { border-color: transparent; background: rgba(255,255,255,.45); color: #9AA59F; cursor: default; }
.opts--times { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.opt--time { align-items: center; padding: 8px 2px; border-radius: 12px; }
.opt--time i { font-size: 11px; }
.opt--taken { border-color: transparent; background: #C9D3CB; color: #66746D; cursor: default; }
.opt--taken b { text-decoration: line-through; }
.opt--blocked { border: 1.5px dashed #A9B6AE; background: transparent; color: #7C8A83; cursor: default; }
.opt--past { border-color: transparent; background: transparent; color: #A2ACA6; cursor: default; }
.key { display: flex; flex-wrap: wrap; gap: 4px 12px; margin: 10px 0 0; font-size: 12px; color: var(--soft); }
.k { display: inline-block; width: 10px; height: 10px; margin-right: 4px; border-radius: 3px; vertical-align: -1px; }
.k--open { border: 1.5px solid var(--teal-2); background: #fff; } .k--taken { background: #C9D3CB; } .k--blocked { border: 1.5px dashed #A9B6AE; } .k--past { background: #E8EDE9; }
.say { display: flex; gap: 8px; margin-top: 8px; }
.opts + .say { margin-top: 10px; }
.say input { flex: 1; min-width: 0; padding: 12px 16px; border: 1.5px solid var(--line); border-radius: 99px; background: var(--white); font: inherit; color: inherit; }
.say input:focus { outline: none; border-color: var(--teal-2); }
.say button { flex: none; padding: 0 18px; border: 0; border-radius: 99px; background: var(--teal); color: #fff; font-weight: 700; cursor: pointer; }

@media (min-width: 901px) {
  .chat { height: calc(100vh - 160px); min-height: 600px; max-height: 860px; }
  .log { flex: 1; overflow-y: auto; }
}
@media (max-width: 900px) {
  .page { grid-template-columns: minmax(0, 1fr); gap: 0; padding: 0; }
  .side { position: static; padding: 18px 16px 14px; }
  .side__lead { margin: 12px 0 10px; font-size: 14.5px; }
  .side__more, .side__owner { display: none; }
  .chat { border-radius: 0; box-shadow: none; border-top: 1px solid var(--line); min-height: min(70vh, 640px); }
  .log { flex: 1; }
  .chat__top { position: sticky; top: 0; z-index: 2; }
  .dock { position: sticky; bottom: 0; z-index: 2; background: rgba(247,248,243,.96); backdrop-filter: blur(6px); }
  .maker { display: none; }
  .side--foot { display: block; }
}
@media (max-width: 560px) {
  .side h1 { font-size: 21px; }
  .ava--lg { width: 46px; height: 46px; border-radius: 15px; }
  .msg { max-width: 92%; }
  .opts--times { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .opts--days { gap: 4px; }
  .opt--day { padding: 6px 0; }
  .opt--day b { font-size: 12px; }
}
.foot { display: none; }
@media (max-width: 900px) {
  .foot { display: block; padding: 18px 16px 28px; border-top: 1px solid var(--line); font-size: 13.5px; color: var(--soft); }
  .foot dl { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 4px 12px; margin: 0 0 14px; }
  .foot dd { margin: 0; color: var(--ink); }
  .foot a.owner { display: inline-block; margin-bottom: 12px; font-weight: 700; color: var(--teal); }
  .foot p { margin: 0; padding: 12px 14px; border-radius: 10px; background: #E8E5DA; font-size: 13px; }
}
