/* ============================================================
   ArchiTalk OVERHAUL — 비침습 오버레이 스타일
   ★모든 위젯은 position:fixed 오버레이. 기존 .app/.cols/.chat 레이아웃에 0 영향.
   라이트 샌드(#F5F3EE) + 스페이스 그레이.
   ============================================================ */
:root{
  --ah-sand:#F5F3EE; --ah-ink:#1A1A1A; --ah-slate:#64748B;
  --ah-line:#E2DED5; --ah-accent:#4A5568; --ah-navy:#1E3A8A;
  --ah-mist:#FAFAFA; --ah-glow:rgba(30,58,138,.45);
  --ah-font:"Pretendard","Apple SD Gothic Neo","Malgun Gothic",-apple-system,sans-serif;
}

/* ---- 파이프라인 맵: 상단 fixed, 평소 숨김(작업 중에만 내려옴) ---- */
.ah-pipe{
  position:fixed; top:0; left:0; right:0; z-index:60;
  background:rgba(245,243,238,.96); backdrop-filter:blur(10px);
  border-bottom:1px solid var(--ah-line); padding:10px 16px 8px;
  font-family:var(--ah-font); box-shadow:0 4px 20px rgba(0,0,0,.06);
  transform:translateY(-110%); transition:transform .4s cubic-bezier(.2,.7,.2,1);
}
.ah-pipe.show{ transform:translateY(0); }
.ah-pipe-inner{ display:flex; align-items:center; justify-content:center; gap:6px; flex-wrap:wrap; }
.ah-node{ display:flex; flex-direction:column; align-items:center; gap:4px; min-width:78px;
  padding:6px 10px; border-radius:13px; background:#fff; border:1.5px solid var(--ah-line);
  transition:.35s cubic-bezier(.2,.7,.2,1); }
.ah-node-ic{ width:30px; height:30px; border-radius:9px; display:grid; place-items:center; font-size:15px;
  background:var(--ah-mist); border:1px solid var(--ah-line); transition:.35s; }
