/* v659 employee template: presentation only. */
/* Reuse the recruitment viewport shell for consistent workforce navigation. */
body[data-ui-version="3"] #app .player-sheet.player-sheet.player-sheet[data-scene-panel="staff"][data-ui-view="workforce-employees"]{position:fixed!important;inset:0!important;width:100%!important;height:100dvh!important;max-width:none!important;max-height:none!important;margin:0!important;transform:none!important;border:0!important;border-radius:0!important;background:var(--tp-surface)!important;color:var(--tp-ink)!important;overflow:hidden!important;}
body[data-ui-version="3"] #app .player-sheet.player-sheet.player-sheet[data-scene-panel="staff"][data-ui-view="workforce-employees"]>.sheet-head{position:absolute!important;inset:8px 12px auto!important;height:46px!important;min-height:0!important;padding:4px 12px!important;background:var(--tp-surface)!important;border-radius:18px!important;color:var(--tp-ink)!important;}
body[data-ui-version="3"] #app .player-sheet.player-sheet.player-sheet[data-scene-panel="staff"][data-ui-view="workforce-employees"] .sheet-head h2{color:var(--tp-ink)!important;background:var(--tp-surface)!important;border-radius:14px!important;padding:3px 16px!important;font-size:20px!important;}
body[data-ui-version="3"] #app .player-sheet.player-sheet.player-sheet[data-scene-panel="staff"][data-ui-view="workforce-employees"] .sheet-head button{background:var(--tp-surface)!important;color:var(--tp-ink)!important;border:1px solid var(--tp-edge)!important;min-height:32px!important;}
body[data-ui-version="3"] #app .player-sheet.player-sheet.player-sheet[data-scene-panel="staff"][data-ui-view="workforce-employees"]>:is(.sheet-handle,.sheet-environment,.v4-system-rail){display:none!important;}
body[data-ui-version="3"] #app .player-sheet.player-sheet.player-sheet[data-scene-panel="staff"][data-ui-view="workforce-employees"]>.sheet-scroll{position:absolute!important;inset:62px 12px 10px!important;padding:0!important;height:auto!important;overflow:hidden!important;}
body[data-ui-version="3"] #app .staff-v3.staff-v3.staff-v3[data-ui-view="workforce-employees"]{position:relative!important;inset:auto!important;display:grid!important;grid-template-columns:110px minmax(0,1fr)!important;grid-template-rows:minmax(0,1fr) auto!important;gap:10px!important;width:100%!important;height:100%!important;min-height:0!important;padding:0!important;margin:0!important;background:transparent!important;border:0!important;overflow:hidden!important;color:var(--tp-ink)!important;}
body[data-ui-version="3"] #app .staff-v3.staff-v3.staff-v3[data-ui-view="workforce-employees"]>.staff-v4-tabs{position:static!important;display:flex!important;flex-direction:column!important;grid-column:1!important;grid-row:1!important;gap:6px!important;width:auto!important;min-height:0!important;overflow:auto!important;padding:8px!important;background:var(--tp-surface)!important;border-radius:18px!important;}
body[data-ui-version="3"] #app .staff-v3.staff-v3.staff-v3[data-ui-view="workforce-employees"] .staff-v4-tabs button{flex:none!important;min-height:42px!important;padding:6px!important;background:var(--tp-surface)!important;color:var(--tp-ink)!important;border:1px solid var(--tp-edge)!important;border-radius:12px!important;font-size:13px!important;white-space:normal!important;}
body[data-ui-version="3"] #app .staff-v3.staff-v3.staff-v3[data-ui-view="workforce-employees"] .staff-v4-tabs button[aria-selected="true"]{background:var(--tp-blue)!important;color:#10324f!important;border-color:var(--tp-edge)!important;box-shadow:none!important;}
body[data-ui-version="3"] #app .staff-v3.staff-v3.staff-v3[data-ui-view="workforce-employees"]>.staff-msg{grid-column:1/-1!important;margin:0!important;padding:0!important;font-size:12px!important;}
body[data-ui-version="3"] #app .staff-v3.staff-v3.staff-v3[data-ui-view="workforce-employees"]>.staff-msg:empty{display:none!important;}

