@import url('https://fonts.googleapis.com/css2?family=Jua&display=swap');
/* 랜딩 → 채팅 이음(대표 11-10 "B안 밝게"): 랜딩(/defense, 밤 남색·Jua·하늘색 단추)에서 "바로 시작하기"를 누르면 딴 사이트처럼 보이던 것.
   채팅 바탕은 밝은 종이 그대로 두고 네 가지만 랜딩과 맞춘다: ①맨 위 머리줄 남색 ②검정 단추·선 → 남색(+하늘색 밑줄) ③모서리 둥글게 ④제목·코치 이름 Jua, 첫 화면에만 밤→아침 띠.
   시안: docs/design/bridge-1110/index.html. 이 파일과 index.html 의 link 한 줄을 빼면 옛 모습으로 돌아간다. 랜딩은 건드리지 않는다. */
:root:root:root,html body,html body.beta{
  --accent:#111111;--accent-ink:#ffffff;--on-accent:#ffffff;--bubble:#e6e6e6;--sky:#111111;--cyan:#111111;--sig:#111111;
  --night:#111111;--night-ink:#ffffff;--glow:#111111;
  --jua:'Jua','Noto Sans KR','Apple SD Gothic Neo',sans-serif}
html body ::selection{background:#111111;color:#ffffff}

/* ① 머리줄: 랜딩 남색 */
html .sh-bar{background:#111111;color:#ffffff;border-bottom:0}
html .sh-bar .sh-burger{color:#ffffff;border-radius:12px}
html .sh-bar .sh-brand,html .sh-bar .sh-who{font-family:var(--jua);font-weight:400;font-size:18px;color:#ffffff}
html .sh-bar .sh-who img{border:2px solid rgba(255,255,255,.22)}
html .sh-bar .sh-pastbtn{border:1px solid rgba(255,255,255,.25);background:rgba(255,255,255,.06);color:#ffffff;border-radius:12px}
@media (max-height:480px){html.sh-chat:not(.sh3) .sh-bar{background:none}html.sh-chat:not(.sh3) .sh-burger{background:#111111;border:1px solid #111111;color:#ffffff}}

/* ② 단추·선: 검정 → 남색, 보내기에는 하늘색 밑줄 */
html body #send{background:#111111;color:#ffffff;box-shadow:inset 0 -3px 0 #111111}
html body #send:disabled{box-shadow:none}

/* ③ 모서리 */
html body #send,html body #input,html body #pbtn,html body.beta.fresh textarea,html body.beta.fresh form button{border-radius:14px}
html body .chips button,html body .xchips button,html body .bquick button,html body #qchip,html body #pchip{border-radius:14px}
html body .msg.user>div{border-radius:14px 14px 4px 14px}
html body.beta .msg.bot{border-radius:14px 14px 14px 4px}
html body .lcard{border-radius:12px;border-top-color:#111111}
html body .lcard .lc-q{border-radius:0 8px 8px 0}

/* ④ 제목·코치 이름: 랜딩과 같은 Jua. 답 본문은 그대로 */
html body.beta h1,html body.explore h1,html body .empty.landing h1,html body .bwho b,html body .lcard .lc-title{font-family:var(--jua)!important;font-weight:400!important}
html body .bwho b{font-size:16px}
html body .lcard .lc-title{font-size:18px}

/* 첫 화면에만 밤→아침 띠: 랜딩의 밤 도시가 위에서 크림색으로 밝아진다. 대화가 시작되면(.fresh 가 빠지면) 사라진다. 낮은 화면에서는 뺀다 */
@media (min-height:560px){
  html.sh-chat:not(.sh3) body.explore.fresh::before{content:"";position:fixed;left:0;right:0;top:0;height:min(26vh,210px);z-index:0;pointer-events:none;
    background:linear-gradient(180deg,rgba(0,0,0,.0) 0%,rgba(0,0,0,.0) 40%,rgba(246,243,234,.8) 80%,#f6f3ea 100%),url(/img/defense/fleet.jpg) 38% 100%/auto 330% no-repeat}
  html.sh-chat:not(.sh3) body.explore.fresh>main,html.sh-chat:not(.sh3) body.explore.fresh>footer{position:relative;z-index:1}
  /* 제목이 그림 위에 겹쳐 안 읽히지 않게, 첫 화면 글을 띠 아래에서 시작한다 */
  html.sh-chat:not(.sh3) body.explore.fresh .empty.landing{padding-top:min(15vh,120px)}
}

/* 첫 화면 예시 단추 모서리(.xchips 는 화면 안 규칙이 더 세서 따로) */
html body .empty .xchips button{border-radius:14px!important}

/* ── 코치가 살아 있는 느낌(대표 11-10 "캐릭터가 좀 움직이거나 활동감 있게, 실제 코치처럼") ──
   그림은 그대로 두고 움직임만: ①답이 뜰 때 얼굴이 톡 나타남 ②맨 아래 답의 얼굴은 천천히 숨쉬듯 ③답을 쓰는 동안 머리줄 얼굴이 끄덕이고 하늘색 빛이 퍼짐 ④"…하는 중" 글 뒤에 점 세 개가 깜박임.
   폰에서 '움직임 줄이기'를 켠 사람에게는 전부 끈다. */
@keyframes br-pop{0%{transform:scale(.55) rotate(-10deg);opacity:0}70%{transform:scale(1.08) rotate(2deg);opacity:1}100%{transform:none;opacity:1}}
@keyframes br-breathe{0%,100%{transform:translateY(0) scale(1)}50%{transform:translateY(-2px) scale(1.035)}}
@keyframes br-nod{0%,100%{transform:rotate(0) translateY(0)}25%{transform:rotate(-7deg) translateY(-1px)}60%{transform:rotate(6deg) translateY(1px)}}
@keyframes br-ring{0%{box-shadow:0 0 0 0 rgba(17,17,17,.75)}100%{box-shadow:0 0 0 11px rgba(17,17,17,0)}}
@keyframes br-dots{0%{content:""}25%{content:" ·"}50%{content:" · ·"}75%,100%{content:" · · ·"}}
@media (prefers-reduced-motion:no-preference){
  html body .msg.bot .bwho img{animation:br-pop .45s cubic-bezier(.2,.9,.3,1.2) both;transform-origin:50% 80%}
  html body .thread>.msg.bot:last-child .bwho img{animation:br-pop .45s cubic-bezier(.2,.9,.3,1.2) both,br-breathe 3.4s ease-in-out .5s infinite}
  html:has(.thread .status) .sh-bar .sh-who img{animation:br-nod 1.1s ease-in-out infinite,br-ring 1.4s ease-out infinite;border-color:#111111}
  html body .thread .status::after{content:"";animation:br-dots 1.4s steps(1,end) infinite}
}
html:has(.thread .status) .sh-bar .sh-who img{border-color:#111111}

/* ── 코치 표정(대표 11-10 "Yes, make them"): 상태에 따라 얼굴 그림을 바꾼다. 그림은 public/img/coach/face/<이름>-think|talk|smile.jpg (codex 그림 생성, 원본 캐릭터 참고).
   준비 중("…하는 중" 글이 떠 있을 때) = 생각하는 얼굴, 답 글이 나오는 중(보내기 단추가 잠겨 있고 "…중" 글이 없을 때) = 말하는 얼굴, 끝난 뒤 맨 아래 답 = 웃는 얼굴. 지난 답들은 원래 얼굴. */
html:has(.thread .status) .sh-bar .sh-who img[src$="/jeongsu.jpg"],html:has(.thread .status) body .thread>.msg.bot:last-child .bwho img[src$="/jeongsu.jpg"]{content:url(/img/coach/face/jeongsu-think.jpg)}
html:has(#send:disabled):not(:has(.thread .status)) .sh-bar .sh-who img[src$="/jeongsu.jpg"],html:has(#send:disabled):not(:has(.thread .status)) body .thread>.msg.bot:last-child .bwho img[src$="/jeongsu.jpg"]{content:url(/img/coach/face/jeongsu-talk.jpg)}
html:not(:has(#send:disabled)) body .thread>.msg.bot:last-child .bwho img[src$="/jeongsu.jpg"]{content:url(/img/coach/face/jeongsu-smile.jpg)}
html:has(.thread .status) .sh-bar .sh-who img[src$="/narae.jpg"],html:has(.thread .status) body .thread>.msg.bot:last-child .bwho img[src$="/narae.jpg"]{content:url(/img/coach/face/narae-think.jpg)}
html:has(#send:disabled):not(:has(.thread .status)) .sh-bar .sh-who img[src$="/narae.jpg"],html:has(#send:disabled):not(:has(.thread .status)) body .thread>.msg.bot:last-child .bwho img[src$="/narae.jpg"]{content:url(/img/coach/face/narae-talk.jpg)}
html:not(:has(#send:disabled)) body .thread>.msg.bot:last-child .bwho img[src$="/narae.jpg"]{content:url(/img/coach/face/narae-smile.jpg)}
html:has(.thread .status) .sh-bar .sh-who img[src$="/obok.jpg"],html:has(.thread .status) body .thread>.msg.bot:last-child .bwho img[src$="/obok.jpg"]{content:url(/img/coach/face/obok-think.jpg)}
html:has(#send:disabled):not(:has(.thread .status)) .sh-bar .sh-who img[src$="/obok.jpg"],html:has(#send:disabled):not(:has(.thread .status)) body .thread>.msg.bot:last-child .bwho img[src$="/obok.jpg"]{content:url(/img/coach/face/obok-talk.jpg)}
html:not(:has(#send:disabled)) body .thread>.msg.bot:last-child .bwho img[src$="/obok.jpg"]{content:url(/img/coach/face/obok-smile.jpg)}
html:has(.thread .status) .sh-bar .sh-who img[src$="/dudu.jpg"],html:has(.thread .status) body .thread>.msg.bot:last-child .bwho img[src$="/dudu.jpg"]{content:url(/img/coach/face/dudu-think.jpg)}
html:has(#send:disabled):not(:has(.thread .status)) .sh-bar .sh-who img[src$="/dudu.jpg"],html:has(#send:disabled):not(:has(.thread .status)) body .thread>.msg.bot:last-child .bwho img[src$="/dudu.jpg"]{content:url(/img/coach/face/dudu-talk.jpg)}
html:not(:has(#send:disabled)) body .thread>.msg.bot:last-child .bwho img[src$="/dudu.jpg"]{content:url(/img/coach/face/dudu-smile.jpg)}
html:has(.thread .status) .sh-bar .sh-who img[src$="/deokbae.jpg"],html:has(.thread .status) body .thread>.msg.bot:last-child .bwho img[src$="/deokbae.jpg"]{content:url(/img/coach/face/deokbae-think.jpg)}
html:has(#send:disabled):not(:has(.thread .status)) .sh-bar .sh-who img[src$="/deokbae.jpg"],html:has(#send:disabled):not(:has(.thread .status)) body .thread>.msg.bot:last-child .bwho img[src$="/deokbae.jpg"]{content:url(/img/coach/face/deokbae-talk.jpg)}
html:not(:has(#send:disabled)) body .thread>.msg.bot:last-child .bwho img[src$="/deokbae.jpg"]{content:url(/img/coach/face/deokbae-smile.jpg)}
html:has(.thread .status) .sh-bar .sh-who img[src$="/kangsan.jpg"],html:has(.thread .status) body .thread>.msg.bot:last-child .bwho img[src$="/kangsan.jpg"]{content:url(/img/coach/face/kangsan-think.jpg)}
html:has(#send:disabled):not(:has(.thread .status)) .sh-bar .sh-who img[src$="/kangsan.jpg"],html:has(#send:disabled):not(:has(.thread .status)) body .thread>.msg.bot:last-child .bwho img[src$="/kangsan.jpg"]{content:url(/img/coach/face/kangsan-talk.jpg)}
html:not(:has(#send:disabled)) body .thread>.msg.bot:last-child .bwho img[src$="/kangsan.jpg"]{content:url(/img/coach/face/kangsan-smile.jpg)}
html:has(.thread .status) .sh-bar .sh-who img[src$="/ttuksim.jpg"],html:has(.thread .status) body .thread>.msg.bot:last-child .bwho img[src$="/ttuksim.jpg"]{content:url(/img/coach/face/ttuksim-think.jpg)}
html:has(#send:disabled):not(:has(.thread .status)) .sh-bar .sh-who img[src$="/ttuksim.jpg"],html:has(#send:disabled):not(:has(.thread .status)) body .thread>.msg.bot:last-child .bwho img[src$="/ttuksim.jpg"]{content:url(/img/coach/face/ttuksim-talk.jpg)}
html:not(:has(#send:disabled)) body .thread>.msg.bot:last-child .bwho img[src$="/ttuksim.jpg"]{content:url(/img/coach/face/ttuksim-smile.jpg)}
html:has(.thread .status) .sh-bar .sh-who img[src$="/dodam.jpg"],html:has(.thread .status) body .thread>.msg.bot:last-child .bwho img[src$="/dodam.jpg"]{content:url(/img/coach/face/dodam-think.jpg)}
html:has(#send:disabled):not(:has(.thread .status)) .sh-bar .sh-who img[src$="/dodam.jpg"],html:has(#send:disabled):not(:has(.thread .status)) body .thread>.msg.bot:last-child .bwho img[src$="/dodam.jpg"]{content:url(/img/coach/face/dodam-talk.jpg)}
html:not(:has(#send:disabled)) body .thread>.msg.bot:last-child .bwho img[src$="/dodam.jpg"]{content:url(/img/coach/face/dodam-smile.jpg)}
/* 말하는 동안에는 머리줄 얼굴이 살짝 들썩인다 */
@media (prefers-reduced-motion:no-preference){html:has(#send:disabled):not(:has(.thread .status)) .sh-bar .sh-who img{animation:br-breathe .7s ease-in-out infinite;border-color:#111111}}

/* ── 얼굴 크게(대표 11-10 "얼굴을 더 크게 해줘"): 채팅 속 얼굴 38px 은 표정이 안 보였다.
   지난 답은 46px, 지금(맨 아래) 답은 얼굴을 말풍선 안 맨 위로 올려 72px, 답을 준비하는 동안은 96px. 맨 아래 답은 왼쪽 여백을 없애 글 칸도 넓어진다. 머리줄 얼굴 40px. */
html .sh-bar .sh-who img{width:40px;height:40px}
html body .thread>.msg.bot:has(.bwho){margin-left:54px}
html body .thread>.msg.bot .bwho img{width:46px;height:46px;left:-54px}
html body .thread>.msg.bot:last-child:has(.bwho){margin-left:0}
html body .thread>.msg.bot:last-child .bwho{align-items:center;gap:12px;margin-bottom:8px}
html body .thread>.msg.bot:last-child .bwho img{position:static;flex:none;width:72px;height:72px;border:2px solid #111111;box-shadow:0 0 0 3px rgba(17,17,17,.35);transition:width .25s ease,height .25s ease}
html body .thread>.msg.bot:last-child .bwho b{font-size:19px}
html:has(.thread .status) body .thread>.msg.bot:last-child .bwho img{width:96px;height:96px}
