/* r48 野帳 P2 — 營地 HUD、聊天（reference/ui-fieldbook/DESIGN.md §4.3）。
   Add-only layer: every selector starts with html.fb; no existing file, DOM or JS changes. Needs fb_tokens.css (§3).
   Layout positions, the --kw scale and the JS-driven widths (#ap-hp / #ap-exp style.width) are left alone; only surfaces,
   colours, fonts and the bottom-edge tab placement of .camp-btns change. No blur, no glow, no gradient highlights. */

/* ---------- 隊員牌 .avatar-panel ---------- (LV plate sits under the 44-52px photo, not beside the name as in the mockup, so a 12-character name still fits unclipped) */
html.fb #hud-camp .avatar-panel{color:var(--fb-ink)}
html.fb #hud-camp .avatar-panel .pnl{left:0;top:2px;width:298px;height:84px;clip-path:none;background:var(--fb-slip);
  border:2px solid var(--fb-ink);border-radius:2px;box-shadow:var(--fb-lift);box-sizing:border-box}
/* the hang-tag hole */
html.fb #hud-camp .avatar-panel .pnl::before{content:"";position:absolute;left:6px;top:33px;width:11px;height:11px;box-sizing:border-box;
  border:2px solid var(--fb-ink);border-radius:50%;background:var(--fb-cover-deep)}
html.fb #hud-camp .avatar-panel .av{left:28px;top:8px;width:80px;height:80px;padding:5px;border-radius:0;transform:scale(.55);transform-origin:top left;
  background:var(--fb-grid-bg),var(--fb-page);border:1.5px solid var(--fb-ink);box-shadow:none;overflow:hidden}
html.fb #hud-camp .avatar-panel .av::before{content:none}
/* 80px original portrait holder × .55 = 44px square photo; the original 70px canvas, its inset, and the renderer are unmodified. */
html.fb #hud-camp .avatar-panel .lvb{left:24px;top:63px;width:52px;height:18px;border-radius:0;background:var(--fb-weave),var(--fb-cover);
  border:1.5px solid var(--fb-ink);box-shadow:none;gap:2px}
html.fb #hud-camp .avatar-panel .lvb small{font:700 9px/1 var(--fb-num);color:var(--fb-foil);letter-spacing:.04em}
html.fb #hud-camp .avatar-panel .lvb b{font:700 13px/1 var(--fb-num);color:var(--fb-foil-lite);text-shadow:none}
html.fb #hud-camp .avatar-panel .nm{left:86px;top:10px;right:10px}
html.fb #hud-camp .avatar-panel .nm b{font:700 13px/18px var(--fb-text);color:var(--fb-ink);text-shadow:none;overflow:hidden;text-overflow:ellipsis;min-width:0}
html.fb #hud-camp .jobtag{flex:none;height:18px;padding:0 7px;border-radius:0;font:700 11px/15px var(--fb-text);color:var(--fb-ink);
  background:var(--fb-slip);border:1.5px solid var(--fb-ink);box-shadow:none;text-shadow:none}
/* fb-bar */
html.fb #hud-camp .ap-bar{left:86px;border-radius:0;background:var(--fb-page-2);border:2px solid var(--fb-ink);box-shadow:none;box-sizing:border-box}
html.fb #hud-camp .ap-bar.hp{top:38px;width:198px;height:16px}
html.fb #hud-camp .ap-bar.exp{top:60px;width:198px;height:11px}
html.fb #hud-camp .ap-bar i{background:var(--fb-seal)}
html.fb #hud-camp .ap-bar.exp i{background:var(--fb-foil)}
html.fb #hud-camp .ap-bar::after{content:"";position:absolute;inset:0;z-index:1;pointer-events:none;
  background:repeating-linear-gradient(90deg,transparent 0 calc(25% - 1px),rgba(28,43,42,.4) calc(25% - 1px) 25%)}
html.fb #hud-camp .ap-bar em{display:none}
html.fb #hud-camp .ap-bar span{z-index:2;font:700 10px/1 var(--fb-num);letter-spacing:.04em;color:#fff;
  text-shadow:-1px 0 var(--fb-ink),1px 0 var(--fb-ink),0 -1px var(--fb-ink),0 1px var(--fb-ink)}