body[data-ui-version="3"] #app .player-sheet.player-sheet.player-sheet[data-ui-view="workforce-employees"]{top:0!important;left:0!important;right:0!important;bottom:0!important;outline:0!important}
body[data-ui-version="3"] #app .player-sheet.player-sheet.player-sheet[data-ui-view="workforce-employees"]>.sheet-head{top:8px!important;left:12px!important;right:12px!important;bottom:auto!important}
body[data-ui-version="3"] #app .player-sheet.player-sheet.player-sheet[data-ui-view="workforce-employees"]>.sheet-scroll{top:62px!important;left:12px!important;right:12px!important;bottom:10px!important}
body[data-ui-version="3"] #app .player-sheet.player-sheet.player-sheet[data-ui-view="workforce-employees"] #sheet-title::before{display:none!important}
body[data-ui-version="3"] #app .staff-v3.staff-v3.staff-v3[data-ui-view="workforce-employees"] >[data-staff-section="employees"]{display:grid!important;grid-column:2!important;grid-row:1!important;grid-template-rows:auto auto minmax(0,1fr)!important;gap:8px!important;height:100%!important;min-height:0!important;padding:12px!important;margin:0!important;background:var(--tp-surface)!important;border:1px solid var(--tp-edge)!important;border-radius:20px!important;overflow:hidden!important}
body[data-ui-version="3"] #app .staff-v3.staff-v3.staff-v3[data-ui-view="workforce-employees"] .employee-template-v2 *{box-sizing:border-box!important;text-shadow:none!important}
body[data-ui-version="3"] #app .staff-v3.staff-v3.staff-v3[data-ui-view="workforce-employees"] .employee-template-v2>.staff-section-head{display:flex!important;min-height:30px!important;padding:0!important;margin:0!important;background:transparent!important;color:var(--tp-ink)!important;}
body[data-ui-version="3"] #app .staff-v3.staff-v3.staff-v3[data-ui-view="workforce-employees"] .staff-section-head>span:first-child,body[data-ui-version="3"] #app .staff-v3.staff-v3.staff-v3[data-ui-view="workforce-employees"] .staff-section-head small,body[data-ui-version="3"] #app .staff-v3.staff-v3.staff-v3[data-ui-view="workforce-employees"] .v2-extra-title{display:none!important}
body[data-ui-version="3"] #app .staff-v3.staff-v3.staff-v3[data-ui-view="workforce-employees"] .staff-section-head h3{font-size:20px!important;color:var(--tp-ink)!important;}
body[data-ui-version="3"] #app .staff-v3.staff-v3.staff-v3[data-ui-view="workforce-employees"] .staff-head-pill{margin-left:auto!important;background:var(--tp-surface)!important;color:var(--tp-ink)!important;font-size:13px!important}
body[data-ui-version="3"] #app .staff-v3.staff-v3.staff-v3[data-ui-view="workforce-employees"] .employee-directory{display:grid!important;grid-template-columns:1fr 1fr auto!important;gap:6px!important;padding:0!important;margin:0!important;background:transparent!important}
body[data-ui-version="3"] #app .staff-v3.staff-v3.staff-v3[data-ui-view="workforce-employees"] .employee-departments{grid-column:1/-1!important;display:flex!important;gap:5px!important;overflow:visible!important;flex-wrap:nowrap!important;padding:0!important}
body[data-ui-version="3"] #app .staff-v3.staff-v3.staff-v3[data-ui-view="workforce-employees"] .employee-departments button{flex:1!important;min-width:0!important;min-height:30px!important;padding:3px!important;background:var(--tp-surface)!important;color:var(--tp-ink)!important;border:1px solid var(--tp-edge)!important;border-radius:8px!important;font-size:12px!important;white-space:normal!important;box-shadow:none!important}
body[data-ui-version="3"] #app .staff-v3.staff-v3.staff-v3[data-ui-view="workforce-employees"] .employee-departments button[aria-selected="true"]{background:var(--tp-blue)!important;color:#10324f!important;border-color:var(--tp-edge)!important;box-shadow:none!important}
body[data-ui-version="3"] #app .staff-v3.staff-v3.staff-v3[data-ui-view="workforce-employees"] .employee-departments button:nth-child(3n+2)[aria-selected="true"]{background:var(--tp-blue)!important;color:#10324f!important;}
body[data-ui-version="3"] #app .staff-v3.staff-v3.staff-v3[data-ui-view="workforce-employees"] .employee-departments button:nth-child(3n)[aria-selected="true"]{background:var(--tp-blue)!important;color:#10324f!important;}
body[data-ui-version="3"] #app .staff-v3.staff-v3.staff-v3[data-ui-view="workforce-employees"] .employee-search,body[data-ui-version="3"] #app .staff-v3.staff-v3.staff-v3[data-ui-view="workforce-employees"] .employee-directory-filters,body[data-ui-version="3"] #app .staff-v3.staff-v3.staff-v3[data-ui-view="workforce-employees"] .employee-directory-meta,body[data-ui-version="3"] #app .staff-v3.staff-v3.staff-v3[data-ui-view="workforce-employees"] .employee-directory-meta>span{display:flex!important;align-items:center!important;gap:4px!important;min-width:0!important;margin:0!important;padding:0!important;background:transparent!important;color:var(--tp-ink)!important;font-size:11px!important}
body[data-ui-version="3"] #app .staff-v3.staff-v3.staff-v3[data-ui-view="workforce-employees"] .employee-search label{display:flex!important;min-width:0!important;flex:1!important}
body[data-ui-version="3"] #app .staff-v3.staff-v3.staff-v3[data-ui-view="workforce-employees"] .employee-search label>span{display:none!important}
body[data-ui-version="3"] #app .staff-v3.staff-v3.staff-v3[data-ui-view="workforce-employees"] .employee-directory-filters label{display:flex!important;align-items:center!important;gap:3px!important;min-width:0!important}
body[data-ui-version="3"] #app .staff-v3.staff-v3.staff-v3[data-ui-view="workforce-employees"] .employee-template-v2 :is(input,select){min-width:0!important;width:auto!important;max-width:100%!important;height:28px!important;min-height:28px!important;padding:3px!important;border:1px solid var(--tp-edge)!important;border-radius:7px!important;background:var(--tp-surface)!important;color:var(--tp-ink)!important;font-size:11px!important}
body[data-ui-version="3"] #app .staff-v3.staff-v3.staff-v3[data-ui-view="workforce-employees"] .employee-search input{width:100%!important}
body[data-ui-version="3"] #app .staff-v3.staff-v3.staff-v3[data-ui-view="workforce-employees"] .employee-template-v2 button{min-height:28px!important;padding:3px 7px!important;border-radius:8px!important;background:var(--tp-surface)!important;color:var(--tp-ink)!important;border:1px solid var(--tp-edge)!important;font-size:12px!important;box-shadow:none!important;filter:none!important}
body[data-ui-version="3"] #app .staff-v3.staff-v3.staff-v3[data-ui-view="workforce-employees"] .employee-template-cards{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;grid-auto-rows:max-content!important;gap:10px!important;min-height:0!important;overflow:auto!important;align-content:start!important}
body[data-ui-version="3"] #app .staff-v3.staff-v3.staff-v3[data-ui-view="workforce-employees"] .employee-template-cards>.employee-tile{position:relative!important;display:grid!important;grid-template-columns:44% minmax(0,1fr)!important;grid-template-rows:minmax(0,1fr) 30px!important;gap:4px!important;min-height:0!important;min-width:0!important;height:auto!important;padding:6px!important;margin:0!important;overflow:hidden!important;background:var(--tp-surface)!important;color:var(--tp-ink)!important;border:1px solid var(--tp-edge)!important;border-radius:14px!important;box-shadow:var(--tp-shadow)!important;}
body[data-ui-version="3"] #app .staff-v3.staff-v3.staff-v3[data-ui-view="workforce-employees"] .employee-template-cards .emp-portrait{position:static!important;grid-row:1!important;grid-column:1!important;align-self:center!important;width:100%!important;height:auto!important;aspect-ratio:1!important;margin:0!important;border:0!important;border-radius:10px!important;background-color:var(--tp-surface)!important;background-size:400% 100%!important;background-position:calc(var(--avatar) * 100% / 3) top!important}
body[data-ui-version="3"] #app .staff-v3.staff-v3.staff-v3[data-ui-view="workforce-employees"] .employee-template-cards .emp-portrait.tier-art{height:100%!important;aspect-ratio:auto!important;background-size:contain!important;background-position:center!important;background-repeat:no-repeat!important}
body[data-ui-version="3"] #app .staff-v3.staff-v3.staff-v3[data-ui-view="workforce-employees"] .employee-template-cards .emp-head{display:flex!important;flex-direction:column!important;justify-content:center!important;gap:4px!important;grid-column:2!important;grid-row:1!important;min-width:0!important;padding:0!important;background:transparent!important;overflow:auto!important}
body[data-ui-version="3"] #app .staff-v3.staff-v3.staff-v3[data-ui-view="workforce-employees"] .employee-template-cards .emp-head>b{padding:3px!important;border-radius:6px!important;background:var(--tp-surface)!important;color:var(--tp-ink)!important;font-size:15px!important;white-space:normal!important}
body[data-ui-version="3"] #app .staff-v3.staff-v3.staff-v3[data-ui-view="workforce-employees"] .employee-template-cards :is(.emp-level,.emp-tag,.apt-tag,.emp-specialty,.employee-role){position:static!important;padding:1px 3px!important;margin:0!important;background:#e8effc!important;color:#354568!important;border:0!important;border-radius:5px!important;font-size:11px!important;white-space:normal!important}
body[data-ui-version="3"] #app .staff-v3.staff-v3.staff-v3[data-ui-view="workforce-employees"] .employee-template-cards .employee-rarity{position:absolute!important;top:6px!important;left:6px!important;right:auto!important;min-width:0!important;width:auto!important;padding:2px 5px!important;background:#e5defa!important;color:#45376d!important;border:1px solid white!important;font-size:12px!important;box-shadow:none!important}
body[data-ui-version="3"] #app .staff-v3.staff-v3.staff-v3[data-ui-view="workforce-employees"] .employee-template-cards .emp-stars{color:var(--tp-ink)!important;font-size:12px!important;letter-spacing:0!important}
body[data-ui-version="3"] #app .staff-v3.staff-v3.staff-v3[data-ui-view="workforce-employees"] .employee-template-cards .ability-bar{display:flex!important;flex-wrap:wrap!important;gap:2px!important;color:var(--tp-ink)!important;font-size:10px!important}
body[data-ui-version="3"] #app .staff-v3.staff-v3.staff-v3[data-ui-view="workforce-employees"] .employee-template-cards .ability-bar small{background:var(--tp-surface)!important;color:var(--tp-ink)!important;font-size:10px!important}
body[data-ui-version="3"] #app .staff-v3.staff-v3.staff-v3[data-ui-view="workforce-employees"] .employee-template-cards .ability-bar i{background:var(--tp-surface)!important;height:5px!important}
body[data-ui-version="3"] #app .staff-v3.staff-v3.staff-v3[data-ui-view="workforce-employees"] .employee-template-cards .ability-bar i b{background:#9289d5!important}
body[data-ui-version="3"] #app .staff-v3.staff-v3.staff-v3[data-ui-view="workforce-employees"] .employee-template-cards .employee-open-detail{position:static!important;grid-column:1/-1!important;grid-row:2!important;width:100%!important;height:28px!important;min-height:28px!important;margin:0!important;background:var(--tp-surface)!important;color:var(--tp-ink)!important;}
body[data-ui-version="3"] #app .staff-v3.staff-v3.staff-v3[data-ui-view="workforce-employees"] .employee-template-v2>.emp-note{grid-column:1/-1!important;margin:0!important;font-size:12px!important;color:var(--tp-ink)!important;}
body[data-ui-version="3"] #app .staff-v3.staff-v3.staff-v3[data-ui-view="workforce-employees"] .employee-detail-dialog{background:var(--tp-surface)!important;color:var(--tp-ink)!important;max-height:90dvh!important}
body[data-ui-version="3"] #app .staff-v3.staff-v3.staff-v3[data-ui-view="workforce-employees"] .employee-detail-dialog>header{background:var(--tp-surface)!important;color:var(--tp-ink)!important;}
body[data-ui-version="3"] #app .staff-v3.staff-v3.staff-v3[data-ui-view="workforce-employees"] .employee-detail-dialog .staff-detail-body{background:var(--tp-surface)!important;color:var(--tp-ink)!important;}
body[data-ui-version="3"] #app .staff-v3.staff-v3.staff-v3[data-ui-view="workforce-employees"] .employee-template-v2 button:disabled{background:var(--tp-disabled)!important;color:var(--tp-muted)!important;opacity:1!important}
@media(max-width:560px){
/* 10-26 直式窄螢幕卡片 4 欄太窄、中文被擠成逐字直排 → 改 2 欄 */
body[data-ui-version="3"] #app#app#app .staff-v3.staff-v3.staff-v3[data-ui-view="workforce-employees"] .employee-template-cards{grid-template-columns:repeat(2,minmax(0,1fr))!important;grid-template-rows:none!important}
}
@media(max-height:500px){
body[data-ui-version="3"] #app .player-sheet.player-sheet.player-sheet[data-scene-panel="staff"][data-ui-view="workforce-employees"]>.sheet-scroll{top:46px!important;bottom:6px!important}
body[data-ui-version="3"] #app .player-sheet.player-sheet.player-sheet[data-ui-view="workforce-employees"]>.sheet-head{top:4px!important;height:36px!important}
body[data-ui-version="3"] #app .staff-v3.staff-v3.staff-v3[data-ui-view="workforce-employees"]{grid-template-columns:90px minmax(0,1fr)!important;gap:6px!important}
body[data-ui-version="3"] #app .staff-v3.staff-v3.staff-v3[data-ui-view="workforce-employees"] >[data-staff-section="employees"]{padding:6px!important;gap:4px!important}
body[data-ui-version="3"] #app .staff-v3.staff-v3.staff-v3[data-ui-view="workforce-employees"] .staff-section-head{min-height:22px!important}
body[data-ui-version="3"] #app .staff-v3.staff-v3.staff-v3[data-ui-view="workforce-employees"] .staff-section-head h3{font-size:15px!important}
body[data-ui-version="3"] #app .staff-v3.staff-v3.staff-v3[data-ui-view="workforce-employees"] .employee-template-cards{gap:5px!important}
body[data-ui-version="3"] #app .staff-v3.staff-v3.staff-v3[data-ui-view="workforce-employees"] .employee-template-cards .emp-head{gap:2px!important}
body[data-ui-version="3"] #app .staff-v3.staff-v3.staff-v3[data-ui-view="workforce-employees"] .employee-template-cards .emp-head>b{font-size:12px!important}
body[data-ui-version="3"] #app .staff-v3.staff-v3.staff-v3[data-ui-view="workforce-employees"] .staff-v4-tabs button{min-height:28px!important;font-size:11px!important;padding:3px!important}
body[data-ui-version="3"] #app .staff-v3.staff-v3.staff-v3[data-ui-view="workforce-employees"] .employee-template-cards>.employee-tile{padding:4px!important;grid-template-rows:minmax(0,1fr) 28px!important}
}
body[data-ui-version="3"] #app .staff-v3.staff-v3.staff-v3[data-ui-view="workforce-employees"] >:is(.staff-command-hero,.staff-summary,.staff-jump,.staff-overview){display:none!important}
body[data-ui-version="3"] #app .staff-v3.staff-v3.staff-v3[data-ui-view="workforce-employees"] .staff-section-head>div{flex:1!important;min-width:0!important;width:auto!important}
body[data-ui-version="3"] #app .staff-v3.staff-v3.staff-v3[data-ui-view="workforce-employees"] .staff-head-pill{position:static!important;width:auto!important;min-width:0!important;flex:none!important;display:flex!important;gap:6px!important;white-space:nowrap!important}
body[data-ui-version="3"] #app .staff-v3.staff-v3.staff-v3[data-ui-view="workforce-employees"] .employee-search{grid-column:1!important;grid-row:2!important;width:auto!important}
body[data-ui-version="3"] #app .staff-v3.staff-v3.staff-v3[data-ui-view="workforce-employees"] .employee-search button{flex:none!important;width:auto!important}
body[data-ui-version="3"] #app .staff-v3.staff-v3.staff-v3[data-ui-view="workforce-employees"] .employee-search label{width:auto!important}
body[data-ui-version="3"] #app .staff-v3.staff-v3.staff-v3[data-ui-view="workforce-employees"] .employee-directory-filters{grid-column:2!important;grid-row:2!important;width:auto!important}
body[data-ui-version="3"] #app .staff-v3.staff-v3.staff-v3[data-ui-view="workforce-employees"] .employee-directory-meta{grid-column:3!important;grid-row:2!important;width:auto!important;gap:6px!important}
body[data-ui-version="3"] #app .staff-v3.staff-v3.staff-v3[data-ui-view="workforce-employees"] .employee-directory-meta>span{width:auto!important}
body[data-ui-version="3"] #app .staff-v3.staff-v3.staff-v3[data-ui-view="workforce-employees"] .employee-directory-meta button{width:28px!important}
body[data-ui-version="3"] #app .staff-v3.staff-v3.staff-v3[data-ui-view="workforce-employees"] .employee-directory-meta select{width:64px!important}
body[data-ui-version="3"] #app .staff-v3.staff-v3.staff-v3[data-ui-view="workforce-employees"] .employee-template-cards .emp-level{display:block!important}
body[data-ui-version="3"] #app .staff-v3.staff-v3.staff-v3[data-ui-view="workforce-employees"] .employee-template-cards .employee-tile::after,body[data-ui-version="3"] #app .staff-v3.staff-v3.staff-v3[data-ui-view="workforce-employees"] .employee-template-cards .employee-tile::before{display:none!important}
body[data-ui-version="3"] #app .staff-v3.staff-v3.staff-v3[data-ui-view="workforce-employees"] .employee-template-cards .emp-head{justify-content:flex-start!important;scrollbar-width:thin!important}
body[data-ui-version="3"] #app .player-sheet.player-sheet.player-sheet[data-ui-view="workforce-employees"]{box-shadow:none!important}
@media(max-height:500px){
body[data-ui-version="3"] #app .staff-v3.staff-v3.staff-v3[data-ui-view="workforce-employees"] .staff-v4-tabs button{height:auto!important;min-height:28px!important;line-height:1.1!important;display:block!important;font-size:10px!important}
body[data-ui-version="3"] #app .staff-v3.staff-v3.staff-v3[data-ui-view="workforce-employees"] .staff-v4-tabs button span{display:none!important}
body[data-ui-version="3"] #app .staff-v3.staff-v3.staff-v3[data-ui-view="workforce-employees"] .staff-v4-tabs{gap:3px!important;padding:5px!important}
body[data-ui-version="3"] #app .staff-v3.staff-v3.staff-v3[data-ui-view="workforce-employees"] .employee-template-cards .emp-head{gap:1px!important}
body[data-ui-version="3"] #app .staff-v3.staff-v3.staff-v3[data-ui-view="workforce-employees"] .employee-template-cards .emp-head>:is(.emp-tag,.apt-tag,.emp-specialty,.employee-role,.emp-stars){display:none!important}
body[data-ui-version="3"] #app .staff-v3.staff-v3.staff-v3[data-ui-view="workforce-employees"] .employee-template-cards .emp-head>b{font-size:11px!important;padding:1px!important}
body[data-ui-version="3"] #app .staff-v3.staff-v3.staff-v3[data-ui-view="workforce-employees"] .employee-template-cards .emp-level{font-size:10px!important;order:1!important}
body[data-ui-version="3"] #app .staff-v3.staff-v3.staff-v3[data-ui-view="workforce-employees"] .employee-template-cards .ability-bar{order:2!important;font-size:10px!important}
body[data-ui-version="3"] #app .staff-v3.staff-v3.staff-v3[data-ui-view="workforce-employees"] .employee-template-cards .emp-portrait{align-self:stretch!important;height:100%!important;aspect-ratio:auto!important}
body[data-ui-version="3"] #app .staff-v3.staff-v3.staff-v3[data-ui-view="workforce-employees"] .employee-template-cards .employee-open-detail{font-size:10px!important;line-height:1.1!important;padding:2px!important}
}

