.outer-links-active>.relation-route-columns,.outer-links-active>.relation-focus-card .relation-focus-counts{display:none!important}
#motionLinkHost{margin-top:14px;border-top:1px solid #bda884;padding-top:16px;color:light-dark(#493c2a,#e6d8bf)}
.outer-links-heading h3{margin:5px 0 12px;font-size:18px;font-weight:500}.outer-links-heading small,.outer-starts>span{font-size:11px;color:light-dark(#806b4b,#bdab8a)}
.outer-starts{display:flex;flex-wrap:wrap;gap:6px;align-items:center}.outer-starts>span{width:100%;margin-bottom:2px}#motionLinkHost button{cursor:pointer;font-family:inherit;color:inherit;border:1px solid light-dark(#cbb997,#6e5c40);background:light-dark(#f7f0e4,#332c23);border-radius:5px;padding:8px 10px;font-size:12px}#motionLinkHost button[aria-pressed=true]{background:light-dark(#84643b,#bfa06a);color:light-dark(#fff8ec,#241c12)}
.outer-path{display:flex;align-items:center;gap:7px;overflow:auto;padding:14px 0}.outer-path i{font-style:normal;opacity:.6}.outer-path button{flex-shrink:0;text-align:left}.outer-path small{display:block;font-size:10px;margin-top:4px;opacity:.75}.outer-path button:disabled{opacity:1;background:light-dark(#e5d4b6,#56452e)!important;color:inherit!important}
.outer-tools{display:grid;gap:10px;margin-bottom:14px}.outer-tools label{font-size:11px}.outer-tools input{margin-top:5px!important;background:light-dark(#fcf8ef,#332c23)!important;color:inherit!important;border-color:light-dark(#cbb997,#6e5c40)!important;border-radius:5px!important}.outer-tools>div{display:flex;gap:5px}.outer-tools>div>button{flex:1}.outer-tools>span{font-size:11px;opacity:.7}
.outer-results{display:grid;gap:10px;max-height:620px;overflow:auto;overscroll-behavior:contain;scrollbar-gutter:stable}.outer-command{border:1px solid light-dark(#cbb997,#6e5c40);border-radius:7px;overflow:hidden}.outer-command>header{display:flex;justify-content:space-between;gap:8px;align-items:center;padding:9px 12px;background:light-dark(#e9d9bc,#4b3b25)}.outer-command kbd{font:600 12px BDO,system-ui,sans-serif}.outer-command>header small{font-size:10px;opacity:.7}
#motionLinkHost .outer-result{display:flex;gap:10px;align-items:flex-start;width:100%;border:0;border-radius:0;padding:13px 12px;text-align:left;color:inherit;background:light-dark(#faf4e9,#332c23)}#motionLinkHost .outer-result+.outer-result{border-top:1px solid light-dark(#cbb997,#6e5c40)}#motionLinkHost .outer-result.selected,#motionLinkHost .outer-result:hover{color:inherit;background:light-dark(#e8d8bb,#59442a)}.outer-result>img,.outer-icon{width:38px;height:38px;object-fit:contain;flex-shrink:0}.outer-result>span:not(.outer-icon){display:grid;gap:7px;flex:1}.outer-result b{font-size:13px;font-weight:500}.outer-result b small{font-size:10px;font-weight:400;opacity:.65;margin-left:4px}.outer-result span>span{font-size:11px}.outer-result strong{color:light-dark(#89602b,#e1bf7d)}.outer-result em{font-size:11px;font-style:normal;color:light-dark(#9b6429,#e1bf7d)}.outer-result span>small,.outer-result i{font-size:10px;font-style:normal;opacity:.7}.outer-help,.outer-empty{font-size:11px;line-height:1.8;opacity:.7}.outer-empty{padding:25px}
/* The links workspace owns its layout, independently of player visibility. */
body.links-workspace .app-shell{width:min(2200px,calc(100% - 32px))}
body.links-workspace .lab-layout{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:22px;align-items:start}
body.links-workspace .combo-workspace{grid-column:1;grid-row:1;width:100%;min-width:0}
body.links-workspace .skill-pane{grid-column:2;grid-row:1;width:100%;min-width:0}
.outer-links-active>.atlas-heading>b{display:none}
.outer-links-active .relation-skill-browser>header{grid-template-columns:minmax(0,1fr) minmax(100px,.8fr) 110px}
.outer-links-active .relation-skill-browser label{min-width:0}
.outer-links-active .relation-skill-grid{grid-template-columns:repeat(auto-fill,minmax(150px,1fr));max-height:238px}
.outer-results{max-height:470px}
@media(max-width:1200px){body.links-workspace .app-shell{width:min(1040px,calc(100% - 16px))}body.links-workspace .lab-layout{display:flex;flex-direction:column;gap:20px}body.links-workspace .combo-workspace{order:1}body.links-workspace .skill-pane{order:2}}
@media(max-width:820px){.outer-links-active .relation-skill-browser>header{grid-template-columns:1fr 1fr}.outer-links-active .relation-skill-browser>header>div{grid-column:1/-1}}
/* Keep timing inside each skill's unused right-hand area. */
#motionLinkHost .outer-result{display:grid;grid-template-columns:minmax(0,1fr) 14px minmax(0,1fr);gap:7px;padding:6px;align-items:stretch}
#motionLinkHost .outer-result>.outer-skill-box{display:grid;grid-template-columns:minmax(0,1fr) minmax(68px,auto);gap:8px;align-items:center;border:1px solid light-dark(#cbb997,#6e5c40);background:light-dark(#f3ebdd,#332c23);padding:8px;min-width:0}
#motionLinkHost .outer-skill-identity{display:flex;align-items:center;gap:7px;min-width:0;font-size:11px}
.outer-skill-identity>img,.outer-skill-identity>.outer-icon{width:32px;height:32px;object-fit:contain;flex-shrink:0}
.outer-skill-identity>span{display:grid;gap:5px;min-width:0}.outer-skill-identity b{font-size:12px;line-height:1.4;word-break:keep-all}.outer-skill-identity small{font-size:10px;opacity:.7;line-height:1.4}
#motionLinkHost .outer-skill-info{display:grid;gap:4px;align-content:center;text-align:right;max-width:110px;font-size:10px;line-height:1.5;border-left:1px solid light-dark(#d9cbb4,#66563f);padding-left:8px}
.outer-skill-info strong,.outer-skill-info em{font-size:11px;font-style:normal;line-height:1.6;word-break:keep-all}.outer-skill-info small{font-size:9px;opacity:.6}.outer-link-arrow{align-self:center;text-align:center;font-size:16px!important;opacity:.7}
@media(max-width:600px){#motionLinkHost .outer-result{grid-template-columns:1fr}.outer-link-arrow{transform:rotate(90deg)}#motionLinkHost .outer-skill-info{max-width:none}}
.outer-direction-tabs{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;margin:10px 0}
#motionLinkHost .outer-direction-tabs>[aria-selected=true]{background:light-dark(#84643b,#bfa06a);border-color:light-dark(#84643b,#bfa06a);color:light-dark(#fff8ec,#241c12)}
.outer-direction-description{font-size:12px;line-height:1.7;margin:12px 0;color:light-dark(#806b4b,#bdab8a)}
.outer-source-path{font-size:9px!important;line-height:1.6;white-space:normal;overflow-wrap:anywhere;color:light-dark(#806b4b,#bdab8a)}

#motionLinkHost .outer-source .outer-skill-info{max-width:none;gap:3px}
#motionLinkHost .outer-input-time{white-space:nowrap;font-size:11px;line-height:1.6}

/* Compact controls: one row for starts/sequence, one for search/count. */
.outer-sequence-toolbar{display:flex;align-items:center;gap:14px;overflow-x:auto;min-width:0;padding:6px 0 8px;white-space:nowrap}
.outer-sequence-toolbar .outer-starts{flex-wrap:nowrap;flex-shrink:0}
.outer-sequence-toolbar .outer-starts>span{width:auto;margin:0;white-space:nowrap}
.outer-sequence-toolbar .outer-path{flex-shrink:0;gap:6px;padding:0;overflow:visible;border-left:1px solid light-dark(#cbb997,#6e5c40);padding-left:14px}
.outer-path-label{font-size:11px;color:light-dark(#806b4b,#bdab8a);white-space:nowrap}
#motionLinkHost .outer-path button{font-size:11px;padding:6px 8px}
#motionLinkHost .outer-tools{display:flex;align-items:center;gap:10px;margin:8px 0 10px}
#motionLinkHost .outer-tools label{display:flex;align-items:center;gap:8px;flex:1;min-width:0;white-space:nowrap}
#motionLinkHost .outer-tools input{margin-top:0!important;min-width:0;flex:1;padding:7px 9px}
#motionLinkHost .outer-tools>span{white-space:nowrap}
/* One navigation for the lab; the viewer is a dedicated workspace. */
.app-shell>.workspace-tabs{margin:0 0 18px;border:1px solid light-dark(#c2ad8e,#5e5039);border-radius:7px;overflow:hidden}
.app-shell>.workspace-tabs button{cursor:pointer;padding:17px 12px;font-family:inherit;font-size:14px;min-width:0}
.app-shell>.workspace-tabs button.active{font-weight:600;box-shadow:inset 0 -2px #a77a3d}
.app-shell>.workspace-tabs button:focus-visible{outline:2px solid #b68c4c;outline-offset:-4px}
body.links-workspace .workspace-header,body.links-workspace .workspace-footer{display:none!important}
#workspace-motion{padding:16px}
body.links-workspace .combat-mode{margin-bottom:12px}
body.links-workspace .relation-motion-panel>header{padding:14px 17px}
body.links-workspace .relation-motion-panel>header small,body.links-workspace #closeRelationMotion{display:none}
body.links-workspace .relation-motion-panel{min-height:0;border-radius:6px;overflow:hidden}
body.links-workspace .relation-motion-panel iframe{height:max(820px,calc(100dvh - 250px))}
#motionData .relation-skill-browser{margin:0;border-radius:5px;overflow:hidden}
#motionData .relation-skill-browser>header{display:flex;justify-content:space-between;align-items:center;gap:16px;padding:11px 12px}
#motionData .relation-skill-browser>header>div{display:flex;align-items:center;gap:8px;white-space:nowrap}
#motionData .relation-skill-browser>header label{display:flex;align-items:center;gap:9px;font-size:0;flex:1;max-width:290px}
#motionData .relation-skill-browser input{margin:0!important;font-size:12px;padding:8px 10px}
.motion-skill-count{font-size:11px;opacity:.6}
#motionData .relation-skill-grid{grid-template-columns:repeat(3,minmax(0,1fr));max-height:178px;padding:8px;gap:5px}
#motionData .relation-skill-choice{grid-template-columns:32px minmax(0,1fr);gap:6px;padding:6px}
#motionData .relation-skill-choice>img{width:30px;height:30px}
#motionData .relation-focus-card{border:0;background:none;margin:16px 0 0;padding:0 0 0 2px;display:block}
#motionData .relation-focus-identity>img{width:38px;height:38px}
#motionData .relation-focus-identity h3{font-size:17px;margin:0}
#motionData .relation-focus-identity p{font-size:11px;margin:5px 0 0}
#motionData #motionLinkHost{margin-top:14px;padding-top:0;border-top:0}
#motionData .outer-results{max-height:580px}
@media(max-width:680px){.app-shell>.workspace-tabs button{font-size:12px;padding:15px 4px}#workspace-motion{padding:12px}#motionData .relation-skill-grid{grid-template-columns:repeat(2,minmax(0,1fr));max-height:170px}}
body.links-workspace .class-toolbar .combat-mode{display:flex;width:auto;margin:0 16px 0 auto;height:36px;border:1px solid light-dark(#bda884,#726044);border-radius:5px;overflow:hidden;background:none;padding:0;gap:0}
body.links-workspace .class-toolbar .combat-mode button{width:90px;min-height:0;padding:6px 18px;border:0;border-right:1px solid light-dark(#bda884,#726044);background:transparent}
body.links-workspace .class-toolbar .combat-mode button:last-child{border-right:0}
body.links-workspace .class-toolbar .combat-mode button.active{background:light-dark(#84643b,#bfa06a);color:light-dark(#fff8ec,#241c12)}
body.links-workspace .class-toolbar .combat-mode button b{font-size:13px;color:inherit}
body.links-workspace .class-toolbar .combat-mode button i,body.links-workspace .class-toolbar .combat-mode button span{display:none}
body.links-workspace .class-toolbar #themeToggle{margin-left:0}
#motionData .outer-links-heading{display:none}
body.links-workspace .relation-motion-panel>header{display:none}
@media(max-width:520px){body.links-workspace .class-toolbar .combat-mode{margin-left:auto;margin-right:0}body.links-workspace .class-toolbar .combat-mode button{width:60px;padding:6px 12px}}
body.links-workspace .relation-motion-panel>header{display:flex;padding:12px 15px;border-bottom:1px solid light-dark(#c2ad8e,#706044)}
body.links-workspace #relationMotionTitle{display:flex;align-items:center;gap:10px;font-size:14px}
#relationMotionTitle>img{width:34px;height:34px;object-fit:contain}
body.links-workspace #relationMotionTitle small{display:block;font-weight:400;font-size:11px;margin-top:4px}
.game-window.motion-empty>:not(.motion-empty){display:none!important}
.motion-empty:not([hidden]){display:grid;place-items:center;min-height:520px;color:light-dark(#806b4b,#bdab8a);font-size:16px}

/* Selected skill identity and its live motion context share one calm header. */
#motionData .relation-focus-card{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 2px 14px;margin-top:8px;flex-wrap:wrap}
#motionData .relation-focus-identity{flex:1 1 220px}
.motion-context-badges{display:flex;align-items:center;justify-content:flex-end;gap:6px;flex-wrap:wrap;font-size:11px;font-weight:500;line-height:1.5}
.motion-context-badges>span{display:inline-flex;align-items:center;gap:5px;padding:4px 9px;border-radius:5px;white-space:nowrap}
.motion-context-mode{background:#3c3528;color:#ead5a9}
.motion-context-weapon{color:#bfb39b;background:#292a29}
.motion-context-rage{background:#482c29;color:#f1c2ad}
.motion-context-rage i{width:6px;height:6px;background:#e58d77;border-radius:50%}
:root[data-theme="light"] .motion-context-mode{background:#ddc6a0;color:#59401c}
:root[data-theme="light"] .motion-context-weapon{background:#e8dfd0;color:#685b47}
:root[data-theme="light"] .motion-context-rage{background:#eed4c8;color:#813e2b}
:root[data-theme="light"] .motion-context-rage i{background:#b65f44}
@media(max-width:560px){#motionFocusContext{margin-left:60px}.motion-context-badges{justify-content:flex-start}}

.motion-context-badges>button.motion-context-rage{display:inline-flex;align-items:center;gap:6px;padding:4px 9px;border:0;border-radius:5px;font:inherit;white-space:nowrap;cursor:pointer;background:#302e2c;color:#bfb39b}
.motion-context-badges>button.motion-context-rage[aria-checked="true"]{background:#482c29;color:#f1c2ad}
.motion-context-badges>button.motion-context-rage i{position:relative;display:inline-block;width:23px;height:13px;border-radius:9px;background:#77716a;transition:background .15s}
.motion-context-badges>button.motion-context-rage i:after{content:"";position:absolute;top:2px;left:2px;width:9px;height:9px;border-radius:50%;background:#fff;transition:transform .15s}
.motion-context-badges>button.motion-context-rage[aria-checked="true"] i{background:#bc5144}
.motion-context-badges>button.motion-context-rage[aria-checked="true"] i:after{transform:translateX(10px)}
.motion-context-badges>button.motion-context-rage:hover{filter:brightness(1.12)}
.motion-context-badges>button.motion-context-rage:focus-visible{outline:2px solid #bfa16d;outline-offset:3px}
:root[data-theme="light"] .motion-context-badges>button.motion-context-rage{background:#e8dfd0;color:#685b47}
:root[data-theme="light"] .motion-context-badges>button.motion-context-rage[aria-checked="true"]{background:#eed4c8;color:#813e2b}

/* One page scroll on the left; keep the motion workspace alongside it. */
body.links-workspace #motionData .relation-skill-grid,
body.links-workspace #motionData .outer-results{max-height:none;overflow:visible;overscroll-behavior:auto;scrollbar-gutter:auto}
#motionSkillPickerToggle{flex:none;border:1px solid light-dark(#cbb997,#6e5c40);border-radius:4px;background:light-dark(#e8dfd0,#332c23);color:inherit;padding:7px 10px;font:inherit;font-size:11px;white-space:nowrap;cursor:pointer}
#motionSkillPickerToggle:focus-visible{outline:2px solid #b68c4c;outline-offset:3px}
#motionSkillPickerToggle span{margin-left:7px}
#motionData .relation-skill-browser>header label[hidden]{display:none!important}
@media(min-width:1201px){
 body.links-workspace .skill-pane{position:sticky;top:12px;align-self:start;max-height:calc(100dvh - 24px)}
 body.links-workspace .relation-motion-panel{display:flex;flex-direction:column;height:var(--motion-pane-height,calc(100dvh - 150px));min-height:0}
 body.links-workspace .relation-motion-panel>header{flex:none}
 body.links-workspace .relation-motion-panel iframe{flex:1;min-height:0;height:0!important}
}
@media(max-width:600px){#motionData .relation-skill-browser>header{gap:8px;flex-wrap:wrap}#motionData .relation-skill-browser>header label{order:3;flex-basis:100%;max-width:none}#motionSkillPickerToggle{margin-left:auto}}
/* Body must not create a second scroll container above the sticky column. */
body.links-workspace{overflow:visible}

/* The atlas shares the page-scroll / sticky-column behavior of the motion lab. */
:is(body.atlas-workspace,body.combo-sticky-workspace){overflow:visible}
:is(body.atlas-workspace,body.combo-sticky-workspace) .atlas-results{max-height:none;overflow:visible;overscroll-behavior:auto}
@media(min-width:1201px){
 :is(body.atlas-workspace,body.combo-sticky-workspace) .app-shell{width:min(2200px,calc(100% - 32px))}
 :is(body.atlas-workspace,body.combo-sticky-workspace) .lab-layout{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:22px;align-items:start}
 :is(body.atlas-workspace,body.combo-sticky-workspace) .combo-workspace{grid-column:1;grid-row:1;width:100%;min-width:0}
 :is(body.atlas-workspace,body.combo-sticky-workspace) .skill-pane{grid-column:2;grid-row:1;width:100%;min-width:0;position:sticky;top:12px;align-self:start;display:flex;flex-direction:column;height:var(--motion-pane-height,calc(100dvh - 150px));min-height:0}
 :is(body.atlas-workspace,body.combo-sticky-workspace) .skill-pane>.combat-mode{flex:none}
 :is(body.atlas-workspace,body.combo-sticky-workspace) .game-window{display:flex;flex-direction:column;flex:1;min-height:0}
 :is(body.atlas-workspace,body.combo-sticky-workspace) .game-window>.game-tabs,:is(body.atlas-workspace,body.combo-sticky-workspace) .game-window>.game-toolbar,:is(body.atlas-workspace,body.combo-sticky-workspace) .game-window>.game-footer,:is(body.atlas-workspace,body.combo-sticky-workspace) .game-window>.option-footer{flex:none}
 :is(body.atlas-workspace,body.combo-sticky-workspace) .tree-wrap{flex:1;min-height:0;height:0!important}
}
@media(min-width:1201px){
 :is(body.atlas-workspace,body.combo-sticky-workspace) .game-window{overflow:hidden}
 :is(body.atlas-workspace,body.combo-sticky-workspace) .game-toolbar{grid-template-columns:36px minmax(80px,1fr) minmax(150px,.9fr) 32px 32px;gap:6px;padding:8px}
 :is(body.atlas-workspace,body.combo-sticky-workspace) .point-box{min-width:0;padding:0 8px}
 :is(body.atlas-workspace,body.combo-sticky-workspace) .point-box strong{font-size:11px}
 :is(body.atlas-workspace,body.combo-sticky-workspace) .point-box b{font-size:16px}
 :is(body.atlas-workspace,body.combo-sticky-workspace) .point-icon{font-size:14px;margin-right:5px}
}