html.fb #hud-camp:not(#fb-0) .ap-bar.exp span{font-size:9px;color:var(--fb-ink);text-shadow:none}

/* ---------- 公告 .banner：紙膠帶 ---------- */
html.fb #hud-camp .banner{transform:translateX(-50%) scale(var(--kw,1)) rotate(-.6deg);border:0;border-radius:0;
  background:rgba(246,224,94,.92);color:var(--fb-ink);box-shadow:none;text-shadow:none;padding:0 18px 0 14px;
  font:700 12px/1.3 var(--fb-text);
  clip-path:polygon(0 0,100% 0,calc(100% - 5px) 25%,100% 50%,calc(100% - 5px) 75%,100% 100%,0 100%,5px 75%,0 50%,5px 25%)}
html.fb #hud-camp .banner .meg{color:var(--fb-ink)}
html.fb #hud-camp .banner .meg svg{stroke-width:1.8}
html.fb #hud-camp .banner .clip,html.fb #hud-camp .banner .clip span{color:var(--fb-ink);text-shadow:none}

/* ---------- 出發票 #btn-exped ---------- */
html.fb #hud-camp #btn-exped.exped-btn{border-radius:2px;border:2px solid var(--fb-ink);background:var(--fb-weave),var(--fb-cover);
  box-shadow:4px 4px 0 var(--fb-ink);text-shadow:none;color:var(--fb-foil-lite);
  font:900 19px/1 var(--fb-display);letter-spacing:.28em;text-indent:.28em;padding-left:24px}
html.fb #hud-camp #btn-exped.exped-btn::before{content:"";position:absolute;left:26px;top:6px;bottom:6px;border-left:2px dotted rgba(240,217,138,.75);pointer-events:none}
html.fb #hud-camp #btn-exped.exped-btn::after{content:"";position:absolute;left:10px;top:50%;width:8px;height:8px;margin-top:-4px;border-radius:50%;background:var(--fb-foil);pointer-events:none}
html.fb #hud-camp #btn-exped.exped-btn:active{transform:scale(var(--kw,1)) translate(2px,2px);box-shadow:2px 2px 0 var(--fb-ink)}
html.fb #hud-camp #btn-exped.exped-btn:focus-visible{outline:2px solid var(--fb-marker);outline-offset:2px}

/* ---------- 功能鈕：從底邊冒出來的索引標籤 ---------- */
html.fb #hud-camp .camp-btns{bottom:0;gap:3px}
html.fb #hud-camp .camp-btns button{width:64px;height:64px;box-sizing:border-box;background:var(--fb-page);
  border:2px solid var(--fb-ink);border-bottom:0;border-radius:5px 5px 0 0;box-shadow:inset 0 4px 0 var(--tab,var(--fb-ink))}
html.fb #hud-camp .camp-btns button[data-panel="char"]{--tab:var(--fb-seal)}
html.fb #hud-camp .camp-btns button[data-panel="talent"]{--tab:var(--fb-t2)}
html.fb #hud-camp .camp-btns button[data-panel="enhance"]{--tab:var(--fb-blue)}
html.fb #hud-camp .camp-btns button[data-panel="shop"]{--tab:var(--fb-foil)}
html.fb #hud-camp .camp-btns button[data-panel="menu"]{--tab:var(--fb-ink)}
html.fb #hud-camp .camp-btns button:active{transform:translateY(2px)}
html.fb #hud-camp .camp-btns button:focus-visible{outline:2px solid var(--fb-marker);outline-offset:2px}
html.fb #hud-camp .camp-btns .ic{top:10px;width:28px;height:28px;border:0;border-radius:0;background:none;box-shadow:none}
html.fb #hud-camp .camp-btns .ic svg{width:24px;height:24px;stroke:var(--fb-ink);stroke-width:1.8}
html.fb #hud-camp .camp-btns .lb{left:0;right:0;bottom:7px;font:700 12px/1 var(--fb-text);color:var(--fb-ink);text-shadow:none;letter-spacing:.08em}
html.fb #hud-camp .oh-key-badge{right:-4px;top:-8px;min-width:22px;height:20px;padding:0 4px;border-radius:50%;box-sizing:border-box;
  background:var(--fb-slip);border:2px solid var(--fb-seal-deep);outline:1px solid var(--fb-seal-deep);outline-offset:1px;
  color:var(--fb-seal-deep);font:700 11px/16px var(--fb-num);text-align:center;transform:rotate(-6deg)}
