:root{
  --cream:#fdf6ec;
  --cream2:#fffaf2;
  --paper:#fffdf9;
  --ink:#3d3027;
  --ink2:#7a6555;
  --ink3:#a08a76;
  --line:#ecddc9;
  --line2:#f4e8d7;
  --saffron:#f0a92c;
  --saffron-d:#d88c14;
  --brown:#8a6a4f;
  --ok:#2f9e74;
  --ok-bg:#e7f6ee;
  --warn:#d2822f;
  --warn-bg:#fdf0dd;
  --idea:#7b6bd6;
  --idea-bg:#eeebfd;
  --shoot:#e2698d;
  --check:#3f9fd6;
  --money:#c08a2e;
  --pet:#6aa85a;
  --r:20px;
  --shadow:0 12px 34px rgba(133,98,62,.10);
  --shadow-s:0 6px 16px rgba(133,98,62,.08);
}

*{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{
  margin:0;
  color:var(--ink);
  background:
    radial-gradient(1100px 520px at 8% -12%, #fff7e7 0%, rgba(255,247,231,0) 62%),
    radial-gradient(900px 520px at 96% -6%, #fdeee2 0%, rgba(253,238,226,0) 58%),
    linear-gradient(180deg,#fdf9f1 0%, #f8edde 100%);
  background-attachment:fixed;
  font-family:"Pretendard Variable",Pretendard,-apple-system,BlinkMacSystemFont,"Apple SD Gothic Neo","Noto Sans KR","Malgun Gothic",system-ui,sans-serif;
  font-size:15px;
  line-height:1.5;
  -webkit-font-smoothing:antialiased;
  min-height:100vh;
}
h1,h2,h3,p,ul{margin:0}
ul{padding:0;list-style:none}
a{color:inherit}
button{font:inherit}

.app{
  max-width:1440px;
  margin:0 auto;
  padding:14px 16px 40px;
  padding-bottom:max(40px, env(safe-area-inset-bottom));
}

/* ---------------- top bar ---------------- */
.topbar{
  position:sticky; top:8px; z-index:40;
  display:flex; align-items:center; gap:14px; flex-wrap:wrap;
  padding:10px 14px;
  background:rgba(255,251,244,.9);
  -webkit-backdrop-filter:blur(14px); backdrop-filter:blur(14px);
  border:1px solid var(--line);
  border-radius:22px;
  box-shadow:0 10px 28px rgba(140,104,66,.10);
}
.brand{display:flex; align-items:center; gap:10px; min-width:0}
.brandMark{width:42px; height:42px; flex:0 0 auto}
.brandMark svg{width:100%; height:100%; display:block; filter:drop-shadow(0 4px 8px rgba(200,150,60,.18))}
.brandTitle{font-weight:900; font-size:17px; letter-spacing:-.4px; white-space:nowrap}
.brandSub{font-size:11.5px; color:var(--ink2); display:flex; align-items:center; gap:6px; white-space:nowrap}
.chip.mini{font-size:10px; padding:1px 7px}

.tabs{display:flex; gap:4px; flex:1 1 auto; justify-content:center; overflow-x:auto; scrollbar-width:none; padding:2px}
.tabs::-webkit-scrollbar{display:none}
.tab{
  border:1px solid transparent; background:transparent; color:var(--ink2);
  padding:9px 13px; border-radius:14px; font-weight:800; font-size:13.5px;
  cursor:pointer; white-space:nowrap; transition:.18s;
}
.tab:hover{background:#fff3df; color:var(--ink)}
.tab[aria-selected="true"]{
  background:linear-gradient(180deg,#f9c85f,#efa021);
  color:#472b06; border-color:#e79a20;
  box-shadow:0 8px 16px rgba(240,160,40,.30);
}

.statusCluster{display:flex; align-items:center; gap:6px; flex-wrap:wrap; justify-content:flex-end}
.avatarStack{display:flex; padding-left:6px}
.avatarStack .av{
  width:24px; height:24px; border-radius:50%; margin-left:-6px;
  border:2px solid #fffaf2; background:#fff; display:grid; place-items:center;
  font-size:11px; box-shadow:0 2px 6px rgba(120,90,60,.16);
}
.chip{
  display:inline-flex; align-items:center; gap:5px;
  border:1px solid var(--line); background:#fff; color:var(--ink2);
  border-radius:999px; padding:5px 10px; font-size:11.5px; font-weight:700;
  cursor:default; text-decoration:none; white-space:nowrap;
}
button.chip{cursor:pointer}
.chip.on{background:var(--ok-bg); border-color:#cceadb; color:#237a58}
.chip.on b{color:#1c6b4c}
.chip.notion{background:#eef0fe; border-color:#dcdefb; color:#4b52a8}
.chip.notion:hover{background:#e4e7fd}
.led{width:7px; height:7px; border-radius:50%; background:var(--ok); box-shadow:0 0 0 3px rgba(47,158,116,.16)}
.chip.offline{background:#fdecec; border-color:#f7d5d5; color:#b04a4a}
.chip.offline .led{background:#d05252; box-shadow:0 0 0 3px rgba(208,82,82,.16)}
.chip.alert{animation:pulse 2.4s infinite}
@keyframes pulse{0%,100%{box-shadow:0 0 0 0 rgba(47,158,116,0)}50%{box-shadow:0 0 0 5px rgba(47,158,116,.10)}}

/* ---------------- layout ---------------- */
main{margin-top:16px}
.panel{display:none; animation:fadeUp .26s ease}
.panel.is-active{display:block}
@keyframes fadeUp{from{opacity:0; transform:translateY(6px)}to{opacity:1; transform:none}}

.sectionHead{display:flex; align-items:flex-end; justify-content:space-between; gap:12px; flex-wrap:wrap; margin:2px 2px 12px}
.sectionHead h1{font-size:21px; letter-spacing:-.5px; font-weight:900}
.sectionHead p{font-size:13px; color:var(--ink2); margin-top:3px}
.sectionHead p b{color:var(--ink)}
.headPills{display:flex; gap:6px; flex-wrap:wrap}
.pill{
  display:inline-flex; align-items:center; gap:5px;
  background:#fff; border:1px solid var(--line); border-radius:999px;
  padding:6px 11px; font-size:11.5px; font-weight:700; color:var(--ink2); text-decoration:none;
}
.pill b{color:var(--ink)}
.pill.link:hover{background:#fff5e6}
.card{
  background:var(--paper); border:1px solid var(--line); border-radius:var(--r);
  padding:16px; box-shadow:var(--shadow-s); margin-bottom:14px;
}
.card h2{font-size:15.5px; font-weight:900; letter-spacing:-.3px}
.cardHead{display:flex; align-items:baseline; justify-content:space-between; gap:10px; flex-wrap:wrap; margin-bottom:10px}
.muted{color:var(--ink2); font-size:12.5px}
.small{font-size:11.5px}
.btn{
  border:1px solid var(--line); background:#fff; color:var(--ink);
  border-radius:12px; padding:9px 14px; font-weight:800; font-size:13px; cursor:pointer;
  transition:.16s; white-space:nowrap;
}
.btn:hover{background:#fff6e8}
.btn.primary{background:linear-gradient(180deg,#f8c25b,#ef9f1e); border-color:#e6981d; color:#4a2c05; box-shadow:0 8px 18px rgba(240,160,40,.25)}
.btn.primary:hover{filter:brightness(1.03)}
.btn.ghost{padding:7px 11px; font-size:14px}
.tag{display:inline-block; font-size:10.5px; font-weight:800; padding:2px 8px; border-radius:999px; background:#f4ecdf; color:var(--ink2)}
.tag.ok{background:var(--ok-bg); color:#1f7a57}
.tag.wait{background:var(--warn-bg); color:#a8621f}
.tag.idea{background:var(--idea-bg); color:#5a4bbd}

/* ---------------- map ---------------- */
.mapCard{
  background:linear-gradient(180deg,#fffdf8,#fff7ea);
  border:1px solid var(--line); border-radius:28px; padding:16px;
  box-shadow:var(--shadow);
}
.mapScroll{overflow:auto; border-radius:22px; scrollbar-width:thin}
.mapScrollHint{display:none; font-size:11px; font-weight:700; color:#8a6a45; background:#fff3df; border:1px dashed #eccf9f; border-radius:11px; padding:6px 10px; margin:0 2px 9px}
.mapStage{
  position:relative; aspect-ratio:3/2; min-width:100%; border-radius:22px; overflow:hidden;
  background:#f3e3cc;
  box-shadow:inset 0 0 0 1px rgba(140,100,60,.10), 0 18px 40px rgba(120,85,50,.16);
}
.mapBg{position:absolute; inset:0; width:100%; height:100%; object-fit:cover; display:block; user-select:none; -webkit-user-drag:none}

.zoneLayer{position:absolute; inset:0}
.zone{
  position:absolute; border:1.5px dashed rgba(255,255,255,.92); border-radius:16px;
  background:rgba(255,255,255,.05);
  box-shadow:0 0 0 1px rgba(90,60,30,.06) inset;
  pointer-events:none;
}
.zoneLabel{
  position:absolute; bottom:9px; left:10px;
  display:flex; flex-direction:column; gap:1px;
  background:rgba(255,253,247,.96); border:1px solid var(--line);
  border-radius:11px; padding:4px 9px; white-space:nowrap;
  box-shadow:0 4px 12px rgba(120,85,50,.14);
  font-size:11.5px; font-weight:900; color:var(--ink); line-height:1.2;
}
.zoneLabel em{font-style:normal; font-weight:700; font-size:10px; color:var(--ink2)}
.zone.lounge .zoneLabel{left:auto; right:10px}

.agentLayer{position:absolute; inset:0}
.agent{
  position:absolute; left:var(--x); top:var(--y); transform:translate(-50%,-100%);
  display:flex; flex-direction:column; align-items:center;
  width:clamp(54px,7.2%,92px);
  background:none; border:0; padding:0; cursor:pointer; color:inherit;
   transition:transform .18s ease, filter .18s ease;
  filter:drop-shadow(0 8px 10px rgba(95,62,28,.20));
  z-index:3;
}
.agent:hover{transform:translate(-50%,-100%) scale(1.07); z-index:6}
.agent:active{transform:translate(-50%,-100%) scale(.98)}
.agent:focus-visible{outline:none; z-index:7}
.agent:focus-visible .sprite{filter:drop-shadow(0 0 0 3px #ffd77a)}
.agent.is-active{z-index:6}
.sprite{width:100%; display:block; animation:bob 4.2s ease-in-out infinite}
.sprite svg{width:100%; height:auto; display:block}
.agent:nth-child(2n) .sprite{animation-delay:-1.3s}
.agent:nth-child(3n) .sprite{animation-delay:-2.4s}
@keyframes bob{0%,100%{transform:translateY(0)}50%{transform:translateY(-3px)}}
.nameTag{
  margin-top:-5px; background:rgba(56,40,26,.84); color:#fff;
  font-size:10px; font-weight:800; padding:2px 8px; border-radius:999px;
  letter-spacing:-.2px; white-space:nowrap;
}
.bubble{
  position:relative; max-width:142px; margin-bottom:5px;
  background:#fff; border:1px solid #f1e2cd; border-radius:13px;
  padding:6px 9px; font-size:11px; font-weight:700; line-height:1.35; color:#4a3a2c;
  text-align:center; word-break:keep-all;
  box-shadow:0 8px 18px rgba(120,85,50,.16);
  transition:opacity .25s ease, transform .25s ease;
}
.bubble::after{
  content:""; position:absolute; left:50%; bottom:-5px; width:9px; height:9px;
  background:#fff; border-right:1px solid #f1e2cd; border-bottom:1px solid #f1e2cd;
  transform:translateX(-50%) rotate(45deg);
}
.bubble.pop{animation:pop .3s ease}
@keyframes pop{0%{transform:scale(.92); opacity:.4}100%{transform:scale(1); opacity:1}}
body.chat-off .bubble{opacity:0; transform:translateY(4px); pointer-events:none}

.mapFoot{display:flex; align-items:center; justify-content:space-between; gap:10px; flex-wrap:wrap; padding:12px 4px 2px}
.chatToggle{
  display:inline-flex; align-items:center; gap:9px;
  border:1px solid var(--line); background:#fff; color:var(--ink);
  border-radius:999px; padding:7px 14px 7px 8px; cursor:pointer;
  font-size:12.5px; font-weight:800; box-shadow:var(--shadow-s);
}
.chatToggle .switch{width:34px; height:19px; border-radius:999px; background:#dbcdba; position:relative; transition:.2s; flex:0 0 auto}
.chatToggle .switch::after{content:""; position:absolute; top:2px; left:2px; width:15px; height:15px; border-radius:50%; background:#fff; box-shadow:0 1px 3px rgba(0,0,0,.25); transition:.2s}
.chatToggle[aria-pressed="true"] .switch{background:var(--ok)}
.chatToggle[aria-pressed="true"] .switch::after{transform:translateX(15px)}
.chatToggle em{font-style:normal; font-weight:600; font-size:11px; color:var(--ink2)}
.hint{font-size:11px; color:var(--ink3)}

.chatFeed{display:none; grid-template-columns:1fr 1fr; gap:8px; margin-top:12px}
.feedItem{
  display:flex; gap:8px; align-items:flex-start; text-align:left; font:inherit; color:inherit; cursor:pointer;
  background:#fff; border:1px solid var(--line2); border-radius:14px; padding:8px 10px;
  box-shadow:0 3px 10px rgba(130,95,60,.05);
}
.feedItem:hover{background:#fff8ea; border-color:#eed7b4}
.feedItem .fAv{width:26px; height:26px; border-radius:50%; flex:0 0 auto; display:grid; place-items:center; font-size:12px; background:#fff7e8}
.feedItem .fBody{min-width:0}
.feedItem .fName{font-size:11px; font-weight:900; color:var(--ink)}
.feedItem .fLine{font-size:11.5px; color:var(--ink2); word-break:keep-all}

/* ---------------- meetings ---------------- */
.meetingGrid{display:grid; grid-template-columns:repeat(auto-fill,minmax(400px,1fr)); gap:14px; margin-bottom:14px}
.meeting{
  background:var(--paper); border:1px solid var(--line); border-radius:var(--r);
  padding:16px; box-shadow:var(--shadow-s); display:flex; flex-direction:column; gap:10px;
}
.meeting .mTop{display:flex; align-items:center; gap:8px; flex-wrap:wrap}
.meeting h3{font-size:15px; font-weight:900; letter-spacing:-.3px; margin-top:2px}
.who{display:flex; gap:4px; flex-wrap:wrap}
.who span{font-size:10.5px; font-weight:800; background:#fff4e2; border:1px solid #f3e1c6; color:#8a6a3d; padding:1px 7px; border-radius:999px}
.minutes{display:flex; flex-direction:column; gap:6px}
.minutes li{position:relative; padding-left:13px; font-size:12.5px; color:#5a4a3c}
.minutes li::before{content:""; position:absolute; left:2px; top:7px; width:5px; height:5px; border-radius:50%; background:#e8c99a}
.decision{
  margin-top:auto; background:#fff6e8; border:1px dashed #efd4a8; border-radius:13px;
  padding:9px 11px; font-size:12px; color:#7a5a22; font-weight:700;
}

.memoCard form{display:flex; gap:10px; align-items:flex-end; flex-wrap:wrap; margin:12px 0}
.memoForm .field:first-child{flex:0 0 168px; min-width:0}
.memoForm .field.grow{min-width:0}
.memoForm .btn{flex:0 0 auto; margin-left:auto}
.field{display:flex; flex-direction:column; gap:4px; font-size:11.5px; font-weight:800; color:var(--ink2)}
.field.grow{flex:1 1 260px}
.field select,.field textarea,#agentNote{
  font:inherit; font-size:13px; color:var(--ink); background:#fff;
  border:1px solid var(--line); border-radius:12px; padding:9px 11px; width:100%;
  resize:vertical;
}
.field textarea{min-height:64px}
.field select:focus,.field textarea:focus,#agentNote:focus{outline:2px solid #f6d49a; outline-offset:1px; border-color:#ecc98e}
.memoList{display:flex; flex-direction:column; gap:8px}
.memoList li{
  display:flex; gap:10px; align-items:flex-start; justify-content:space-between;
  background:#fffdf7; border:1px solid var(--line2); border-radius:13px; padding:10px 12px;
}
.memoList .mText{font-size:12.5px; white-space:pre-wrap; word-break:break-word}
.memoList .mMeta{font-size:10.5px; color:var(--ink3); margin-top:3px}
.memoList .del{border:0; background:none; color:#c09090; cursor:pointer; font-size:12px; padding:2px 4px}
.memoList .del:hover{color:#b04a4a}

/* ---------------- dashboard ---------------- */
.statGrid{display:grid; grid-template-columns:repeat(auto-fit,minmax(155px,1fr)); gap:10px; margin-bottom:14px}
.stat{
  background:var(--paper); border:1px solid var(--line); border-radius:16px; padding:13px 14px;
  box-shadow:var(--shadow-s);
}
.stat .sLabel{font-size:11px; font-weight:800; color:var(--ink2)}
.stat .sValue{font-size:19px; font-weight:900; letter-spacing:-.5px; margin:2px 0 2px}
.stat .sNote{font-size:10.5px; color:var(--ink3)}
.stat.ok .sValue{color:#1f7a57}
.stat.warn .sValue{color:#b5701f}

.tableWrap{overflow-x:auto; -webkit-overflow-scrolling:touch; border-radius:12px}
.table{width:100%; border-collapse:collapse; font-size:12px; min-width:560px}
.table th{
  text-align:left; font-size:10.5px; letter-spacing:.02em; color:var(--ink3);
  font-weight:800; padding:7px 8px; border-bottom:1px solid var(--line); white-space:nowrap;
}
.table td{padding:8px; border-bottom:1px solid var(--line2); vertical-align:top; color:#4d3d31}
.table tr:last-child td{border-bottom:0}
.table td:nth-child(2){font-variant-numeric:tabular-nums}
.table .em{font-size:13px}
.kpiRow{display:grid; grid-template-columns:repeat(auto-fit,minmax(96px,1fr)); gap:8px; margin-bottom:12px}
.kpi{background:#fff8ec; border:1px solid #f2e2c9; border-radius:13px; padding:9px 10px; text-align:center}
.kpi .kLabel{font-size:10.5px; color:var(--ink2); font-weight:700}
.kpi .kValue{font-size:15px; font-weight:900; letter-spacing:-.3px; margin-top:1px}
.todoList{display:flex; flex-direction:column; gap:8px; margin-top:10px}
.todoList li{display:flex; gap:8px; align-items:flex-start; font-size:12.5px; color:#4d3d31; line-height:1.45}
.todoList .tag{flex:0 0 auto; margin-top:1px}

/* ---------------- calendar ---------------- */
.calNav{display:flex; align-items:center; gap:6px}
.calTitle{font-weight:900; font-size:14px; min-width:104px; text-align:center}
.calLegend{display:flex; gap:12px; flex-wrap:wrap; font-size:11px; color:var(--ink2); margin-bottom:10px}
.calLegend .dot{display:inline-block; width:8px; height:8px; border-radius:50%; margin-right:4px; vertical-align:middle}
.dot.shoot{background:var(--shoot)} .dot.check{background:var(--check)} .dot.money{background:var(--money)} .dot.pet{background:var(--pet)}
.calGrid{display:grid; grid-template-columns:repeat(7,1fr); gap:5px}
.calDow{font-size:10.5px; font-weight:800; color:var(--ink3); text-align:center; padding:2px 0 4px}
.calDow.sun{color:#c97a7a}
.calCell{
  min-height:82px; border:1px solid var(--line2); border-radius:11px; padding:5px 5px 4px;
  background:#fffdf8; text-align:left; cursor:pointer; display:flex; flex-direction:column; gap:3px;
  transition:.15s; font:inherit; color:inherit;
}
.calCell:hover{background:#fff6e6; border-color:#efd8b6}
.calCell.empty{background:transparent; border-color:transparent; cursor:default}
.calCell.today{box-shadow:0 0 0 2px #f3bd5c inset}
.calCell.selected{background:#fff4e0; border-color:#e9c48a}
.calDate{font-size:11px; font-weight:900; color:var(--ink2)}
.calCell.today .calDate{color:#a86a10}
.calEv{font-size:9.5px; font-weight:800; line-height:1.25; border-radius:6px; padding:2px 4px; word-break:keep-all; color:#4a3a2c}
.calEv.shoot{background:#fde6ee} .calEv.check{background:#e3f2fb} .calEv.money{background:#fbf0d8} .calEv.pet{background:#e8f6e2}
.dayDetail{margin-top:12px; min-height:40px}
.dayDetail h3{font-size:13px; font-weight:900; margin-bottom:6px}
.dayDetail .evRow{display:flex; gap:8px; align-items:baseline; font-size:12.5px; padding:4px 0; border-bottom:1px dashed var(--line2)}
.dayDetail .evRow b{min-width:42px; color:#8a6a3f; font-variant-numeric:tabular-nums}
.dayDetail .none{font-size:12px; color:var(--ink3)}

.routineStrip{display:grid; grid-template-columns:repeat(auto-fit,minmax(170px,1fr)); gap:8px; margin-top:10px}
.rChip{background:#fff8ec; border:1px solid #f2e2c9; border-radius:13px; padding:9px 11px}
.rChip .rT{font-size:12px; font-weight:900}
.rChip .rS{font-size:10.5px; color:var(--ink2); margin-top:2px}

/* ---------------- routines ---------------- */
.routineList{display:grid; grid-template-columns:repeat(auto-fill,minmax(320px,1fr)); gap:12px; margin-bottom:14px}
.rCard{
  background:var(--paper); border:1px solid var(--line); border-radius:var(--r); padding:14px 15px;
  box-shadow:var(--shadow-s); display:flex; flex-direction:column; gap:8px;
}
.rCard.off{opacity:.62}
.rTop{display:flex; align-items:center; gap:9px}
.rIcon{width:36px; height:36px; border-radius:12px; background:#fff3dd; display:grid; place-items:center; font-size:17px; flex:0 0 auto}
.rTitle{font-size:13.5px; font-weight:900; letter-spacing:-.2px}
.rSched{font-size:11px; color:var(--ink2)}
.rDesc{font-size:11.5px; color:var(--ink2); line-height:1.45}
.rMeta{display:flex; gap:10px; flex-wrap:wrap; font-size:10.5px; color:var(--ink3); margin-top:auto}
.rMeta b{color:var(--ink2)}
.toggle{
  margin-left:auto; width:44px; height:25px; border-radius:999px; border:0; background:#ded1be;
  position:relative; cursor:pointer; transition:.2s; flex:0 0 auto;
}
.toggle::after{content:""; position:absolute; top:3px; left:3px; width:19px; height:19px; border-radius:50%; background:#fff; box-shadow:0 1px 3px rgba(0,0,0,.22); transition:.2s}
.toggle[aria-pressed="true"]{background:var(--ok)}
.toggle[aria-pressed="true"]::after{transform:translateX(19px)}
.permList{display:flex; flex-direction:column; gap:8px; margin:10px 0}
.permList li{display:flex; gap:8px; font-size:12.5px; color:#4d3d31; align-items:flex-start}
.permList .tag{flex:0 0 auto; margin-top:1px}

.toolGrid{display:grid; grid-template-columns:repeat(auto-fit,minmax(190px,1fr)); gap:9px; margin:12px 0}
.tool{
  display:flex; align-items:center; gap:10px; text-decoration:none; color:inherit;
  background:#fff8ec; border:1px solid #f2e2c9; border-radius:15px; padding:11px 12px;
  transition:.16s;
}
.tool:hover{background:#fff1d8; border-color:#eccf9f; transform:translateY(-1px)}
.toolIcon{width:34px; height:34px; flex:0 0 auto; border-radius:11px; background:#fff; display:grid; place-items:center; font-size:17px; box-shadow:0 2px 6px rgba(150,110,60,.10)}
.toolBody{display:flex; flex-direction:column; min-width:0; flex:1}
.toolName{font-size:12.5px; font-weight:900; display:flex; align-items:center; gap:5px}
.toolName i{font-style:normal; font-size:9.5px; font-weight:800; color:#237a58; background:var(--ok-bg); border-radius:999px; padding:1px 6px}
.toolUse{font-size:10.5px; color:var(--ink2); margin-top:1px}
.toolGo{font-size:13px; color:#b08a52; font-weight:900}
.toolWide{
  display:flex; gap:12px; align-items:center; justify-content:space-between; flex-wrap:wrap;
  background:#fffdf7; border:1px dashed #eccf9f; border-radius:15px; padding:12px 14px; margin:10px 0;
}
.toolWideText{min-width:0; flex:1 1 260px}
.toolWideText p{margin-top:3px; line-height:1.45}
.toolActions{display:flex; gap:7px; flex-wrap:wrap}
.linkRow{display:flex; gap:7px; flex-wrap:wrap; margin-top:4px}

/* ---------------- drawer ---------------- */
.drawer{position:fixed; inset:0; z-index:80}
.drawer[hidden]{display:none}
.drawerScrim{position:absolute; inset:0; background:rgba(60,40,20,.38); -webkit-backdrop-filter:blur(2px); backdrop-filter:blur(2px); animation:fadeIn .2s ease}
@keyframes fadeIn{from{opacity:0}to{opacity:1}}
.drawerPanel{
  position:absolute; top:0; right:0; bottom:0; width:min(440px,100%);
  background:linear-gradient(180deg,#fffdf8,#fff8ee);
  box-shadow:-24px 0 60px rgba(80,50,20,.22);
  display:flex; flex-direction:column;
  animation:slideIn .24s cubic-bezier(.2,.7,.3,1);
}
@keyframes slideIn{from{transform:translateX(36px); opacity:.4}to{transform:none; opacity:1}}
.drawerTop{display:flex; align-items:center; gap:10px; padding:16px 16px 12px; border-bottom:1px solid var(--line2)}
.drawerWho{display:flex; align-items:center; gap:11px; flex:1; min-width:0}
.drawerAvatar{width:52px; height:52px; border-radius:16px; background:#fff3dd; display:grid; place-items:center; flex:0 0 auto; overflow:hidden}
.drawerAvatar svg{width:42px; height:42px}
.drawerTop h2{font-size:17px; font-weight:900; letter-spacing:-.4px}
.drawerTop p{font-size:11.5px; margin-top:1px}
.btn.close{padding:6px 10px}
.drawerBody{padding:14px 16px 26px; overflow:auto; -webkit-overflow-scrolling:touch; display:flex; flex-direction:column; gap:16px}
.dSection h3{font-size:12.5px; font-weight:900; margin-bottom:6px; color:#5a4634}
.dSection p{font-size:13px; color:#4d3d31; line-height:1.5}
.statusBox{background:#fff4e2; border:1px solid #f2ddbc; border-radius:12px; padding:10px 12px; font-weight:700}
.dotList{display:flex; flex-direction:column; gap:6px}
.dotList li{position:relative; padding-left:14px; font-size:12.5px; color:#4d3d31}
.dotList li::before{content:""; position:absolute; left:2px; top:7px; width:5px; height:5px; border-radius:50%; background:#8fbf84}
.dotList.next li::before{background:#f0b352}
#agentNote{min-height:92px}
.noteFoot{display:flex; align-items:center; gap:8px; margin-top:8px; flex-wrap:wrap}
.noteFoot .saved{font-size:11px; color:var(--ok); flex:1}
.noteFoot .btn{margin-left:auto}

.toast{
  position:fixed; left:50%; bottom:22px; transform:translate(-50%,20px);
  background:rgba(56,40,26,.94); color:#fff; font-size:12.5px; font-weight:700;
  padding:10px 16px; border-radius:999px; box-shadow:0 12px 30px rgba(60,35,15,.28);
  opacity:0; pointer-events:none; transition:.24s; z-index:100; max-width:88vw; text-align:center;
}
.toast.show{opacity:1; transform:translate(-50%,0)}

.foot{display:flex; flex-direction:column; gap:2px; margin-top:20px; padding:10px 4px 0; font-size:10.5px; color:var(--ink3); line-height:1.45}

/* ---------------- responsive ---------------- */
@media (max-width:1180px){
  .statusCluster .chip.notion{display:none}
  .brandSub{display:none}
}
@media (max-width:980px){
  .app{padding:10px 10px 32px}
  .topbar{gap:8px; padding:9px 10px; border-radius:18px; top:6px}
  .tabs{order:3; width:100%; justify-content:flex-start; flex:1 1 100%; padding:0 0 2px; flex-wrap:wrap; gap:3px}
  .tab{padding:7px 10px; font-size:12.5px; border-radius:12px}
  .mapScrollHint{display:none}
  .statusCluster{margin-left:auto}
  .brandTitle{font-size:15.5px}
  .brandMark{width:36px; height:36px}
  .avatarStack{display:none}
  .statusCluster .chip{padding:4px 8px; font-size:10.5px}
  .mapCard{padding:10px; border-radius:22px}
  .mapStage{min-width:740px}
  .mapScroll{box-shadow:inset -16px 0 16px -16px rgba(120,85,50,.25)}
  .bubble{display:none}
  .chatFeed{display:grid}
  .sectionHead h1{font-size:19px}
  .meetingGrid{grid-template-columns:1fr}
  .routineList{grid-template-columns:1fr}
  .drawerPanel{
    top:auto; left:0; right:0; width:auto; max-height:86vh;
    border-radius:22px 22px 0 0; animation:slideUp .24s cubic-bezier(.2,.7,.3,1);
  }
  @keyframes slideUp{from{transform:translateY(40px); opacity:.5}to{transform:none; opacity:1}}
}
@media (max-width:640px){
  body{font-size:14px}
  .chatFeed{grid-template-columns:1fr}
  .mapStage{min-width:700px}
  .calCell{min-height:64px; padding:3px}
  .calEv{font-size:8.5px; padding:1px 3px}
  .calDate{font-size:10px}
  .card{padding:13px; border-radius:16px}
  .statGrid{grid-template-columns:repeat(2,1fr)}
  .stat .sValue{font-size:17px}
  .sectionHead{align-items:flex-start}
  .headPills{width:100%}
  .chatToggle em{display:none}
  .mapScrollHint{display:block}
  #serverChip{display:none}
}
@media (prefers-reduced-motion:reduce){
  .sprite{animation:none}
  .panel,.drawerScrim,.drawerPanel,.bubble.pop{animation:none}
}