.ah-node-lb{ font-size:11px; color:var(--ah-slate); font-weight:600; letter-spacing:-.02em; white-space:nowrap; }
.ah-node.active{ border-color:var(--ah-navy); box-shadow:0 0 0 3px var(--ah-glow); transform:translateY(-2px); }
.ah-node.active .ah-node-ic{ background:var(--ah-navy); color:#fff; animation:ah-pulse 1.3s infinite; }
.ah-node.active .ah-node-lb{ color:var(--ah-navy); }
.ah-node.done{ border-color:#1f9d57; }
.ah-node.done .ah-node-ic{ background:#1f9d57; color:#fff; }
.ah-node.done .ah-node-lb{ color:#1f9d57; }
@keyframes ah-pulse{ 0%,100%{ box-shadow:0 0 0 0 var(--ah-glow);} 50%{ box-shadow:0 0 0 8px rgba(30,58,138,0);} }
.ah-conn{ width:28px; height:2px; background:var(--ah-line); position:relative; overflow:hidden; border-radius:2px; }
.ah-conn i{ position:absolute; inset:0; width:40%; background:var(--ah-navy); border-radius:2px; animation:ah-flow 1.6s linear infinite; opacity:.55; }
@keyframes ah-flow{ from{ transform:translateX(-100%);} to{ transform:translateX(250%);} }
.ah-gauge{ height:4px; background:var(--ah-line); border-radius:99px; margin:9px auto 0; max-width:620px; overflow:hidden; }
.ah-gauge-fill{ height:100%; width:0%; border-radius:99px;
  background:linear-gradient(90deg,var(--ah-navy),#3b82f6); transition:width .6s cubic-bezier(.2,.7,.2,1); }

/* ---- 우측 오버레이 공통(무드보드/피드/퀵액션): 평소 숨김 ---- */
.ah-overlay-r{
  position:fixed; right:14px; width:248px; z-index:55;
  background:#fff; border:1px solid var(--ah-line); border-radius:16px; padding:12px;
  font-family:var(--ah-font); box-shadow:0 12px 40px rgba(0,0,0,.13);
  opacity:0; transform:translateX(16px); pointer-events:none;
  transition:opacity .35s, transform .35s;
}
.ah-overlay-r.show{ opacity:1; transform:none; pointer-events:auto; }
.ah-mood{ top:90px; max-height:38vh; overflow:auto; }
.ah-feed{ top:calc(90px + 40vh); max-height:30vh; overflow:auto; }
.ah-quick{ bottom:96px; }

/* 무드보드 */
.ah-mood-h{ font-size:13px; font-weight:700; color:var(--ah-ink); margin-bottom:10px; letter-spacing:-.02em; }
.ah-mood-h span{ font-size:10px; color:#1f9d57; background:#e8f6ee; padding:2px 7px; border-radius:99px; margin-left:6px; font-weight:600; }
.ah-mood-grid{ display:grid; grid-template-columns:repeat(3,1fr); gap:6px; min-height:20px; }
.ah-mood-tile{ aspect-ratio:1; border-radius:10px; overflow:hidden; background:var(--ah-mist); border:1px solid var(--ah-line);
  opacity:0; transform:scale(.94); transition:opacity .5s, transform .5s; }
.ah-mood-tile.on{ opacity:1; transform:scale(1); }
.ah-mood-tile img{ width:100%; height:100%; object-fit:cover; }

/* 슬라이드 피드 */
.ah-feed-h{ font-size:13px; font-weight:700; color:var(--ah-ink); margin-bottom:10px; letter-spacing:-.02em; }
.ah-feed-grid{ display:flex; flex-direction:column; gap:6px; }
.ah-feed-card{ display:flex; align-items:center; gap:10px; padding:8px 11px; border-radius:10px;
  background:var(--ah-mist); border:1px solid var(--ah-line); opacity:0; transform:translateX(-8px); transition:.4s; }
.ah-feed-card.on{ opacity:1; transform:none; }
.ah-feed-idx{ font-family:"Consolas",monospace; font-size:12px; font-weight:700; color:#fff; background:var(--ah-accent);
  width:24px; height:24px; border-radius:7px; display:grid; place-items:center; flex:none; }
.ah-feed-tt{ font-size:12.5px; color:var(--ah-ink); font-weight:600; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }

/* PPT 빠른 수정 */
.ah-quick-h{ display:flex; align-items:center; justify-content:space-between; font-size:13px; font-weight:700; color:var(--ah-ink); margin-bottom:10px; }
.ah-quick-x{ border:none; background:none; cursor:pointer; color:var(--ah-slate); font-size:14px; }
.ah-quick-row{ display:flex; flex-wrap:wrap; gap:7px; }
.ah-quick-row button{ border:1.5px solid var(--ah-line); background:#fff; color:var(--ah-accent);
  padding:7px 12px; border-radius:99px; font-size:12.5px; font-weight:600; cursor:pointer; font-family:inherit; transition:.15s; }
.ah-quick-row button:hover{ border-color:var(--ah-navy); color:var(--ah-navy); transform:translateY(-1px); }
.ah-quick-row button:disabled{ opacity:.5; cursor:not-allowed; }
.ah-quick-note{ font-size:11px; color:var(--ah-slate); margin-top:9px; line-height:1.4; }

/* ---- 승인 팝업 ---- */
.ah-approve-scrim{ position:fixed; inset:0; background:rgba(15,23,42,.5); backdrop-filter:blur(4px);
  display:grid; place-items:center; z-index:120; animation:ah-fade .2s; }
@keyframes ah-fade{ from{opacity:0} to{opacity:1} }
.ah-approve{ background:#fff; border-radius:20px; padding:26px; max-width:420px; width:90%;
  font-family:var(--ah-font); box-shadow:0 20px 60px rgba(0,0,0,.25); animation:ah-rise .3s cubic-bezier(.2,.7,.2,1); }
@keyframes ah-rise{ from{opacity:0;transform:translateY(12px)} to{opacity:1;transform:none} }
.ah-approve-h{ font-size:18px; font-weight:800; color:var(--ah-navy); margin-bottom:10px; }
.ah-approve-d{ font-size:14px; color:var(--ah-slate); line-height:1.6; margin:0 0 20px; }
.ah-approve-row{ display:flex; gap:10px; justify-content:flex-end; }
.ah-btn-main{ background:var(--ah-navy); color:#fff; border:none; border-radius:11px; padding:11px 18px; font-size:14px; font-weight:700; cursor:pointer; font-family:inherit; transition:.15s; }
.ah-btn-main:hover{ background:#162d6e; transform:translateY(-1px); }
.ah-btn-ghost{ background:#fff; color:var(--ah-slate); border:1.5px solid var(--ah-line); border-radius:11px; padding:11px 18px; font-size:14px; font-weight:700; cursor:pointer; font-family:inherit; transition:.15s; }
.ah-btn-ghost:hover{ border-color:var(--ah-ink); color:var(--ah-ink); }

/* ---- 토스트 ---- */
.ah-toast{ position:fixed; bottom:24px; left:50%; transform:translateX(-50%) translateY(20px);
  background:var(--ah-ink); color:#fff; padding:12px 20px; border-radius:12px; font-size:14px; font-family:var(--ah-font);
  z-index:200; opacity:0; transition:.3s; box-shadow:0 8px 30px rgba(0,0,0,.3); max-width:88%; }
.ah-toast.on{ opacity:1; transform:translateX(-50%) translateY(0); }
.ah-toast a{ color:#9cc4ff; font-weight:700; }

/* 파이프맵이 내려와 있을 때 채팅 상단이 가리지 않도록 본문을 살짝 밀어줌(스크롤 보호) */
body.ah-pipe-on .chat{ scroll-padding-top:88px; }

/* ---- 모바일: 우측 오버레이 숨김(채팅 공간 보호) + 파이프라인 1줄 고정 ---- */
@media(max-width:1100px){
  .ah-overlay-r{ display:none !important; }
  .ah-pipe{ padding:7px 8px 6px; }
  .ah-pipe-inner{ flex-wrap:nowrap; gap:2px; overflow-x:auto; }   /* 절대 2줄 안 되게 */
  .ah-node{ min-width:0; flex:0 0 auto; padding:4px 5px; border-radius:10px; }
  .ah-node-lb{ display:none; }                /* 모바일은 아이콘만 → 5개가 한 줄 */
  .ah-node-ic{ width:30px; height:30px; font-size:15px; }
  .ah-conn{ width:8px; }
  .ah-gauge{ margin-top:6px; max-width:none; }
}