html.fb #hud-camp #btn-fold{bottom:0;height:calc(46px * var(--kw,1));border-radius:5px 5px 0 0;background:var(--fb-page-2);color:var(--fb-ink);
  border:2px solid var(--fb-ink);border-bottom:0;box-shadow:none;font:700 13px/1 var(--fb-num)}
html.fb #hud-camp #btn-fold:focus-visible{outline:2px solid var(--fb-marker);outline-offset:2px}

/* ---------- 聊天 #chat：便條 ---------- */
html.fb #hud-camp #chat-log{background:repeating-linear-gradient(transparent 0 19px,var(--fb-rule) 19px 20px) 0 7px,var(--fb-slip);
  border:1.5px solid var(--fb-ink);border-radius:2px;color:var(--fb-ink);font:12px/20px var(--fb-text);text-shadow:none}
html.fb #hud-camp #chat.fold #chat-log{padding:6px 11px;line-height:20px}
html.fb #hud-camp #chat-log .sys{color:var(--fb-blue);font-weight:700}
html.fb #hud-camp #chat-log div,html.fb #hud-camp #chat-log span{text-shadow:none}
html.fb #hud-camp .chat-tabs{gap:3px;margin-top:4px;align-items:flex-end}
html.fb #hud-camp .chat-tabs button{height:22px;padding:0 10px;font:700 11px/18px var(--fb-text);color:var(--fb-ink-2);background:var(--fb-page-2);
  border:2px solid var(--fb-ink);border-bottom:0;border-radius:5px 5px 0 0;box-shadow:none}
html.fb #hud-camp .chat-tabs button.on{height:25px;background:var(--fb-page);color:var(--fb-ink);box-shadow:inset 0 3px 0 var(--fb-blue)}
html.fb #hud-camp .chat-in input#chat-input{background:var(--fb-slip);color:var(--fb-ink);border:0;border-bottom:2px solid var(--fb-ink);
  border-radius:0;font:600 13px var(--fb-text);box-shadow:none;outline:0}
html.fb #hud-camp .chat-in input#chat-input::placeholder{font:12px var(--fb-note);color:var(--fb-ink-2)}
html.fb #hud-camp .chat-in input#chat-input:focus{border-bottom-color:var(--fb-seal);background:linear-gradient(transparent 62%,rgba(246,224,94,.6) 62%),var(--fb-slip)}

/* ---------- 觸控「跳」 ---------- */
html.fb #hud-camp .touch-btns button#btn-jump-t{width:56px;height:56px;border-radius:50%;background:var(--fb-slip);color:var(--fb-ink);
  border:2px solid var(--fb-ink);box-shadow:var(--fb-lift);text-shadow:none;font:900 17px/1 var(--fb-display)}
html.fb #hud-camp .touch-btns button#btn-jump-t:active{transform:translate(2px,2px);box-shadow:1px 1px 0 var(--fb-ink)}

/* INT P2 — measured HUD regressions (DESIGN §4.3/5.7). No game state/role name is overwritten. */
html.fb #hud-camp .avatar-panel .nm {
  display:grid; grid-template-columns:minmax(0,1fr) max-content; gap:4px; align-items:center;
}
html.fb #hud-camp .avatar-panel .nm b#ap-name {
  min-width:0; white-space:normal; overflow-wrap:anywhere; overflow:visible;
  text-overflow:clip; font:700 12px/12px var(--fb-text);
}
html.fb #hud-camp .chat-in input#chat-input:focus-visible,
html.fb #hud-camp .chat-tabs button:focus-visible,
html.fb #hud-camp .touch-btns button#btn-jump-t:focus-visible {
  outline:2px solid var(--fb-marker); outline-offset:2px;
}