@media(max-height:500px){
body[data-ui-version="3"] #app .staff-v3.staff-v3.staff-v3[data-ui-view="workforce-employees"] .employee-template-cards .ability-bar{display:flex!important;flex-wrap:nowrap!important;align-items:center!important;font-size:9px!important;white-space:nowrap!important}
body[data-ui-version="3"] #app .staff-v3.staff-v3.staff-v3[data-ui-view="workforce-employees"] .employee-template-cards .ability-bar i{display:none!important}
body[data-ui-version="3"] #app .staff-v3.staff-v3.staff-v3[data-ui-view="workforce-employees"] .employee-template-cards .ability-bar small{font-size:8px!important;padding:0!important}
}

@media(max-height:500px){body[data-ui-version="3"] #app .staff-v3.staff-v3.staff-v3[data-ui-view="workforce-employees"] .employee-template-cards .ability-bar{display:grid!important;grid-template-columns:minmax(0,1fr)!important;gap:0!important;line-height:1.1!important}body[data-ui-version="3"] #app .staff-v3.staff-v3.staff-v3[data-ui-view="workforce-employees"] .employee-template-cards .ability-bar strong{font-size:10px!important}}

@media(max-height:500px){body[data-ui-version="3"] #app .staff-v3.staff-v3.staff-v3[data-ui-view="workforce-employees"] .employee-template-cards .emp-head>:is(b,.emp-level){line-height:11px!important;min-height:0!important;height:12px!important;padding:0 2px!important;flex:none!important;margin:0!important}body[data-ui-version="3"] #app .staff-v3.staff-v3.staff-v3[data-ui-view="workforce-employees"] .employee-template-cards .ability-bar{margin:0!important;padding:0!important;min-height:0!important}}
/* v659b: opaque detail surfaces and accessible gold/blue actions. */
body[data-ui-version="3"] #app .staff-v3.staff-v3.staff-v3[data-ui-view="workforce-employees"] .employee-detail-dialog{background:var(--tp-surface)!important;color:var(--tp-ink)!important;color-scheme:light}
body[data-ui-version="3"] #app .staff-v3.staff-v3.staff-v3[data-ui-view="workforce-employees"] .employee-detail-dialog::backdrop{background:rgba(28,39,65,.55)!important}
body[data-ui-version="3"] #app .staff-v3.staff-v3.staff-v3[data-ui-view="workforce-employees"] .employee-detail-dialog :is(.emp-fatigue,.emp-fatigue-tag,.emp-care,.emp-rest,.emp-off,.emp-warn){background:var(--tp-surface)!important;color:var(--tp-ink)!important;border-color:var(--tp-edge)!important;}
body[data-ui-version="3"] #app .staff-v3.staff-v3.staff-v3[data-ui-view="workforce-employees"] .employee-detail-dialog :is(.emp-fatigue,.emp-care) :is(b,small,span,p){color:var(--tp-ink)!important;}
body[data-ui-version="3"] #app .staff-v3.staff-v3.staff-v3[data-ui-view="workforce-employees"] .employee-detail-dialog button{background:var(--tp-surface)!important;color:var(--tp-ink)!important;border-color:var(--tp-edge)!important;}
body[data-ui-version="3"] #app .staff-v3.staff-v3.staff-v3[data-ui-view="workforce-employees"] .employee-detail-dialog :is(.emp-rest,.emp-care,.emp-dismiss) .btn:not([data-emp-dismiss]):not([data-emp-off]){background:var(--tp-primary)!important;color:#10324f!important;border-color:var(--tp-edge)!important;}
body[data-ui-version="3"] #app .staff-v3.staff-v3.staff-v3[data-ui-view="workforce-employees"] .employee-detail-dialog button:disabled{background:var(--tp-disabled)!important;color:var(--tp-muted)!important;opacity:1!important}
body[data-ui-version="3"] #app .staff-v3.staff-v3.staff-v3[data-ui-view="workforce-employees"] .employee-detail-dialog meter::-webkit-meter-bar{background:#e4e8f4!important}
body[data-ui-version="3"] #app .staff-v3.staff-v3.staff-v3[data-ui-view="workforce-employees"] .employee-detail-dialog meter::-webkit-meter-optimum-value{background:#829bd1!important}

/* v682: scroll the roster, never compress its cards to the viewport. */
body[data-ui-version="3"] #app .staff-v3.staff-v3.staff-v3[data-ui-view="workforce-employees"] .employee-template-cards{overscroll-behavior:contain;scrollbar-gutter:stable;}
body[data-ui-version="3"] #app .staff-v3.staff-v3.staff-v3[data-ui-view="workforce-employees"] .employee-template-cards>.employee-tile{min-height:180px!important;grid-template-rows:auto auto!important;align-content:start!important;}
body[data-ui-version="3"] #app .staff-v3.staff-v3.staff-v3[data-ui-view="workforce-employees"] .employee-template-cards .emp-head{overflow:visible!important;align-self:start!important;min-height:136px!important;}
body[data-ui-version="3"] #app .staff-v3.staff-v3.staff-v3[data-ui-view="workforce-employees"] .employee-template-cards .emp-head>b{overflow:visible!important;overflow-wrap:anywhere!important;line-height:1.35!important;height:auto!important;flex-shrink:0!important;}
body[data-ui-version="3"] #app .staff-v3.staff-v3.staff-v3[data-ui-view="workforce-employees"] .employee-template-cards .emp-portrait{align-self:center!important;width:100%!important;height:auto!important;aspect-ratio:272/362!important;min-height:64px!important;object-fit:contain!important;}
body[data-ui-version="3"] #app .staff-v3.staff-v3.staff-v3[data-ui-view="workforce-employees"] .employee-template-cards .emp-portrait.tier-art{aspect-ratio:64/90!important;background-size:contain!important;}
body[data-ui-version="3"] #app .staff-v3.staff-v3.staff-v3[data-ui-view="workforce-employees"] .employee-template-cards>.v2-extra .emp-head{grid-column:auto!important;}
body[data-ui-version="3"] #app .staff-v3.staff-v3.staff-v3[data-ui-view="workforce-employees"] .employee-template-cards>.v2-extra>button{grid-column:1/-1!important;grid-row:2!important;position:static!important;height:auto!important;min-height:28px!important;}
body[data-ui-version="3"] #app .staff-v3.staff-v3.staff-v3[data-ui-view="workforce-employees"] .employee-template-cards>.v2-extra .employee-role{display:block!important;}
body[data-ui-version="3"] #app .staff-v3.staff-v3.staff-v3[data-ui-view="workforce-employees"] .employee-template-cards img{object-fit:contain!important;}
body[data-ui-version="3"] #app .staff-v3.staff-v3.staff-v3[data-ui-view="workforce-employees"] .employee-template-cards .emp-head>:is(b,.emp-level){height:auto!important;min-height:16px!important;line-height:1.35!important;}

/* v683: eight intact cards, two rows, with detail actions outside the overview. */
body[data-ui-version="3"] #app#app#app .staff-v3[data-ui-view="workforce-employees"] .employee-template-cards{grid-template-columns:repeat(4,minmax(0,1fr))!important;grid-template-rows:repeat(2,minmax(0,1fr))!important;grid-auto-rows:auto!important;align-content:stretch!important;overflow:visible!important;scrollbar-gutter:auto!important;gap:8px!important}
body[data-ui-version="3"] #app#app#app .staff-v3[data-ui-view="workforce-employees"] .employee-template-cards>.employee-tile{grid-template-columns:46% minmax(0,1fr)!important;grid-template-rows:minmax(0,1fr) 28px!important;align-content:stretch!important;min-height:0!important;height:100%!important;padding:6px!important;overflow:visible!important;background:#fffaf1!important;border-color:#d8cbb6!important}
body[data-ui-version="3"] #app#app#app .staff-v3[data-ui-view="workforce-employees"] .employee-template-cards .emp-head{min-height:0!important;align-self:stretch!important;justify-content:center!important;gap:3px!important;padding-top:20px!important;overflow:visible!important}
body[data-ui-version="3"] #app#app#app .staff-v3[data-ui-view="workforce-employees"] .employee-template-cards .emp-portrait{min-height:0!important;max-height:100%!important;max-width:100%!important;width:auto!important;height:100%!important;justify-self:center!important;aspect-ratio:272/362!important;background-color:transparent!important}
body[data-ui-version="3"] #app#app#app .staff-v3[data-ui-view="workforce-employees"] .employee-template-cards .emp-portrait.tier-art{height:100%!important;width:auto!important;aspect-ratio:64/90!important;background-size:contain!important}
body[data-ui-version="3"] #app#app#app .staff-v3[data-ui-view="workforce-employees"] .employee-template-cards .employee-rarity{left:auto!important;right:6px!important;top:4px!important;font-size:12px!important}
body[data-ui-version="3"] #app#app#app .staff-v3[data-ui-view="workforce-employees"] .employee-template-cards .employee-open-detail{grid-column:auto!important;grid-row:auto!important;width:100%!important;height:auto!important;min-height:0!important;padding:0!important;background:transparent!important;border:0!important;text-align:left!important;font-size:12px!important;line-height:1.2!important;white-space:normal!important;overflow-wrap:anywhere!important}
body[data-ui-version="3"] #app#app#app .staff-v3[data-ui-view="workforce-employees"] .employee-template-cards .emp-specialty{font-size:12px!important;line-height:1.2!important;background:transparent!important;padding:0!important}
body[data-ui-version="3"] #app#app#app .staff-v3[data-ui-view="workforce-employees"] .employee-template-cards .emp-stars{font-size:12px!important;line-height:1!important;color:#a6710a!important}
body[data-ui-version="3"] #app#app#app .staff-v3[data-ui-view="workforce-employees"] .employee-card-footer{grid-column:1/-1!important;grid-row:2!important;display:flex!important;align-items:center!important;gap:6px!important;min-width:0!important}
body[data-ui-version="3"] #app#app#app .staff-v3[data-ui-view="workforce-employees"] .employee-card-footer .emp-level{font-size:12px!important;white-space:nowrap!important;background:transparent!important;color:#302b23!important}
body[data-ui-version="3"] #app#app#app .staff-v3[data-ui-view="workforce-employees"] .employee-card-footer .ability-bar{flex:1!important;display:grid!important;grid-template-columns:1fr auto!important;gap:1px!important;font-size:12px!important;min-width:0!important}
body[data-ui-version="3"] #app#app#app .staff-v3[data-ui-view="workforce-employees"] .employee-card-footer .ability-bar small{font-size:12px!important;white-space:nowrap!important}
body[data-ui-version="3"] #app#app#app .staff-v3[data-ui-view="workforce-employees"] .employee-card-footer .ability-bar i{grid-row:2!important;grid-column:1/-1!important;height:5px!important;width:100%!important;background:#e9e1d0!important}
body[data-ui-version="3"] #app#app#app .staff-v3[data-ui-view="workforce-employees"] .employee-card-footer .ability-bar i b{background:#c99c45!important}
body[data-ui-version="3"] #app#app#app .staff-v3[data-ui-view="workforce-employees"] .employee-template-v2{grid-template-rows:auto auto minmax(0,1fr)!important;gap:4px!important;padding:6px!important}
body[data-ui-version="3"] #app#app#app .staff-v3[data-ui-view="workforce-employees"] .employee-directory{grid-template-columns:minmax(100px,1fr) auto auto!important;gap:3px!important}
body[data-ui-version="3"] #app#app#app .staff-v3[data-ui-view="workforce-employees"] .employee-line-tabs{grid-column:1/-1!important;display:flex!important;overflow-x:auto!important;overflow-y:hidden!important;gap:4px!important;min-width:0!important;scrollbar-width:none!important}
body[data-ui-version="3"] #app#app#app .staff-v3[data-ui-view="workforce-employees"] .employee-line-tabs button{flex:none!important;white-space:nowrap!important}
body[data-ui-version="3"] #app#app#app .staff-v3[data-ui-view="workforce-employees"] .employee-template-v2 :is(input,select,button,.employee-directory-meta,.employee-directory-filters){font-size:12px!important}
body[data-ui-version="3"] #app#app#app .staff-v3[data-ui-view="workforce-employees"] .employee-template-v2 button[aria-selected="true"]{background:#f3d591!important;color:#473317!important;border-color:#b88836!important}
body[data-ui-version="3"] #app#app#app .staff-v3[data-ui-view="workforce-employees"] .employee-template-cards>.v2-extra .emp-head{padding-top:0!important}
body[data-ui-version="3"] #app#app#app .staff-v3[data-ui-view="workforce-employees"] .staff-v4-tabs{overflow:visible!important;gap:3px!important;padding:3px!important}
body[data-ui-version="3"] #app#app#app .staff-v3[data-ui-view="workforce-employees"] .staff-v4-tabs button{font-size:12px!important;min-height:28px!important;padding:3px!important}
body[data-ui-version="3"] #app#app#app .staff-v3[data-ui-view="workforce-employees"] .staff-v4-tabs button[aria-selected="true"]{background:#f3d591!important;color:#473317!important}
body[data-ui-version="3"] #app#app#app .staff-v3[data-ui-view="workforce-employees"] .employee-template-cards .employee-rarity.apt-white{background:#f0eee9!important;color:#4b4740!important}
body[data-ui-version="3"] #app#app#app .staff-v3[data-ui-view="workforce-employees"] .employee-template-cards .employee-rarity.apt-green{background:#d6edc9!important;color:#36512c!important}
body[data-ui-version="3"] #app#app#app .staff-v3[data-ui-view="workforce-employees"] .employee-template-cards .employee-rarity.apt-blue{background:#d9e6fa!important;color:#294c82!important}
body[data-ui-version="3"] #app#app#app .staff-v3[data-ui-view="workforce-employees"] .employee-template-cards .employee-rarity.apt-purple{background:#eadcfa!important;color:#663799!important}
body[data-ui-version="3"] #app#app#app .staff-v3[data-ui-view="workforce-employees"] .employee-template-cards .employee-rarity.apt-gold{background:#ffe09c!important;color:#714400!important}
@media(max-height:500px){body[data-ui-version="3"] #app#app#app .staff-v3[data-ui-view="workforce-employees"] .employee-template-cards{gap:4px!important}body[data-ui-version="3"] #app#app#app .staff-v3[data-ui-view="workforce-employees"] .employee-template-cards>.employee-tile{padding:4px!important;grid-template-rows:minmax(0,1fr) 26px!important}body[data-ui-version="3"] #app#app#app .staff-v3[data-ui-view="workforce-employees"] .employee-template-cards .emp-head{gap:1px!important;padding-top:14px!important}body[data-ui-version="3"] #app#app#app .staff-v3[data-ui-view="workforce-employees"] .employee-template-cards .employee-rarity{top:2px!important;padding:0 4px!important}body[data-ui-version="3"] #app#app#app .staff-v3[data-ui-view="workforce-employees"] .staff-section-head{display:none!important}body[data-ui-version="3"] #app#app#app .staff-v3[data-ui-view="workforce-employees"] .employee-template-v2{grid-template-rows:auto minmax(0,1fr)!important}body[data-ui-version="3"] #app#app#app .staff-v3[data-ui-view="workforce-employees"] .employee-directory-meta>b{font-size:12px!important}}

body[data-ui-version="3"] #app#app#app .employee-template-cards :is(.emp-specialty,.emp-stars,.ability-bar i){display:block!important}
body[data-ui-version="3"] #app#app#app .employee-template-cards .employee-open-detail{box-shadow:none!important}

/* Hidden panels must remain hidden when a template sets display with !important. */
body[data-ui-version="3"] #app#app#app [data-home-panel][hidden],body[data-ui-version="3"] #app#app#app [data-staff-section][hidden]{display:none!important}

body .viewport-pager{display:flex!important;grid-column:1/-1!important;align-items:center!important;justify-content:flex-end!important;gap:6px!important;min-height:30px!important;height:30px!important;margin:0!important;padding:0!important;background:#fff8ea!important;color:#49361f!important}
body .viewport-pager :is(button,select){height:28px!important;min-height:28px!important;min-width:32px!important;padding:2px 8px!important;border:1px solid #cbb486!important;border-radius:8px!important;background:#fffaf0!important;color:#49361f!important;font-size:12px!important}
body [data-viewport-item]{max-width:100%!important;box-sizing:border-box!important}
body [data-viewport-item] :is(small,p,span,label,button,select){font-size:max(12px,1em)}

body .viewport-pager{grid-row:1!important}
body[data-ui-version="3"] #app#app#app .department-tabs button[aria-pressed="true"]{background:#f3d591!important;color:#49361f!important;border-color:#b88836!important}

body[data-ui-version="3"] #app#app#app .staff-v3 .dorm-res{display:grid!important;grid-template-columns:48px minmax(0,1fr) auto!important;gap:6px!important;padding:6px!important;min-height:110px!important;font-size:12px!important}
body[data-ui-version="3"] #app#app#app .staff-v3 .dorm-res>.emp-portrait{width:48px!important;height:auto!important;aspect-ratio:272/362!important;align-self:center!important;background-size:400% 100%!important}
body[data-ui-version="3"] #app#app#app .staff-v3 .dorm-res>.emp-portrait.tier-art{background-size:contain!important;background-repeat:no-repeat!important}
body[data-ui-version="3"] #app#app#app .staff-v3 .dorm-res :is(p,small,b,button){font-size:12px!important;line-height:1.25!important;min-height:0!important;margin:0!important}
body[data-ui-version="3"] #app#app#app .staff-v3 .dorm-res .emp-fatigue{display:flex!important;flex-wrap:wrap!important;gap:3px!important}
@media(max-height:500px){
body[data-ui-version="3"] #app#app#app .staff-v3 :is(.staff-v4-tabs,.dorm-tabs){min-height:28px!important;height:28px!important;padding:0!important;gap:3px!important;overflow-x:auto!important;overflow-y:hidden!important;flex-wrap:nowrap!important}
body[data-ui-version="3"] #app#app#app .staff-v3 :is(.staff-v4-tabs,.dorm-tabs) button{min-height:28px!important;height:28px!important;padding:2px 6px!important;font-size:12px!important;white-space:nowrap!important;flex-shrink:0!important}
body[data-ui-version="3"] #app#app#app .staff-v3[data-ui-view="workforce-employees"] .staff-v4-tabs{height:auto!important;overflow:visible!important}
}

/* v683: intrinsic artwork proportions and compact, wrapping department tabs. */
body[data-ui-version="3"] #app#app#app .staff-v3 .dorm-art{width:100%!important;height:auto!important;max-height:min(240px,25dvh)!important;object-fit:contain!important}
body[data-ui-version="3"] #app#app#app .employee-departments{display:flex!important;flex-wrap:wrap!important;overflow:visible!important;gap:3px!important}
body[data-ui-version="3"] #app#app#app .employee-departments button{flex:1 0 auto!important;font-size:12px!important;padding:3px 6px!important;min-height:26px!important}
body[data-ui-version="3"] #app#app#app .employee-line-tabs{grid-column:auto!important;align-items:center!important;overflow:visible!important}
body[data-ui-version="3"] #app#app#app .employee-line-tabs select{max-width:160px!important;min-width:0!important}
body[data-ui-version="3"] #app#app#app .employee-directory:has(.employee-line-tabs){grid-template-columns:minmax(100px,1fr) minmax(160px,1fr) auto auto!important}
body[data-ui-version="3"] #app#app#app .inv-equipped{position:static!important;height:auto!important;min-height:68px!important;max-height:none!important;padding:10px!important;grid-auto-rows:auto!important}
body[data-ui-version="3"] #app#app#app .dispatch-offline .miner-offline-report{top:60px!important;bottom:auto!important;max-height:65dvh!important;overflow:visible!important}

@media(max-height:500px){
body[data-ui-version="3"] #app#app#app .staff-v3[data-ui-view="workforce-employees"] .employee-template-cards{grid-template-rows:minmax(0,1fr)!important}
body[data-ui-version="3"] #app#app#app .staff-v3[data-ui-view="workforce-employees"] .staff-v4-tabs button{height:auto!important;min-height:28px!important;white-space:normal!important;overflow-wrap:anywhere!important;line-height:1.2!important;flex-shrink:1!important}
body[data-ui-version="3"] #app#app#app .staff-v3[data-ui-view="workforce-employees"] .employee-template-cards .emp-head{justify-content:center!important;gap:4px!important}
}
/* v691: compact department pills and consistent, undistorted portrait crops. */
body[data-ui-version="3"] #app#app#app .employee-departments{justify-content:flex-start!important;align-items:center!important;gap:5px!important;background:transparent!important;border:0!important;padding:0!important}
body[data-ui-version="3"] #app#app#app .employee-departments button{flex:0 0 auto!important;width:auto!important;min-width:0!important;min-height:26px!important;height:26px!important;padding:3px 10px!important;border:1px solid #d8cbb6!important;border-radius:999px!important;background:#fffaf1!important;color:#49361f!important;line-height:18px!important;white-space:nowrap!important;box-shadow:none!important}
body[data-ui-version="3"] #app#app#app .employee-departments button[aria-selected="true"]{background:#f3d591!important;border-color:#b88836!important;color:#473317!important}
body[data-ui-version="3"] #app#app#app .employee-departments button:disabled{background:#eeece7!important;border-color:#dedbd5!important;color:#858078!important;opacity:1!important;cursor:default!important}
body[data-ui-version="3"] #app#app#app .employee-template-cards .employee-tile{--portrait-tint:#ece8df}
body[data-ui-version="3"] #app#app#app .employee-template-cards .apt-green{--portrait-tint:#deedce}
body[data-ui-version="3"] #app#app#app .employee-template-cards .apt-blue{--portrait-tint:#dce7fa}
body[data-ui-version="3"] #app#app#app .employee-template-cards .apt-purple{--portrait-tint:#eadcf6}
body[data-ui-version="3"] #app#app#app .employee-template-cards .apt-gold{--portrait-tint:#ffe5ac}
body[data-ui-version="3"] #app#app#app .staff-v3[data-ui-view="workforce-employees"] .employee-template-cards .emp-portrait{align-self:center!important;justify-self:center!important;width:100%!important;height:auto!important;aspect-ratio:3/4!important;max-width:100%!important;overflow:hidden!important;border-radius:10px!important;background-color:var(--portrait-tint)!important}
body[data-ui-version="3"] #app#app#app .staff-v3[data-ui-view="workforce-employees"] .employee-template-cards .emp-portrait.tier-art{width:100%!important;height:auto!important;aspect-ratio:1/1.75!important;background-image:linear-gradient(145deg,#fffaf3,var(--portrait-tint))!important;position:relative!important}
.emp-portrait>img{display:none}
body[data-ui-version="3"] #app#app#app .staff-v3[data-ui-view="workforce-employees"] .employee-template-cards .emp-portrait.tier-art>img{display:block!important;width:100%!important;height:100%!important;max-height:none!important;object-fit:cover!important;object-position:center top!important}
@media(max-width:900px){body[data-ui-version="3"] #app#app#app .employee-departments{gap:3px!important}body[data-ui-version="3"] #app#app#app .employee-departments button{padding:3px 7px!important}}

body[data-ui-version="3"] #app#app#app .staff-v3[data-ui-view="workforce-employees"] .employee-template-cards .emp-portrait:not(.tier-art){position:relative!important;background-image:linear-gradient(145deg,#fffaf3,var(--portrait-tint))!important}
body[data-ui-version="3"] #app#app#app .staff-v3[data-ui-view="workforce-employees"] .employee-template-cards .emp-portrait .portrait-sprite{display:block!important;position:absolute!important;top:0!important;left:0!important;width:500%!important;max-width:none!important;max-height:none!important;height:auto!important;aspect-ratio:1088/362!important;object-fit:cover!important;object-position:center top!important;transform:translateX(calc(var(--avatar) * -25% - 2.5%))!important}
/* v691b: 全身精靈圖放大 1.6 倍、只露頭到膝，臉的大小對齊半身卡圖 */
body[data-ui-version="3"] #app#app#app .staff-v3[data-ui-view="workforce-employees"] .employee-template-cards .emp-portrait .portrait-sprite{width:800%!important;transform:translateX(calc(var(--avatar) * -25% - 6.25%))!important}
/* v714：小手機橫向（高 ≤380）產線卡與任務左側分頁縮間距，不捲動 */
@media(max-height:380px){body[data-ui-version="3"] #app#app#app .lines-v4 .line-command-board{padding:2px!important;gap:2px!important}body[data-ui-version="3"] #app#app#app .lines-v4 .line-grid{padding:2px!important}body[data-ui-version="3"] #app#app#app .lines-v4 .line-card{padding:2px 6px!important;gap:1px!important}body[data-ui-version="3"] #app#app#app .lines-v4 .line-card .production-metrics{line-height:1.05!important}body[data-ui-version="3"] #app#app#app .lines-v4 .line-card :is(.production-info,.line-controls-toggle){min-height:26px!important;padding:2px 6px!important}body[data-ui-version="3"] #app#app#app .qc-tabs{gap:2px!important;padding:2px!important}}
/* 10-22 員工中心每一頁（職務／福利／宿舍／幹部）共用同一個外框＋左側選單，切頁不跳 */
body[data-ui-version="3"] #app .player-sheet.player-sheet.player-sheet[data-scene-panel="staff"][data-ui-view^="workforce-"]{position:fixed!important;inset:0!important;width:100%!important;height:100dvh!important;max-width:none!important;max-height:none!important;margin:0!important;transform:none!important;border:0!important;border-radius:0!important;background:var(--tp-surface)!important;color:var(--tp-ink)!important;overflow:hidden!important;}
body[data-ui-version="3"] #app .player-sheet.player-sheet.player-sheet[data-scene-panel="staff"][data-ui-view^="workforce-"]>.sheet-head{position:absolute!important;inset:8px 12px auto!important;height:46px!important;min-height:0!important;padding:4px 12px!important;background:var(--tp-surface)!important;border-radius:18px!important;color:var(--tp-ink)!important;}
body[data-ui-version="3"] #app .player-sheet.player-sheet.player-sheet[data-scene-panel="staff"][data-ui-view^="workforce-"]>:is(.sheet-handle,.sheet-environment,.v4-system-rail){display:none!important;}
body[data-ui-version="3"] #app .player-sheet.player-sheet.player-sheet[data-scene-panel="staff"][data-ui-view^="workforce-"]>.sheet-scroll{position:absolute!important;inset:62px 12px 10px!important;padding:0!important;height:auto!important;overflow:hidden!important;}
body[data-ui-version="3"] #app .staff-v3.staff-v3.staff-v3[data-ui-view^="workforce-"]{position:relative!important;inset:auto!important;display:grid!important;grid-template-columns:110px minmax(0,1fr)!important;grid-template-rows:minmax(0,1fr) auto!important;gap:10px!important;width:100%!important;height:100%!important;min-height:0!important;padding:0!important;margin:0!important;background:transparent!important;border:0!important;overflow:hidden!important;color:var(--tp-ink)!important;}
body[data-ui-version="3"] #app .staff-v3.staff-v3.staff-v3[data-ui-view^="workforce-"]>.staff-v4-tabs{position:static!important;display:flex!important;flex-direction:column!important;grid-column:1!important;grid-row:1!important;gap:6px!important;width:auto!important;min-height:0!important;overflow:auto!important;padding:8px!important;background:var(--tp-surface)!important;border-radius:18px!important;}
body[data-ui-version="3"] #app .staff-v3.staff-v3.staff-v3[data-ui-view^="workforce-"] .staff-v4-tabs button{flex:none!important;min-height:42px!important;padding:6px!important;background:var(--tp-surface)!important;color:var(--tp-ink)!important;border:1px solid var(--tp-edge)!important;border-radius:12px!important;font-size:13px!important;white-space:normal!important;}
body[data-ui-version="3"] #app .staff-v3.staff-v3.staff-v3[data-ui-view^="workforce-"] .staff-v4-tabs button[aria-selected="true"]{background:var(--tp-blue)!important;color:#10324f!important;border-color:var(--tp-edge)!important;box-shadow:none!important;}
body[data-ui-version="3"] #app .player-sheet.player-sheet.player-sheet[data-ui-view^="workforce-"]{top:0!important;left:0!important;right:0!important;bottom:0!important;outline:0!important}
body[data-ui-version="3"] #app .player-sheet.player-sheet.player-sheet[data-ui-view^="workforce-"]>.sheet-head{top:8px!important;left:12px!important;right:12px!important;bottom:auto!important}
body[data-ui-version="3"] #app .player-sheet.player-sheet.player-sheet[data-ui-view^="workforce-"]>.sheet-scroll{top:62px!important;left:12px!important;right:12px!important;bottom:10px!important}
body[data-ui-version="3"] #app .staff-v3.staff-v3.staff-v3[data-ui-view^="workforce-"]>[data-staff-section]:not([hidden]){grid-column:2!important;grid-row:1!important;min-height:0!important;margin:0!important;overflow:hidden!important}
/* 10-25 下拉改按鈕後：篩選列的「狀態／排序」標題不要被擠成直排，搜尋框保留最小寬度 */
html body .employee-directory-filters label{display:flex!important;align-items:center;gap:6px;white-space:nowrap}
html body .employee-directory-filters .tap-select{white-space:normal}
body[data-ui-version="3"] #app#app#app#app .staff-v3[data-ui-view="workforce-employees"] .employee-directory{grid-template-columns:minmax(220px,auto) minmax(0,1fr) auto!important}
body[data-ui-version="3"] #app .staff-v3 .employee-directory-filters{min-width:0;flex-wrap:wrap}
/* 10-25 老闆：員工中心「狀態／排序／產線」擠成好幾行、員工卡被切掉 → 收成兩排：
   第一排 搜尋＋狀態＋排序；第二排 產線＋筆數與頁碼；每組選項一排不換行，多的用 ‹ › 分頁（data-tap-per） */
body[data-ui-version="3"] #app#app#app#app#app .staff-v3[data-ui-view="workforce-employees"] .employee-directory{grid-template-columns:minmax(180px,220px) minmax(0,1fr) auto!important;align-items:center!important;row-gap:6px!important}
body[data-ui-version="3"] #app .staff-v3.staff-v3.staff-v3[data-ui-view="workforce-employees"] .employee-directory>:first-child{grid-column:1/-1!important;grid-row:1!important}
body[data-ui-version="3"] #app .staff-v3.staff-v3.staff-v3[data-ui-view="workforce-employees"] .employee-directory>.employee-search{grid-column:1!important;grid-row:2!important}
body[data-ui-version="3"] #app .staff-v3.staff-v3.staff-v3[data-ui-view="workforce-employees"] .employee-directory>.employee-directory-filters{grid-column:2/-1!important;grid-row:2!important;display:flex!important;flex-wrap:nowrap!important;gap:14px!important;align-items:center}
body[data-ui-version="3"] #app .staff-v3.staff-v3.staff-v3[data-ui-view="workforce-employees"] .employee-directory>.employee-line-tabs{grid-column:1/3!important;grid-row:3!important;min-width:0;display:flex!important;align-items:center;gap:6px;white-space:nowrap}
body[data-ui-version="3"] #app .staff-v3.staff-v3.staff-v3[data-ui-view="workforce-employees"] .employee-directory>.employee-directory-meta{grid-column:3!important;grid-row:3!important;display:flex!important;align-items:center;gap:8px;white-space:nowrap}
body[data-ui-version="3"] #app .staff-v3 .employee-directory :is(.employee-directory-filters,.employee-line-tabs,.employee-directory-meta) .tap-select{flex-wrap:nowrap!important;max-height:none!important}
html :is(#app,body) .staff-v3 .employee-directory .tap-select.tap-select.tap-select>button{min-height:30px!important;padding:3px 9px!important;font-size:12px!important}
/* 10-31 員工中心改成首頁圖示格（老闆選 A）：藏左側選單、內容改滿版；圖示格只在 hub 頁出現 */
html body #app#app#app#app .staff-v3.staff-board{grid-template-columns:minmax(0,1fr)!important}
html body #app#app#app#app .staff-v3.staff-board>.staff-v4-tabs{display:none!important}
html body #app#app#app#app .staff-v3.staff-board>:is([data-staff-section],[data-staff-support],.staff-hub-backbar){grid-column:1/-1!important;grid-row:auto!important}
html body #app#app#app#app .staff-v3.staff-board>.staff-hub-backbar{margin:0 0 6px!important;padding:0!important;display:flex!important}
html body #app#app#app#app .staff-v3.staff-board>.staff-hub-backbar[hidden]{display:none!important}
.staff-hub-back{min-height:36px;padding:4px 14px;border:1px solid #cbb486;border-radius:10px;background:#fffaf0;color:#3d3220;font-size:14px;font-weight:800;cursor:pointer}
.staff-hub-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:12px;padding:6px}
.staff-hub-tile{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;min-height:120px;padding:14px 8px;border:1px solid #d9c79d;border-radius:16px;background:linear-gradient(#fffdf6,#f6ecd2);color:#3d3220;cursor:pointer;box-shadow:0 2px 6px #0000001a;transition:transform .12s}
.staff-hub-tile:hover,.staff-hub-tile:focus-visible{transform:translateY(-2px);border-color:#e0b43c}
.staff-hub-tile i{display:grid;place-items:center;width:56px;height:56px;border-radius:50%;background:#f3d591;color:#5a4410;font-size:28px;font-style:normal;line-height:1}
.staff-hub-tile b{font-size:15px;line-height:1.25;text-align:center}
@media(max-width:600px){.staff-hub-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.staff-hub-tile{min-height:96px}.staff-hub-tile i{width:44px;height:44px;font-size:22px}.staff-hub-tile b{font-size:13px}}
html body #app#app#app#app .staff-v3.staff-board>.staff-hub[hidden]{display:none!important}
html body #app#app#app#app .staff-v3.staff-board>.staff-hub:not([hidden]){display:block!important;height:auto!important;min-height:0!important;align-self:start!important;overflow:visible!important;background:none!important;border:0!important;box-shadow:none!important}
html body #app#app#app#app .staff-hub .staff-hub-grid{display:grid!important;grid-template-columns:repeat(auto-fill,minmax(150px,1fr))!important;grid-auto-rows:auto!important;align-content:start!important}
html body #app#app#app#app .staff-hub .staff-hub-tile{height:auto!important;min-height:120px!important;max-height:150px!important}
html body #app#app#app#app .staff-v3.staff-board{grid-template-rows:auto minmax(0,1fr)!important;align-content:stretch!important}
html body #app#app#app#app .staff-v3.staff-board>.staff-hub-backbar:not([hidden]){align-self:start!important;height:auto!important;min-height:0!important}
html body #app#app#app#app .staff-v3.staff-board .staff-hub-back{height:36px!important;min-height:36px!important;align-self:center!important}
/* 10-30 可升儲備幹部：頭像右下角金色徽章 */
.emp-card .emp-promote-badge{position:absolute;right:4px;bottom:4px;z-index:3;padding:2px 7px;border-radius:999px;background:linear-gradient(180deg,#ffe28a,#e9b43a);color:#5a3a00;border:1.5px solid #fff;font-size:12px;font-weight:800;line-height:1.3;box-shadow:0 0 0 2px rgba(233,180,58,.35),0 2px 6px rgba(160,110,0,.35);animation:emp-promote-glow 1.8s ease-in-out infinite;pointer-events:none;white-space:nowrap}
@keyframes emp-promote-glow{50%{box-shadow:0 0 0 4px rgba(233,180,58,.18),0 0 12px rgba(255,200,60,.75)}}
html.reduced-motion .emp-card .emp-promote-badge{animation:none}
@media (prefers-reduced-motion:reduce){.emp-card .emp-promote-badge{animation:none}}
